: No data appearing in custom Google Analytics report using a custom dimension I want to send a custom dimension to google analytics to use in a custom report as per: In some cases, you
I want to send a custom dimension to google analytics to use in a custom report as per:
In some cases, you might want to send a custom dimension or metric with all the hits on a given page (or for the lifetime of the tracker object). In this case, you can set the custom dimension or metrics using the set command: ga('set', 'dimension5', 'custom data');
This is my script:
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'TRACKING-CODE', 'auto');
ga('set', 'dimension5', 'some value here');
ga('send', 'pageview');
My custom report looks like this:
But I'm not getting any data e.g. some value here. Am I doing something wrong?
More posts by @Welton855
1 Comments
Sorted by latest first Latest Oldest Best
You don't have to use a Custom Variable, in Analytics go to Admin (in the bottom of the sidebar menu) > Custom definitions > Custom dimensions and add dimension5, then you will have dimension5 available to use it as a dimension in your custom report.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.