0

I'm looking to segment users on my website by those who are logged in and those who are not, and I'm a bit confused as to how it will work out implementation-wise.

So my plan is:

  1. Create a user-level custom dimension called logged-in with two values yes and no.
  2. Create a custom DataLayer variable in GTM and ask my developer to push the logged-in state into the DataLayer.
  3. Push the Custom Dimension data into GA with a Universal Analytics tag (triggered by Pageview).

So, my question is as follows.

Let's consider this scenario:

  1. A user comes to my site on March 20th. Custom dimension set to no.
  2. The same user registers for an account on March 25th. Custom dimension value changed to yes.

Now I'll create a custom report with this custom dimension as a primary dimension with Users as the metric.

Now, consider I'm reporting for the custom report for the data range: March 20th to March 30th. Will the user fall into the yes bucket or the no bucket?

Same question for 20th to 24th: will the user fall into the yes bucket or the no bucket? As for 25th to 30th, obviously I think the user will fall into the yes bucket.

1

From March 20 to 30, you will have both "yes" and "no". For the 20th to the 24th, the user will fall into the "no" bucket (and "yes" for the 25th to 30th). This is because of how user-scoped CDs work. If the value of the CD is changed (or applied) for a particular session, then all the hits for the current session as well as all the future hits for future sessions will have that value. Past sessions are unchanged.

You can read more about the differences between the different scopes in this resource about Custom Dimensions.

  • Does this work the same way for segmenting by the custom dimension? – Vikram Apr 27 '15 at 1:48
  • I believe it should, but what have you tried so far, and what were the results? – nyuen Apr 27 '15 at 3:08
  • Any updates, OP? – nyuen May 18 '15 at 15:12
1

Does a "logged in" state define a user in his characteristics, or a "state" in which he is during a moment (a session)? It's the second one.

The dimension you're talking about should be something like "Registered user". "Logged in" should be session level. Use these two for different purposes. In fact, for session level dimensions, if a user do something (some hits) when unlogged, then log in your website, all previous hits will be overwritten.

For example, if your website offers users the ability to login, you can use a custom variable scoped to the session level for user login status. In that way, you can segment visits by those from logged in members versus anonymous visitors.

For example, if your websites offers premium content to paying subscribers, you can set a visit(user)-level custom variable to analyze which users are paying members, at which level of payment, and which users are using the free level of service for the site. You would likely set this custom variable as a one-time function, since the value would persist across the life of the visitor cookie.

https://developers.google.com/analytics/devguides/collection/gajs/gaTrackingCustomVariables#sessionLevel

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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