Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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

Info

tl;dr

  • Add your first party domain to the ticket

  • Set an A Record with your registrar to
    1. Create a Google sGTM container on tagmanager.google.com and check the option “Manually provision tagging server”.

    2. Copy the container Container Config String.

      1. Example: aWQ9R1ABLVdISjlGWkMmZW52PTEmYXV0aD1VUzlrbVhlUWxtcElyVzhENEJBeGxn

    3. Copy the Web 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:

    To load the tags via our infrastructure
    1. (Attention: This is not the ID of the server-side container)

      1. Example: GTM-WHJ8FZC

    2. In order to improve tracking quality by running sGTM on your own domain, choose a sub-domain of your main domain. The sub-domain should be random (use this website to generate a random string: Random.org)

      1. Example: c3y1mavw4g.yoursite.com

    3. Set an A record with your registrar to

      1. Hostname: c3y1mavw4g.yoursite.com

      2. Type: A

      3. TTL: 60

      4. Data: 34.117.47.164

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

    • Set the tagging domain in the container settings.

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

      • Container Config String

      • Web Container Id

      • Your Sub-Domain (c3y1mavw4g.yoursite.com in our example)

    2. To load the gtm-javascript code via your sgtm-container you have to make the following changes to the script on your page.

      1. Replace ${TAGGING

      -
      1. _URL} with your tagging url. e.g.

      magic
      1. c3y1mavw4g.

      yourdomain
      1. yoursite.com

      2. Replace ${CONTAINER

      -
      1. _JS

      -
      1. _ID} with

      gtm.js or
      1. with the container-js-id you got from Ingenious. e.g.

      asodhsa
      1. y16rm8ykxy.js

      2. Replace ${WEBCONTAINER

      -
      1. _ID} with

      the GTM container ID of your web container
      1. your Web Container Id.

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

      1. Set the tagging domain (c3y1mavw4g.yoursite.com in our example) in the container settings.

    Code Block
    languagejs
    <!-- 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 -->

    ...

    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 and copy and paste your container setup your Container Config String 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 Web Container Id. You can find this at https://tagmanager.google.com/#/home.

    ...

    • Container Id

    • Container Config String

    • (first party-domain)Your custom sub-domain, so that tagging runs in a first-party context

    4.1 This A custom sub-domain step is strongly suggested, but it is not needed. When the container is up and running, we’ll provide you 'll notice with the default 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. The sub-domain should be random (use this website to generate a random string: Random.org). 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.

    ...

    Once the domain has been verified by us, 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. magicc3y1mavw4g.yourdomainyoursite.com

    • Replace ${CONTAINER-_JS-_ID} with gtm.js or with the container-js-id you got from Ingenious. e.g. asosa y16rm8ykxy.js

    • Replace ${WEBCONTAINER-_ID} with the GTM container ID of your web containeryour Web Container Id.

    Code Block
    languagejs
    <!-- 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 -->

    ...

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

    ...