title: How can I clear (unset) custom dimensions from Google Analytics?
body: <p>On the "Thank You" page from an ecommerce transaction, I have used the Google Analytics tool to log the transaction. As part of this, I have used the 'set' feature to add some tracking data:</p>
  
  <pre><code>ga('require', 'ecommerce');
  ga('ecommerce:addTransaction', {
      'id': '123456',
      'affiliation': '',
      'revenue': '9.99',
      'shipping': '1.11',
      'tax': '0.00'
  });
  ga('set', {
      'dimension5': 'Mr',
      'dimension6': '1968',
      'dimension7': 'G4'
  });
  ga('ecommerce:send');
  </code></pre>
  
  <p>This is all working fine. However, I have a search box on the sidebar of all pages, which I also track using Google Analytics. Normally this behaves perfectly, but if a user has just completed a transaction and uses the search box on that page, the custom dimensions are included in the details of that event.</p>
  
  <p>How do I clear the custom dimensions completely? The API notes don't say, and the only reference I can find on a Google search recommends setting them to the empty string. This at least gets rid of the unwanted data, but the custom dimensions are still logged.</p>