title: Solving configuration mismatch between Google Analytics and Google Optimize?
body: <p>So I'm using Google Analytics, Google Optimize, and Google Tag Manager. I also  feel that I may be losing my mind. </p>
  
  <p>For performance reasons, we don't want to add the google optimize script through GTM. We want to hard-code it. But every time I try that, the installation doesn't work. Specifically, when I click "Run Diagnostics" on the google optimize setup page, I get an error that says </p>
  
  <blockquote>
    <p>All Analytics tracking code on the page must have the same tracker configuration settings. [...] The following tracker configuration properties do not have the same configurations: <strong>alwaysSendReferrer.</strong></p>
  </blockquote>
  
  <p>So I go into my handy Analytics debugger, find the <code>alwaysSendReferrer</code> property, and note that it's set to <code>true</code>. Great. I edit the config object that i'm passing to the google optimize init script, and I add <code>alwaysSendReferrer: true</code>. So far so good. Except... I get the same error.</p>
  
  <p>I thought maybe something was wrong with our analytics setup, so I got rid of the hardcoded google optimize script and instead included it via the Google Optimize GTM tag -- which, unexpectedly, worked perfectly. I thought "Okay i'll just find the script that GTM is adding and copy/paste it into the codebase" but of course it's minified within an inch of its life, and untangling that javascript from the rest of the tags would be a whole other endeavor. </p>
  
  <p>I have access to a <code>{{Default UA Settings}}</code> variable in GTM, and google's documentation would really like me to just pass that object to the official "Google Optimize" tag in GTM. That works (I've tested it), but as mentioned, we don't want to do that. </p>
  
  <p>If anyone knows what the Google Optimize config object <em>should</em> look like, that would help me massively.</p>
  
  <p>Right now mine looks like this (with identifying details removed)</p>
  
  <pre class="lang-js prettyprint-override"><code>dataLayer.push(['config', 'UA-12345', {
      'optimize_id': 'GTM-55555',
      'linker': { 'domains': ['mywebsite.com &lt;http://mywebsite.com&gt;'] },
      'alwaysSendReferrer': true
  });
  </code></pre>
  
  <p>I've tried <code>false</code>, <code>"true"</code>, <code>1</code>, and basically everything else I can think of (I'm quite confident that Google Analytics has this property set to true on our site) -- my only guess is that maybe I'm setting the value in the wrong place and google optimize isn't seeing it. Help?</p>