Reputation: 5950
I am sending custom persistent values to Google analytics using gtag
as per the following documentation
I am setting the custom value when I have the information available after an API call.
So on page load I do gtag('config', 'GA_TRACKING_ID_1');
and once I have the data from an API call I do gtag('set', { tenantName: '<tenant_name_from_response>' });
Now my question is where do I see this parameter country in my Google analytics report? Or do I need to do something special to see it?
Thanks in advance!
Upvotes: 1
Views: 516
Reputation: 1570
The code presented is not sending the information right now. The code is not mapping the Custom Dimension, the pageview script should look like this
gtag('config', 'GA_TRACKING_ID', {
'custom_map': {'dimensionXX': 'tenantName'} //remplace the X for the correct index
});
The index is given to you when you create the custom dimension on the platform, on the Property Tab admin.
Upvotes: 1