Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Analytics Custom Dimension Not Being Set

I've recently upgraded our site to use Universal Analytics and am trying to get some custom dimensions to work. However, no custom dimension data appears to be logged. Below is an example of my code.

ga('create', 'UA-XXXXX', 'test.com');
ga('send', 'pageview');
ga('set', 'dimension1', '149377');

Do I need to set custom dimensions before sending pageview?

like image 883
Jason Miller Avatar asked May 07 '14 21:05

Jason Miller


People also ask

Why does Google Analytics say not set?

If (not set) appears in your Google Ads reports, it means that the website or app you're tracking in the Analytics account is receiving traffic from a Google Ads account that is not linked to the reporting view.

How do I change custom dimensions in Google Analytics?

Sign in to Google Analytics. Click Admin, and navigate to the property to which you want to add custom dimensions. In the PROPERTY column, click Custom Definitions > Custom Dimensions. Click New Custom Dimension.

How do I test custom dimensions in Google Analytics?

Click the Google Tag Assistant icon. Click the property ID under Result of Tag Assistant. Click Events. Click the Custom Metrics tab to review the values of the custom dimensions and metrics.


1 Answers

A dimension is sent along with the either a page view or an event. It won't get sent by itself. So you should switch the order of the 'send' and 'set', then look in the network to see the page view call and you should see the dimension as one of the parameters.

Note that you will see the dimension data in google analytics with a delay of a day or so.

like image 142
haimlit Avatar answered Oct 30 '22 11:10

haimlit