I would like to set up goals that track specific cases of user behavior that we have decided are interest to us, such as when a user returns after having not been on the site for a week, or a month.

So for example, I might report that of the 100 visitors to the site today, 33 of them were returning for the first time in a month, and 42 were returning for the first time in a week.

This is already tracked to some degree in the Days Since Last Visit report, but the report seems very limited -- I really want a metric to use (like I use other goals) that just counts the number of cases of something.

There are four types of goal available: Url, Time on Site, Pv/Visit, and Event -- the first three are not right, but it seems like I might be able to create an event that does what I want. I could do this by storing the last visit date in the database, or in a cookie, but am hoping to avoid this, as it seems redundant.

Or maybe a custom variable that I set in some JS logic?

Has anyone done anything like this?

  • 1
    Thanks @danlefree -- The advanced segment solution does not exactly solve my problem as I initially meant, although it it a pretty good idea for spot analysis. The issue with advanced segments is that we use many others and they cannot be ANDed together. So, for example, if I wanted to see registered users (an existing advanced segment) who have come back within 7 days, I would have to have another segment that has the rule for "registered user" AND the new logic for days since last visit. I would like the data to be recorded and stored over time, in the same way that a goal is stored. This al Commented Jan 8, 2012 at 20:38
  • Tom, how did you end up resolving this?
    – Baumr
    Commented Jun 28, 2013 at 9:37

1 Answer 1


Google Analytics already tracks this information, so, if you want more granular reporting, this would be an ideal use case for Advanced Segment reporting:

  1. Create a New Custom Segment
  2. Enter a name for the segment (e.g. "Recency: 1wk+") so you can save and refer to your report in the future
  3. In the first filter, specify:
    • Include
    • Days since last visit
    • Greater than
    • ... and the value you would like as a lower bound
  4. Repeat the process and specify "Less than" to set an upper bound
  5. Save your custom segment

If it would be more convenient for you to simply track return activity as a goal, you might do so using an event or session-level custom variable (or virtual pageview) - in which case you would need to author a Javascript which checks whether user has an existing timestamp cookie and, if timestamp cookie is greater than (specified interval) and no "already reported" cookie exists, issue a virtual pageview.


... since Events can now be tracked as goals, this is probably the preferable solution in order to avoid spurious false page views, right?

Sure enough, amended answer accordingly - virtual page views have historically been the only option (and they carry the same disadvantage of bounce rate deflation) but you could even use a custom variable to track this information if you have a free slot for it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.