views:

90

answers:

2

Is there any way in Google Analytics to track whether somebody who completes Goal 2 has, on a previous visit, completed Goal 1?

It looks like custom segments allows you to see people who have completed them in the same session, but not if they're completed on separate visits.

+1  A: 

Yes.

Activity by an individual user can be aggregated across multiple sessions. This is done with first-party cookies. Just after the GA tracking code is initialized, GA sets (or else updates) at least four first-party cookies. One of these, the "__utma" cookie, is used to "tag" that visitor with a unique identifier (the __utma cookie) so that the next time they hit your Site, their cookies can be updated rather than new ones set. This cookie has a lifetime of two years. (If you're curious, the other cookies are __utmb (session ID, 30 min), __utmc (also session ID, destroyed when browser is closed), __utmv (visitor segmentation, two-year lifespan), __utmz (campaign values, persists for six months), and __utmx (Website Optimizer).

So for instance, by retrieving and inspecting the __utma cookie, you could determine that a user had visited your Site three times (for instance); in addition, these three visits could have occurred on the same day or on different days.

The "session counter" is the last string on the __utma cookie--located after the right-most "dot"

Here's the signature for the __utma cookie:

__utma = (domain hash).(random).(time initial).(time previous).(time current).(session count)

If you want to verify this for yourself, you can use this js snippet to grab the visit counter from the __utma cookie:

function visit_count(ck_str) {
// returns "NT" ("not tracking") if "session count" has no value 
  var counter, visits_total = "NT";  
  if (ck_str != "NT") {
    visits_total = ck_str.lastIndexOf(".");
    counter ++;
    visits_total = ck_str.substring(counter++);
    }
return visits_total;    
}

Goal Configuration

With this in mind,

  1. Go to one of the profiles in your GA account, visit the "profile settings" page, then select "Add goal". For each goal (i.e., you set up each goal in a multi-goal set exactly this way, just another loop through these steps), you will be prompted for:

    -- a Goal Name (textbox);

    -- an on/off radio button to indicate whether the current Goal is "on" or "off";

    -- Goal Position, i.e., the group (or "Set number") to which you assigned this Goal, as well as the number you assigned to this Goal within the specified Set; and

    -- Goal Type (select via radio buttons, "URL", "Time on Site", or "Pages/Visit")

  2. Next, you'll be prompted to provide a few "Goal Details" (e.g., assign a "value" to this Goal)

  3. then click "Save Goal"

doug
+1  A: 

Reading your question, I think a possible solution could be:

When your user converts on Goal 1, then set a Custom Variable with opt_scope 3 to tag that visitor as having completed Goal 1, say as "Goal 1 Visitor".

Then set up Goal 2 as normal and in the Visitors>Custom Variables report, you should be able to see the number of times that Goal 2 has been completed by a "Goal 1 Visitor".

bigtony