I have recently set up Google Analytics on my site with gtag. I have created 1 dimension, store_name. I have added the code to send the dimension value right after the function call like so:

gtag('config', 'UA-1111111111-1', {
    'custom_map': {'dimension1': 'store_name'}
gtag('event', 'store_name_dimension', {'store_name': 'name1'});

Using the chrome extension, i see that dimension1 is set to undefines.

ga("gtag_UA_111111111_1.send", "pageview", {forceSSL: true, &gtm: "u5o", hitCallback: [function], dimension1: undefined})

But a little lower down i see that the dimension is being called correct.

ga("gtag_UA_11111111_1.send", "event", {dimension1: "name1", forceSSL: true, &gtm: "u5o", hitCallback: [function], eventCategory: "general", eventAction: "store_name_dimension"})

How can i validate that it is sending the dimension value to the admin panel? Is this the correct way to send the dimension? Any help would be appreciated.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.