Insert code: Google Tag Manager

Author: Dénes Lekrinszki

Google Tag Manager is a free tool that allows you manage and deploy marketing tags (snippets of code or tracking pixels) on your website (or mobile app) without having to modify the code. A huge benefit of Tag Manager is that you, the marketer, can manage the code on your own. You can even add the Trustindex widgets in just a few steps to your website with using GTM.

The article assumes that your GTM service is already configured for your website.

Which type of widget is supported?

At the moment you can embed Floating type widget only using the GTM itself, but you can embed all of our widget types with a little bit of programming skills.

The reason is simple. Under the hood GTM can include souce codes to your footer/header by default. Thus you can not tell directly to GTM where to put your widget code. Our floating type widget is always displayed at the bottom corner of the browser window it does not matter where is its source code inserted.

How can I set the floating type?

  1. Open your Workspace and click to Add a new tag. 
  2. Click to Tag configuration then in the righ menu select Custom HTML
  3. Get your Trustindex widget source code
  4. Paste it to the HTML input box
  5. Click to the Triggering section and select All Pages
  6. At the top right corner click Submit
  7. Fill the input field then click Publish

That’s all. Now if you visit your webpage the floating widget will be there.

How can I set the remaining types?

I would like to note that this method is not simpler than inserting the Trustindex widget source code yourself.

  1. Open your webpage source code in editor mode.
  2. Get your Trustindex widget soucre code.
  3. Change the original code from this:
    <script defer async src=’https://cdn.trustindex.io/loader.js?643a6a5386fc653000599db67e’></script>
    To this:
    <div src=’https://cdn.trustindex.io/loader.js?643a6a5386fc653000599db67e’></div>
    ( As you can see the src remains the same, script becomes to div and defer async removed )
  4. Paste the <div … </div> line to your website source code where you want to diplay the widget then save the changes.
  5. Open Google Tag Manager and click to Add a new tag.
  6. Click to Tag configuration then in the righ menu select Custom HTML
  7. Paste the code below to the HTML input box
    <script defer=”” async=”” src=”https://cdn.trustindex.io/loader.js” id=”trustindex-js-js”></script>
  8. Click to the Triggering section and select All Pages
  9. At the top right corner click Submit
  10. Fill the input field then click Publish

Click here to get more guides.

Szólj hozzá!

Category: "Step by step" tutorials