I'm having trouble using gtag to send to custom dimensions. I'm currently following their gtag documentation.
Screenshot of the custom dimensions created for my google analytics property
Right now I currently initialize my gtag in the head with the following code:
%script{:async => "", :src => "https://www.googletagmanager.com/gtag/js?id=#{APP_CONFIG[:ga_tracking_code]}"}
:javascript
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', '#{APP_CONFIG[:ga_tracking_code]}', {
'custom_map': {
'dimension1': 'user_type'
'dimension2': 'organization_id'
}
});
Events are currently logged like this
gtag('event', 'test_event', {
'event_category': 'test_category',
'organization_id': 'test_org',
'user_type': 'test_user_type'
});
Looking forward to responses as I have not made progress figuring this out for the past two days.