Skip to main content
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
title clarity, add tag
Link
Stephen Ostermiller
  • 99.4k
  • 18
  • 141
  • 364

Custom No data appearing in custom Google Analytics report using a custom dimension goodle analytics

Source Link
Alex
  • 111
  • 3

Custom dimension goodle analytics

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: enter image description here

But I'm not getting any data e.g. some value here. Am I doing something wrong?