2

Wondering what the right syntax would be to use multiple custom dimensions for using 'gtag' code. Here's what I have and I can only see the dimension1 working.

     gtag('config', 'UA-xxxxx', {
            'custom_map': {'dimension1': 'year', 'dimension2': 'id', 'dimension3': 'presentation_title'}
          });

     // Sends the custom dimension to Google Analytics.
     gtag('event', 'Video', {
          'event_category': 'Play',
          'event_label': 'url', 
          'year': 'year',
          'id': 'video-id',
          'presentation_title': 'blah blah'
     });

How do I get the dimension1 -3 working and show up in my Google Analyticis? Thanks!

missgg
  • 93
  • 2
  • 12
  • This thread is duplicated, you can see the answer to the same question here https://stackoverflow.com/questions/50552141/gtag-multiple-custom-dimensions/50562336#50562336 – Kemen Paulos Plaza Jul 26 '18 at 07:41
  • @KemenPaulosPlaza It's not duplicated thread. In this issue everything is done according to the Google documentation (and to the link that you added), but doesn't work. I had the same problem and solved it via GTM, but question remains open. – zborovskaya Jul 27 '18 at 07:43
  • @zborovskaya I understand what you says, I tested the code in a blank page and the CD reaches the tool. The map is correct and the definitions of the vars too. The pageviews goes with no CD, the event goes with CD, and the futures hits will not carry the CD. Is that your expected behaviour? – Kemen Paulos Plaza Jul 27 '18 at 11:45
  • @KemenPaulosPlaza In my case I needed to send CDs with page view: `ClientID` and `UserID`. The first (cd1) - ok, the second sends in about 10% of cases. Just `UserID` sends without problems, but `UserID` as a cd2 - not. – zborovskaya Jul 27 '18 at 12:49

0 Answers0