user_id as custom dimension not passing to GA - google-analytics

I've created a custom dimension to pass the user-_id (a shopify customer id) to a custom report in GA, however it's not populating. Steps I've taken:
1. Defined custom dimension in GA called "User ID" with scope User
2. Configured in Tag Manager in page view tag, a new variable to capture the user_id from the data layer.
Following is a screenshot from the Tag manager assistant:
Creating a custom report with this new dimension and other metrics
Any idea why it's not passing the data?

You have to send the value to Google Analytics as custom dimension.
So, you have to add the index of the custom dimension and its value in 'Custom Dimensions' field in the Google Analytics tags or its shared settings variable:

Related

Retrieve customparams data from GA4 api

Is there a way to retrieve customevents params from GA4 Data API?
Everytime I tried and run it as shown in google's API doc it returns me this error:
details = "Field customEvent:parameter_name is not a valid dimension. For a list of valid dimensions and metrics, see https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema "
It may depend on when the parameter was created and the name you are using to call it.
From documentation:
The Data API can create reports on Event and User scoped Custom Dimensions. See Event-scoped custom dimensions and metrics reporting and Custom user properties to learn more about custom dimensions. Custom dimensions are specified in an API report request by the dimension's parameter name and scope. For example, include "customEvent:achievement_id" in a Data API request to create a report for the Event-scoped Custom Dimension with parameter name "achievement_id". This API request will fail if the property has not registered this Event-scoped Custom Dimension.
If an Event-scoped Custom Dimension was registered before October 2020, the dimension must be specified in an API request with its event name. For example, include "customEvent:achievement_id[level_up]" for the Event-scoped Custom Dimension with parameter name "achievement_id" and event name "level_up". In October 2020, Analytics replaced Custom-parameter reporting with Event-scoped custom dimensions and metrics reporting.
https://developers.google.com/analytics/devguides/reporting/data/v1/api-schema

Google Analytics query explorer doesn't return custom dimension

My instance of Google Analytics is setup to track UserId, and I can see the unique ID that I am pushing to a custom dimension called User Id (ga:customdimension3).
Query explorer shows this custom dimension, but returns a blank result set:
What's even more bizarre, is that I can use the custom dimension as a filter (so long as it's not also a dimension):
And it filters to just that one user.

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

Can I set custom metrics with Google Tag Manager?

I have a basic yet complicated question. I'm trying to create a custom metric to count number of new memberships. Can I do it with Google Tag Manager?
Thanks for the help.
To create a custom metric with total new memberships:
Create a custom metric, with a scope of hit, and formatting type of integer. Make a note of what index this custom metric is (e.g. 1).
Create an event in Google Tag Manager, which triggers on the creation of a new account. In settings for the event, go to More Settings -> Custom Metrics -> and click ADD CUSTOM METRIC.
In index, insert the index value given by Google Analytics when you set up the custom dimension (in this case 1), and set the metric value to 1. This would allow for you to aggregate in custom dimension 1, the total number of new memberships.
Its probably more relevant to set this up as a goal however, as this will give you conversion rates, and all the other added benefits.

Campaign Trackig : Field to set data in google tag manager

Campaign Tracking
I have created a URL variable with Component type as Query and Query key as source. I have created Tag that fires on all page in the TAG i have enable field to set option
Fields to set
Field Name Value
campaignSource {{source_utm}} were source_utm is URL variable that I have created.
TAG is getting fired and data is getting populated. In the debug mode following data is reflecting
Filed to set {campaignSource: '123'}
URL is like this : www.xyz.com/?source=123
My Query were would I will be able to see the campaign data in GA as i am not able see the data in campaign report. Also would like to know how long it take for campaign data to get populate in GA.This are the only steps I have followed do I need to follow more other steps also .Also I would like to know how can I access Field to set data in Google Analytics report. Please advice thanks

Resources