2

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.

1

This is fine. You end up having your custom dimension associated with that session thanks to your event hit. You are not sending dimension value on your pageview.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.