How to track USER_ID generated by Google analytics which came from certain campaign/utm? - google-analytics

when somebody register on my website, Google Analytics genrate a new USER ID form him. How can I label/track generated USER_IDs which came from certain campaign (i.e. form certain custom URL with utm parameters)?
Thx for help.

In the first step you should push the UID (or CID) as a Dimension into your GA Account. So you are able to export the UID/CID through the API (or CSV). Here is a article how to do this: https://productforums.google.com/forum/#!topic/tag-manager/lcTvzfvcTvU;context-place=topicsearchin/tag-manager/category$3Aadvanced-setup--implementation%7Csort:relevance%7Cspell:false
If you have the ID as a Dimension you can build a Segment containing your Campaign. In your reports you now see the IDs.
Another solution would be to fire the dimension with the IDs just if a User is on a page containing the specific parameters.

Related

How to exclude data by users' id in Google Analytics > Behavior > Events?

Is it possible to exclude certain events by users' id?
Here I don't see it in dimensions:
I see here a filter but it only offers to filter by columns listed below:
Is there really no such an option, must I slap a user id on every event I send to analytics?
user ID and client ID couldn't be used for filtering in reports or segments to do that. However, you might set up a custom tracking and store the user ID value as custom dimension so it will be possible to use it in reports later.
Check this guide for more information https://www.simoahava.com/analytics/13-useful-custom-dimensions-for-google-analytics/

Can't use user id in Google Analytics

We have been registering user ids, and when we go to Audience->User Explorer, the users are all there, each with their activity measures. But we can't find a way to filter some users out of our custom reports.
We do ga('set', 'userId', 'xxxx-xxxx'); but we didn't create any custom dimension. We just told GA specific user-IDs for each.
We haven't been able to set up a segment, as we can't find the id in the filter. Neither in report filter.
We could go the the user and delete all their data. But that is not our point, and we need to keep this data as well. Ideally we would segment our users, but we can't use this filter in the segment definition.
If you want to segment user by userID, you need to create a custom dimension of which you can access. The clientId is not accessible as a dimension to segment on.

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.

Google Analytics - Using Client ID as a custom dimension

Can I use client ID as a dimension in my reports? Client ID does not appear as a dimension in the Dimensions and Metrics Explorer, but I believe I can create a custom dimension that will store the Client ID. My end goal is to have a row per customer/date+time containing the incidents associated with the particular customer at the particular time, e.g. page visits, particular events etc
Once you've created the custom dimension in GA, you can start tracking it via analytics.js with the following code:
ga(function(tracker) {
// Assumes dimension is at index 1.
tracker.set('dimension1', tracker.get('clientId'));
});
I found that the google analytics will NOT save your custom dimension if it matches the value of "client id" (even if that id isn't actually PII). However, if you alter the "client id" to become a different value, it will save properly.
Here are the guidelines about what you are allowed to send

Get google analytics id from the code embed?

As an example, the code I have to embed has an ID of the form: UA-3235632-1, but to use the data export API I need the ID from the URL of the proper page, in this case: 6270018.
How do I get the real ID from the UA type ID?
That feature of the the GA Data Export API could indeed be a little more clear.
Here's what you need to do:
login to the GA Browser and in the
upper-right-hand corner drop-down
menu, select your GA Account of
interest (assuming you have more
than one--if you don't then you are
already on right page). The page
that renders will be the Website
Profiles for that Account. Find the
row in that table that corresponds
to the Profile (Report) you want
retrieve data from and click on the
next-to-last column Edit;
The page you'll see now will say
Profile Settings in the upper
left-hand corner. Just under that,
in smaller font, you'll see Profile
ID followed by a string of digits
(probably six to eight). This is what you want
(in the python client for the GA
Data Export API, it is referred to
as TABLE_ID)).
To retrieve this parameter (TABLE_ID) programmatically, the GA Data Export API Account Feed returns this value to you in the dxp:tableID field. In particular, an Account Query will return the list of profiles under that Account to which you have access; each Profile will have a tableID in the field i mentioned just above.

Resources