I am trying to set value for custom dimension in google analytics for my website

124 views
Skip to first unread message

bhavya158

unread,
Oct 20, 2015, 4:21:18 PM10/20/15
to google-analytics-analyticsjs

I'm new to google analytics and i don't realize how make it works.


We have a website and we want to capsture the customerId as custom variable in google analytics in order to analyze the behavior of each user with the site.


For this, i start to use google analytics (analytics.js) a few days ago and i created a custom dimension (to know who user access).


The dimension was created with session scope because those values must be sent once per session.


After that, i add the code needed as is explained here:


ga('create', 'UA-#######-1', 'domain.com');

ga('send', 'pageview', { 'dimension1': '<%Convert.ToString(Session["SelectedCustomerID"]);%>' });



I've tried this code and others configurations but google analytics doesn't take the values.


What i'm doing bad? Please suggest me a way to capture the information.

Philip Walton

unread,
Oct 20, 2015, 8:44:37 PM10/20/15
to bhavya158, google-analytics-analyticsjs
How do you know it doesn't take the values?

Also, you should look into using the User ID feature in Google Analytics if you have an ID that you're already using. You'll still need to set the custom dimension if you want to report on it, but it'll help ensure that your sessions align to their correct users more accurately.


--
You received this message because you are subscribed to the Google Groups "google-analytics-analyticsjs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-analytics-ana...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-analytics-analyticsjs/12f05a87-3ec8-409f-9f3a-589dc528188f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

bhavya kolakaluru

unread,
Oct 21, 2015, 12:34:57 PM10/21/15
to Philip Walton, google-analytics-analyticsjs
Thank you so much for your response.

I don't see values under my custom dimensions (GA).

Please help me.

Regards,
Bhavya
Reply all
Reply to author
Forward
0 new messages