I want to track a simple subscription product with Google Analytics and need to determine how to best track (a) User State, and (b) Subscription conversion rate.At any given time, a user can be a:Guest: Logged outMember: Logged in, but not on a paid subscriptionSubscriber: On a paid subscriptionI plan to track this using a session-level Custom Dimension (User State), whose value changes when the user moves from one category to another.Additionally, non-Subscribers can purchase a subscription at any point. This will be registered through an event (Purchased Plan) tied to a Goal.My questions are:Should I use a hit-level, session-level or user-level custom dimension for User State?If using a session-level or user-level dimension, how do I deal with the case of users logging out mid-session and their entire activity being classified as Guest? For example, a Subscriber views 20 pages, then logs out, which immediately puts the entirety of that session as a Guest session.When I look at the Purchased Plan conversion rate, how can I exclude existing subscribers from the denominator in order to get a clean rate?For this last case, I thought of using an advanced segment configured to Include Users with User Type = Guest or Member and then look at the conversion rate for this segment.But users that purchase a subscription are immediately changed into User State = Subscriber, so the entirety of their activity (in a session-level or user-level) scoped custom dimension would be classified as such, rendering my advanced segment worthless (i.e. the user's activity will not be present in that segment).The other option would be to set User State to hit-level scope instead, so that I can discriminate the user's activity before and after the subscription event.How can I deal with this situation? Any help will be greatly appreciated.
How should I track user state and purchases in Google Analytics?
google analytics;event tracking;custom dimensions
It really boils down to the queries you expect to make. If you use hit-scope, you will be able to create segments that differentiate actions that take place within a session. So a user could start as a guest, then log in to become a Member, the pay for the subscription to become a Subscriber, and finally log out to become a Guest again. With a hit-scoped dimension you can query all of these, but the queries can become quite complex.If you use session-scope, then the last value you sent into the custom dimension will apply for the entire session. Thus you'll lose the granularity. The good thing about session-scope is that you only need to send it once. It will automatically apply to all hits of the session.User-scope is like session-scope, but it will apply from the first time it is set for as long as the user has the same client ID.How I would approach this is to look at the three levels. Member and Subscription are clearly scoped to the user, since if you are in one, you are in that until you upgrade, right?Guest on the other hand tells you nothing about the user level. They could be a Subscriber but they just haven't logged in.So here's how I would track it:1) Do not track Guest at all. You can query for Guest by creating a segment for all sessions where the User State custom dimension does not contain Member|Subscriber.2) Track Member and Subscriber as User-scoped dimensions.3) Track Login and Logout as events, and send the current user state as an Event Label or a hit-scoped custom dimension.With these three you will be able to:Track sessions where the user didn't log in (exclude sessions with Event Category = login), and you can also combine it with the user-scoped dimensions to see how often members and subscribers browse the site without logging in.Track member and subscriber traffic also on sessions where they didn't login (thanks to user-scoped dimension)Track sessions where the user logged in as member (include sessions where Event Category is Login and Event Label is member), but the state is subscriber. This means that these sessions were the users upgraded their subscription.And so on.Simo