Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I check if custom dimensions data is working?

I've set my custom dimension in Google Analytics and now I'd like to know if any data is coming to GA. Do I have to wait for data to show in non-real-time reports (how long does that take?), or is there another way that I can see it immediately?

This is how I send my data:

ga('set', 'dimension1', value); ga('send', 'pageview'); 
like image 509
duality_ Avatar asked Sep 24 '13 11:09

duality_


People also ask

How do I test 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 custom dimensions work?

Include non-standard data in your reports. Custom dimensions and custom metrics are like default dimensions and metrics in your Analytics account, except you create them yourself. You can use them to collect and analyze data that Analytics doesn't automatically track.

Which would prevent data from appearing in a custom report?

Answer: A filter that filters out all data.


2 Answers

If you install the Chrome Google Analytics Debugger extension, and enable it, you will be able to see all the details of track event logged to the console in a nicely readable fashion.

like image 188
micmcg Avatar answered Sep 22 '22 21:09

micmcg


An alternative to installing the chrome extension is to use this snippet, it's available in the official documentation.

window.ga_debug = {trace: true}; (function (i, s, o, g, r, a, m) {   // TODO: copy the implementation here }(window, document, 'script', '//www.google-analytics.com/analytics_debug.js', 'ga'); 

This basically writes the output of your ga operations (send, set, etc) to the console. So you'll be able to see if your hit was actually sent or ignored.

like image 39
Mouhcine Avatar answered Sep 21 '22 21:09

Mouhcine