title: Google enhanced Analytics > Custom dimensions not tracked
body: <p>We have a website that uses enhanced analytics. On the page where a list of products is viewed the tracking code looks like this:</p>
  
  <pre><code>window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
  ga.l = +new Date;
  ga('create', 'xxxxxx', 'auto', {
      anonymizeIp: true
  });
  
  ga('require', 'ec');
  ga('set', 'currencyCode', 'EUR');
  ga('ec:addImpression', {
      'id': '5',
      'name': 'Lorem Ipsum',
      'category': 'Lorem',
      'list': 'lorem-list',
      'dimension1': '15',
      'dimension2': 'Lorem'
  });
  ga('ec:addImpression', {
      'id': '6',
      'name': 'Lorem Ipsum',
      'category': 'Lorem',
      'list': 'lorem-list',
      'dimension1': '16',
      'dimension2': 'Lorem'
  });
  ga('ec:addImpression', {
      'id': '7',
      'name': 'Lorem Ipsum',
      'category': 'Lorem',
      'list': 'lorem-list',
      'dimension1': '17',
      'dimension2': 'Lorem'
  });    
  ga('send', 'pageview');
  </code></pre>
  
  <p>The impressions are measured correctly (id, name, category, list etc) but the custom dimensions (dimension1 and dimension2) seem to be null for all measurements (been gathering for 3 weeks now). </p>
  
  <p>As far as I can see the code is exactly as stated in the documentation: <a href="https://developers.google.com/analytics/devguides/collection/analyticsjs/enhanced-ecommerce#measuring-activities" rel="noreferrer">https://developers.google.com/analytics/devguides/collection/analyticsjs/enhanced-ecommerce#measuring-activities</a></p>
  
  <p>What am I overseeing?</p>
  
  <p>Update: As requested the (anonymised) debug log using chrome GA:debug where it seems the dimensions are provided correctly:</p>
  
  <pre><code>analytics_debug.js:10 Running analytics_debug.js. This script is intended for testing and debugging only.
  log @ analytics_debug.js:10
  J @ analytics_debug.js:9
  (anonymous) @ analytics_debug.js:76
  (anonymous) @ analytics_debug.js:76
  analytics_debug.js:10 Initializing Google Analytics.
  analytics_debug.js:10 Loading resource for plugin: ec
  analytics_debug.js:10 Loading script: "https://www.google-analytics.com/plugins/ua/ec.js"
  analytics_debug.js:10 Running command: ga("create", "UA-xxx-1", "auto", {anonymizeIp: true})
  analytics_debug.js:10 Creating new tracker: t0
  analytics_debug.js:10 Auto cookieDomain found: "myclient.nl"
  analytics_debug.js:10 This field cannot be set in a create method. Please use ga("set", "anonymizeIp", true);
  log @ analytics_debug.js:10
  J @ analytics_debug.js:9
  Td @ analytics_debug.js:13
  ad @ analytics_debug.js:51
  Z.create @ analytics_debug.js:69
  Y.b.(anonymous function) @ analytics_debug.js:38
  jf.R @ analytics_debug.js:68
  jf.H @ analytics_debug.js:66
  Z.P @ analytics_debug.js:73
  cd @ analytics_debug.js:59
  A @ analytics_debug.js:59
  (anonymous) @ analytics_debug.js:76
  (anonymous) @ analytics_debug.js:76
  analytics_debug.js:10 Running command: ga("require", "ec")
  analytics_debug.js:10 Waiting on require of "ec" to be fulfilled.
  analytics_debug.js:10 Registered new plugin: ga(provide, "render", Function)
  analytics_debug.js:10 Running command: ga("require", "ec")
  analytics_debug.js:10 Waiting on require of "ec" to be fulfilled.
  analytics_debug.js:10 Executing Google Analytics commands.
  analytics_debug.js:10 Registered new plugin: ga(provide, "ec", Function)
  analytics_debug.js:10 Running command: ga("require", "ec")
  analytics_debug.js:10 Plugin "ec" intialized on tracker "t0".
  analytics_debug.js:10 Running command: ga("set", "currencyCode", "EUR")
  analytics_debug.js:10 Running command: ga("ec:addImpression", {id: "1", name: "xxxx", category: "xxx", list: "xxxx", dimension1: "7", dimension2: "xxx"})
  analytics_debug.js:10 Running command: ga("ec:addImpression", {id: "2", name: "xxxx", category: "xxx", list: "xxxx", dimension1: "7", dimension2: "xxx"})
  analytics_debug.js:10 Running command: ga("ec:addImpression", {id: "3", name: "xxxx", category: "xxx", list: "xxxx", dimension1: "7", dimension2: "xxx"})
  analytics_debug.js:10 Running command: ga("ec:addImpression", {id: "7", name: "xxxx", category: "xxx", list: "xxxx", dimension1: "7", dimension2: "xxx"})
  analytics_debug.js:10 Running command: ga("ec:addImpression", {id: "8", name: "xxxx", category: "xxx", list: "xxxx", dimension1: "7", dimension2: "xxx"})
  analytics_debug.js:10 Running command: ga("send", "pageview")
  analytics_debug.js:10 
  Sent beacon:
  
  analytics_debug.js:10 _j1                                              (&amp;jid)       
  analytics_debug.js:10 adSenseId                                        (&amp;a)         xxxxxxxxx
  analytics_debug.js:10 apiVersion                                       (&amp;v)         1
  analytics_debug.js:10 clientId                                         (&amp;cid)       xxxxxxxxx
  analytics_debug.js:10 currencyCode                                     (&amp;cu)        EUR
  analytics_debug.js:10 ec:impression list "1" name                      (&amp;il1nm)     xxx
  analytics_debug.js:10 ec:impression list "1" product "1" category      (&amp;il1pi1ca)  xxx
  analytics_debug.js:10 ec:impression list "1" product "1" dimension "1" (&amp;il1pi1cd1) 7
  analytics_debug.js:10 ec:impression list "1" product "1" dimension "2" (&amp;il1pi1cd2) xxx
  analytics_debug.js:10 ec:impression list "1" product "1" id            (&amp;il1pi1id)  1
  analytics_debug.js:10 ec:impression list "1" product "1" name          (&amp;il1pi1nm)  xxx
  analytics_debug.js:10 ec:impression list "1" product "2" category      (&amp;il1pi2ca)  xxx
  analytics_debug.js:10 ec:impression list "1" product "2" dimension "1" (&amp;il1pi2cd1) 7
  analytics_debug.js:10 ec:impression list "1" product "2" dimension "2" (&amp;il1pi2cd2) xxx
  analytics_debug.js:10 ec:impression list "1" product "2" id            (&amp;il1pi2id)  2
  analytics_debug.js:10 ec:impression list "1" product "2" name          (&amp;il1pi2nm)  xxx
  analytics_debug.js:10 ec:impression list "1" product "3" category      (&amp;il1pi3ca)  xxx
  analytics_debug.js:10 ec:impression list "1" product "3" dimension "1" (&amp;il1pi3cd1) 7
  analytics_debug.js:10 ec:impression list "1" product "3" dimension "2" (&amp;il1pi3cd2) xxx
  analytics_debug.js:10 ec:impression list "1" product "3" id            (&amp;il1pi3id)  3
  analytics_debug.js:10 ec:impression list "1" product "3" name          (&amp;il1pi3nm)  xxx
  analytics_debug.js:10 ec:impression list "1" product "4" category      (&amp;il1pi4ca)  xxx
  analytics_debug.js:10 ec:impression list "1" product "4" dimension "1" (&amp;il1pi4cd1) 7
  analytics_debug.js:10 ec:impression list "1" product "4" dimension "2" (&amp;il1pi4cd2) xxx
  analytics_debug.js:10 ec:impression list "1" product "4" id            (&amp;il1pi4id)  7
  analytics_debug.js:10 ec:impression list "1" product "4" name          (&amp;il1pi4nm)  xxx
  analytics_debug.js:10 ec:impression list "1" product "5" category      (&amp;il1pi5ca)  xxx
  analytics_debug.js:10 ec:impression list "1" product "5" dimension "1" (&amp;il1pi5cd1) 7
  analytics_debug.js:10 ec:impression list "1" product "5" dimension "2" (&amp;il1pi5cd2) xxx
  analytics_debug.js:10 ec:impression list "1" product "5" id            (&amp;il1pi5id)  8
  analytics_debug.js:10 ec:impression list "1" product "5" name          (&amp;il1pi5nm)  xxx
  analytics_debug.js:10 encoding                                         (&amp;de)        UTF-8
  analytics_debug.js:10 hitType                                          (&amp;t)         pageview
  analytics_debug.js:10 javaEnabled                                      (&amp;je)        0
  analytics_debug.js:10 language                                         (&amp;ul)        en-us
  analytics_debug.js:10 location                                         (&amp;dl)        https://www.myclient.nl/xxxx
  analytics_debug.js:10 screenColors                                     (&amp;sd)        24-bit
  analytics_debug.js:10 screenResolution                                 (&amp;sr)        1680x1050
  analytics_debug.js:10 title                                            (&amp;dt)        xxxxx - myclient
  analytics_debug.js:10 trackingId                                       (&amp;tid)       UA-xxxx-1
  analytics_debug.js:10 viewportSize                                     (&amp;vp)        1610x494
  </code></pre>