...
Info |
---|
Summary of steps
|
Code Block | ||
---|---|---|
| ||
<!-- 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://${TAGGING_URL}/${CONTAINERGTM_JS_IDFILENAME}?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','${WEBCONTAINER_ID}');</script> <!-- End Google Tag Manager --> <!-- Google Tag Manager (noscript) --> <noscript><iframe src="https://${TAGGING_URL}/${NOSCRIPT_HTML_FILENAME}?id=${WEBCONTAINER_ID}" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript> <!-- End Google Tag Manager (noscript) --> |
How to setup a sGTM tagging container with taglify.io
...
Replace
${TAGGING_URL}
with your tagging url. e.g.c3y1mavw4g.yoursite.com
Replace
${CONTAINERGTM_JS_ID}
with the container-js-idFILENAME}
and${NOSCRIPT_HTML_FILENAME}
with with the values you got from taglify.io . e.g.y16rm8ykxy.js
andsldfke274jf.html
Replace
${WEBCONTAINER_ID}
with your Web Container Id.
Code Block | ||
---|---|---|
| ||
<!-- 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://${TAGGING_URL}/${CONTAINERGTM_JS_IDFILENAME}?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','${WEBCONTAINER_ID}');</script> <!-- End Google Tag Manager --> <!-- Google Tag Manager (noscript) --> <noscript><iframe src="https://${TAGGING_URL}/${NOSCRIPT_HTML_FILENAME}?id=${WEBCONTAINER_ID}" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript> <!-- End Google Tag Manager (noscript) --> |
A fully working example might look like this:
Code Block | ||
---|---|---|
| ||
<!-- 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://c3y1mavw4gxemuncivn.yoursitekickz.com/y16rm8ykxyhj40t6q2ic.js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','GTM-AAA9FZC1234567');</script> <!-- End Google Tag Manager --> Next, add this code immediately after the opening <body> element on every page of your website. Replace GTM-XXXXXX with your container ID: <!-- Google Tag Manager (noscript) --> <noscript><iframe src="https://xemuncivn.kickz.com/infbpm1mfc.html?id=GTM-1234567" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript> <!-- End Google Tag Manager (noscript) --> |
6. In order to use the preview mode in your Google Tag Manager account, you have to configure it in the Container Settings. Open the admin panel of your container. Click on Container Settings. Click on Add URL
under Server container Urls
. Enter the tagging url. If you are not using a first-party setup, enter the tagging url you received from taglify.io .
...