Accessing Google Tag Manager code snippet
Tip
This procedure is also described in Setup and install Tag Manager.
To access Google Tag Manager code snippet:
- Login to your Google Tag Manager account at tagmanager.google.com. You see a list of available containers.
- Under the Container Name list, select the container from which you want to add the script. Google Tag Manager’s container dashboard appears.
- Under the Admin tab, click Install Google Tag Manager on the right. A page displaying JavaScript snippets appears.
- Copy the first JavaScript code snippet.
See the following generalized code snippet as an example of what to copy:
<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-1234567');</script>
<!-- End Google Tag Manager -->
Previous Topic
Google Tag Manager
Next Topic
Adding Google Tag Manager snippet to Brightspot site