Built-in user-id status is set to "Unassigned" in predefined user id view - google-analytics

If I apply a session-based custom segment defined as user-id status matches exactly "Unassigned" in the standard user-id view the segment is matched by several sessions / users.
Since the user id view should only encompass sessions where the user id is set this shouldn't be the case.
I can't find any proper documentation on how the built-in dimension user-id status gets populated, but I would assume that it is derived from the uid parameter sent with the server calls.
How can the value of dimension user-id status ever be "Unassigned" within the user id view?
Taking the reversed segment defined as status=Assigned there are users that never had a userid assigned to them and are still in the user-id view.
How can user without an assigned userid be part of the user-id view?
Side note:
Implemented via GTM
Session Unification is active
user-id status is a Google-intern dimension automatically created when setting up the userid feature.

Unassigned is not a value GA would set (when a value is not defined in GA it is set to (not set)), **so if it's there it's because someone set it.*
Now with regards to your segment, the question you are asking GA is:
give me users who during ANY session had status=Unassigned
this includes sessions prior to identification because Session Unification is active
So anybody who had status=Unassigned at some point and then identified will match that segment.
If you want to know users who have status=Unassigned as their latest status you want to make sure your custom dimension is set to User Scope and that you replace Sessions Include with Users Include in your filter.

Related

Filter specific user id from Google Analytics?

We're using Google Analytic's User ID feature and would like to filter our data to exclude users with a specific user ID (in our case "DEMO").
Any suggestions on how this might be accomplished? Or is this not possible?
Per default this is not possible, since the user id is not exposed via the interface and cannot be used in filters or segments (you can check the available fields for UI and API in the Dimensions and Metric Explorer).
You would have store the user id as a custom dimension, and filter by that. This will not work for data that has already been collected.

Custom metric to track email opens

I am trying to track the number of email opens of a mailing.
This mailing is not personalised, so each receiver will get exactly the same email contents.
So far I have found out that I can add a tracking pixel in the mailing, which will send data to GA that a user opened the mail (images were loaded).
Example code:
<img src=”http://www.google-analytics.com/collect?v=1&tid=UA-XXXXXX-X
&cid=EmailOpenTest&t=event&ec=email&ea=open&el=EmailOpenTest
&cs=newsletter&cm=email&cn=Email&cm1=1″ />
'tid' will be our custom tracking ID.
This all works, as when this link is opened the total number of hits increases.
But my question relates to parameter 'cid'. For testing purposes, I have set this here to "EmailOpenTest". But this should be a random/unique ID per user actually. But as the mailing is not personalised, I wonder if it would be possible to track individual users?
Does this mean I have to include javascript in the mail? Would that even work in all email clients? Or are there other options?
All suggestions are welcome.
Assumption: you are using a mail client like Mail Chimp
Assign a unique id to every email on the email list. lets say this unique id is uid
Create a custom dimension in GA, lets name it as Client Mail Id with index say 1
Create the same pixel just like you have created above in the OP.
Add a custom Dimension in the hit as
http://www.google-analytics.com/collect?v=1&tid=UA-XXXXXX-X
&cid=EmailOpenTest&t=event&ec=email&ea=open&el=EmailOpenTest
&cs=newsletter&cm=email&cn=Email&cm1=1&cd1=uid
In place of uid, you actually need to pass the mail list unique id for that email
How it will work
Once the user sends this hit, your unique id will be recorded in custom dimension 1.
Generate a custom report in GA with event category=email & event action=open and add a dimension custom dimension 1.
All the id's displayed there have actually opened the email ;)
PS: It's tried and tested, so won't cause any issue. Also if you don't want to use custom dimensions, you can also send this id in event label or event value
PPS: In any mail client, getting unique value for that email is pretty easy. You can actiually use its position number or add another column for the unique id, then grab that id win the template
The cid is the clientId, an identifier that is used to aggregate pageviews into sessions, and sessions into unique users.
The way to use that in email-tracking would be to capture the client id when a user subscribes to your newsletter and then insert it into the email links. Since your mails are not personalized this will not work.
If you use a random ID you will not be able to link the request from the mail to an existing user. So one way to deal with the problem would be to ignore it - using a constant userId would still give you an event count (the unique events metric might be a little of if users click the link multiple times within a session lifetime).
If for some reason you absolutely need to track these as different users you can set up a redirect - do not send data to ga directly from your mail, instead call a script on your server that inserts a random clientId and then sends the data to Google.

1st party cookie and user session/visit activity google tag manager

I am new to GA & GTM. I want to track users session/visit activity like page views,document download etc. whatever activity user performs during the session/visit. In Omniture I do activity using evar variable. How can I do the same with GA & GTM.
Going through the document on internet I tried to do this using 1st party cookie variable in GTM. but it is not working. when i see the value for cookie variable it showing undefined and also for return type.
A
You don't need to set a 1st party cookie as GA will do this itself when you put the tag on the website. Its a lot less setup and has more metrics out of the box than Adobe Analytics. In an aggregated fashion the activites you mention can be tracked via event tracking.
If you are looking to also track this on an individual level, then also set a user custom dimension or the userId parameter unique for each user. This will then be associated with the out of the box metrics as above, that you can access via a custom report.
Logical for your question is:
When users authenticate, the user ID should be stored in dataLayer
When subsequent Universal Analytics tags are fired, the &uid key
should first check if the User ID is in dataLayer
If it is, then a cookie is written in the user’s browser with this
User ID, and finally the value is returned to the tag
If the User ID is not in dataLayer, GTM checks if it’s stored in a
cookie, and if it is, the cookie value is returned
If there is no such cookie, nothing is returned and the User ID
parameter will not get sent
Check this post

Need to find out a drop offs from purchasing per type of user

My client need to find out a drop offs in purchasing process per type of user and per type of industry.
FYI- these both user type and industry type need to select the user while registring to the website. And user can see the products only once they loggedin.
So, what needs to be done for achieving this to track in google dashboard
thanks
On Login set the user type and industry as session scoped custom dimensions. Go to your analytics account, property settings, custom definitions, create a custom dimension, set scope to session (that way you need it to set only once per session, with a hit based dimension you'd need to send this with every pageview).
On your login confirmation page add the custom dimension:
ga('send', 'pageview', {
'dimension1': 'usertype',
'dimension2': 'industry',
});
Custom dimensions are specified as key/value pairs; the key is he string "dimensions" plus the numeric index of the dimension, the values you'd have to extract from your backend for each user when he logs in. It takes at least 24 hours until values for custom dimensions show up (well, at least for me).
Based on those custom dimensions you can create segments in the Analytics interface and do any analysis you like. You should probably create a goal with a funnel for your sales, and then apply the segment to the funnel view (or the goal flow view) to see where users drop of.

Google Analytics: How to associate an event with an individual session

I have a variable that's being laoded on my page and then being reported back to GA via the event tracking api. Is there a way for this "event" to be associated with the flow of an individual session?
For example: If I have a variable that gets reported as "eligible", can I then associate this event with the session and page flows?
Yes, you can create an advanced segment. That is a way to filter sessions (visits) according to certain criteria. In this case, your criterion would be "Include: Event Label = 'the name of the label of your event'".
Note that it is against the terms of use of GA though to report data on an indidivual basis, i.e. it is not allowed to create an event label that allows you to identify each single session.

Resources