Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Goal: A container linked to your Google Tag Manager is configured and running.

tl;dr

  1. Create a Google sGTM container on tagmanager.google.com and check the option “Manually provision tagging server”.

  2. Copy the container Config String.

  3. Copy the Container Id

  4. Write a ticket to Ingenious with the following information:

    • Container Id

    • Container Config String

Done!

Additionally:

If you want to use a first-party domain:

  • Add your first party domain to the ticket

  • Set an A Record with your registrar to 34.117.47.164

If you want to use the preview mode in Google Tag Manager:

  • Set the tagging domain in the container settings.

To load the tags via our infrastructure you have to make the following changes to the script on your page.

  1. Replace TAGGING-URL with your tagging url. e.g. magic.yourdomain.com

  2. Replace CONTAINER-JS-ID with gtm.js or with the container-js-id you got from Ingenious. e.g. asodhsa.js

  3. Replace WEBCONTAINER-ID with the GTM container ID of your web container.

<!-- 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/CONTAINER-JS-ID.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','WEBCONTAINER_ID');</script>
<!-- End Google Tag Manager -->

How to setup a sGTM tagging container with ingenious

1. Go to tagmanager.google.com and log in. → In the Container section, click the plus symbol. → Add the name of the container. → In the Target platform, choose Server.

2. Select "Manually provision tagging server," then copy and paste your container setup into any text editor. We'll need it for the following steps.

3. Note the long string in the field "Your Container Config is:". Also make a note of your Container Id. You can find this at https://tagmanager.google.com/#/home.

4. Write a ticket to Ingenious sGTM Service Center with the following information.

  • Container Id

  • Container Config String

  • (first party-domain)

4.1 This step is strongly suggested, but it is not needed. When the container is up and running, you'll notice the Tagging Server URL, which is by default within the Server-Side Tagging Made Easy domain provided by Ingenious sGTM. Setting up a custom domain within your site's domain is highly recommended. It will enable you to set first-party cookies, making tracking more secure and resistant. Send your FirstParty Domain that you want to use for the setup with the ticket. After that, create an A record that corresponds to the IP address 34.117.47.164 The DNS settings should look like the one in the screenshot.

It may take up to 72 hours to verify the domain, however in most situations it will be done in 3-4 hours.

Once the domain has been verified, the tagging server is ready to go, and you can move on to the sGTM configuration.

5. Google strongly advises that you update your site's WEB GTM code. It's ideal if you use your own domain instead of www.googletagmanager.com. Make certain you didn't delete /gtm.js.

Updating your web GTM code allows gtm.js to be loaded from your domain:

  • Replace TAGGING-URL with your tagging url. e.g. magic.yourdomain.com

  • Replace CONTAINER-JS-ID with gtm.js or with the container-js-id you got from Ingenious. e.g. asosa.js

  • Replace WEBCONTAINER-ID with the GTM container ID of your web container.

<!-- 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/CONTAINER-JS-ID.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','WEBCONTAINER_ID');</script>
<!-- End Google Tag Manager -->


A fully working example might look like this:

<!-- 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://magic.mydomain.com/asdjojoe.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-AAA9FZC');</script>
<!-- End Google Tag Manager -->

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 firstparty setup, enter the tagging url you received from ingenious.

7. That end our topic. The sGTM container has been set up. You may now start configuring server-side tagging in sGTM.

Conclusion

Ingenious Google Tag Manager hosting is the most convenient and cost-effective option available. Many options are available to make your tagging experience simple and uncomplicated, allowing you to focus on what matters most: proper tracking.

  • No labels