I’m setting a custom dimension in my Google Analytics tracking code, however I see a strange error in the Chrome console with the Google Analytics debugger turned on.
This is my code that runs on every page. I report the regional account, as well as the global account with the drive, and for this I created two trackers.
<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', 'UA-85521872-1', 'auto', 'crmpiccoglobal');
ga('create', 'UA-85521872-3', 'auto', 'crmpiccoregion');
ga('set', 'dimension1', 'premium');
ga('crmpiccoglobal.send', 'pageview');
ga('crmpiccoregion.send', 'pageview');
</script>
In the console, I see the following:
Run command: ga ("set", "dimension1", "premium")
analytics_debug.js: 10 The command is ignored. Unknown target: undefined
I created a custom dimension in GA for each property that I want to access.