[Branda] Google Optimize – add field on Branda's UA Tracking ID page, to insert GTM Optimize

I was going through Analytics & Tag Manager… and started playing with Google Optimize, and noticed that adding in the Optimize GTM code can be done with a very small Universal Analytics code modification.

Please see below, and note the small “, { ‘optimize_id’: ‘GTM-XXXXXXX’}” code insert.
(the following is a direct copy/paste from how to use the Google Optimize code snippet)


Optimize Snippet Installation
Optimize is installed by adding a small snippet of code to your website to display Optimize experiences (tests and personalizations) to your visitors. Learn more .
If you use Global Site Tag (gtag.js) to deploy Google Analytics, simply add the Optimize snippet to the config line.

<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-XXXXXXXX-1"></script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());

gtag('config', 'UA-XXXXXXXX-1', {'optimize_id': 'GTM-XXXXXXX'});

Paste the updated tag at the top of the <HEAD> on every web page you wish to personalize and test.
– If you use Google Tag Manager (GTM), learn more about how to use it with Optimize.
– If you use Universal Analytics (analytics.js), learn more about how to use it with Optimize.
– Optional: If you encounter page flickering issues you can install the anti-flicker snippet .