Google Tag Manager is a container into which you can put scripts and tracking codes. You log into the Google Tag Manager admin, then you can add all your scripts within Google’s admin. Things you can track include: Google Analytics, Omniture, Comscore, and Quantcast.
Google will manage and add all of these scripts to the page for you. This will help with faster loading, and reduces conflicts between varying script tags.
NOTE: If you enable GTM on your site, and add GA into your GTM admin, it will serve GA just like you added it to the site footer.
In Flex, we have added our own setting for GTM. If GTM is enabled in Flex, the expectation is you will add your GA code via GTM.
To add Google Tag Manager, add a site setting of google_tagmanager (with a value of the GTM ID). This will add GTM to the page.
You will need to supply the ID, and will need to add tags to the tag manager admin.
WARNING: When Google Tag Manager is enabled, BLOX does NOT add Google Analytics code to template pages. Sites are required to add this to GTM themselves.
Google Optimizer and Google Tag Manager
In the event of using Tag Manager, if you define an experiment, the data layer will stop passing ga_ua. This will require you set up Tag Manager to only load Google Analytics when this variable exists to prevent double tracking. This is a requirement for Experiments. The GA code has to exist on the page for google to verify the experiment and ensures the A/B code is loaded before tracking.
NOTE: You can't use GTM to track page views and GA to run experiments at the same time. Doing so will result in double tracking of stats because the two load the GA code at different points.