Skip to main content
All CollectionsCompany Integrations
How to install your Google Tag Manager

How to install your Google Tag Manager

Updated over a year ago

For this tutorial we assume you are familiar with Google Tag Manager, Google Analytics and have conversion tracking setup. You will also need your Business ID, it will look a bit like this 01234abc-56df-7e89-0fg1-hi234j5kl1 . If you don’t know your Business ID, please get in touch.

Step 1 - Setting up the Make Influence global configuration

  1. The first thing you need to do is add your Business ID to the user-defined variables.

    1. Go to the Variables page by clicking on the ‘Variables’ link in your workspace.

    2. In the ‘User-Defined Variables’ panel, click on the ‘NEW’ button to open the new user-defined variable drawer.

    3. In the drawer that opens, name the variable ‘MI Business ID’ in the top left.

    4. In the ‘Variable Configuration’ panel click on the pencil icon in the top right, this appears when hovering over the panel, to setup the variable type.

    5. In the ‘Choose variable type’ drawer that opens, choose the ‘Constant’ type, in the ‘Utilities’ section.

    6. Back in the ‘Variable Configuration’ panel, add your Business ID.

    7. Click the save button in the top right of the drawer, to save the new variable and close the panel.

    8. You have now added your Business ID to the user-defined variables, and it should be visible in the panel.

  2. Now we need to add the Make Influence global configuration tag.

    1. Go to the Tags page by clicking on the Tags link in your workspace.

    2. In the ‘Tags’ panel, click on the ‘NEW’ button to open the new tag drawer.

    3. In the drawer that opens, name the tag ‘Make Influence global configuration’ in the top left, or a name of your choice you can easily recognise.

    4. In the ‘Tag Configuration’ panel click on the pencil icon in the top right, this appears when hovering over the panel, to setup the tag type.

    5. In the ‘Choose tag type’ drawer that opens, choose the ‘Custom HTML’ type, in the ‘Custom’ section.

    6. Back in the ‘Tag Configuration’ panel, copy and paste the following code. (If you set the user-defined variable to something other than MI Business ID in 1c. Then you will need to replace {{MI Business ID}}, with the variable name you chose)

      <script>
      (function(m,a,k,e,i,n,f) {
      if(typeof MI !== 'undefined'){return};
      m['MakeInfluenceObject']=i;m[i]=m[i]||{q:[]},
      m[i]=new Proxy(m[i],{get:function(t,p,r){return t.hasOwnProperty(p)
      ?t[p]:function(){m[i].q.push({n:p,a:arguments})}}}),n=a.createElement(k),
      f=a.getElementsByTagName(k)[0],n.async=1,n.src=e+'?'+Math.floor(new Date()
      /864e5);f.parentNode.insertBefore(n,f);
      })(window,document,'script','//scripts.makeinfluence.com/a.js', 'MI');

      MI.set('business_id', '{{MI Business ID}}');
      MI.send('pageview');
      </script>
    7. Next you need to check the ‘Support document.write’ checkbox. This is important as the configuration script will not be able to add the Make Influence tracking code without it!

    8. Now you need to set the trigger for the tag. You can do this by clicking on the pencil icon in the ‘Triggering’ panel, this appears when hovering over the panel.

    9. In the ‘Choose a trigger’ drawer that opens, choose the ‘All Pages’ trigger. This so the customer can be tracked across the whole purchase flow.

    10. Now let’s save the tag by clicking the ‘Save’ button.

    11. Congratulations, you have now setup the Make Influence global configuration.

Step 2 - Hooking into the “GA conversion” to track the conversion.

  1. To complete this step you’ll need a few of the variables from the GA conversion. Namely the order number, total value, any discount codes applied to the sale and, if available, the currency code (in ISO 4217 format).

    1. Assuming you have the tags page open (see here), click on the tag that GA conversion event, in our case it’s called ‘Google Analytics GA4 Conversion’.

    2. In the drawer that opens, in the Tag Configuration panel, there should be an Event Parameter section. Make a note of the parameter values relating to order number, Total Value (this is total order value, and the amount the influencer commission is calculated on, so be sure to exclude shipping or any other extra costs.), discount codes and currency (if applicable). In our case they are {{Order ID}}, {{Total Value}} and {{Discount Codes}}, we do not have a value for currency as all our orders are in DKK.

    3. Also make a note of the event that triggers the conversion.

    4. Close the drawer by clicking on the cross in the top left of the drawer


  2. Now let’s create the Make Influence conversion tag.

    1. In the ‘Tags’ panel, click on the ‘NEW’ button to open the new tag drawer.

    2. In the drawer that opens, name the tag ‘Make Influence conversion’ in the top left, or a name of your choice you can easily recognize.

    3. In the ‘Tag Configuration’ panel click on the pencil icon in the top right, this appears when hovering over the panel, to setup the tag type.

    4. In the ‘Choose tag type’ drawer that opens, choose the ‘Custom HTML’ type, in the ‘Custom’ section.

    5. Back in the ‘Tag Configuration’ panel, copy and paste the following code, and alter the {{Order ID}}, {{Total Value}}, {{Discount Codes}} values and, if used, the value for the currency to the values you noted down from 1b (in our case we are just using 'DKK' as a constant value).

      <script>
      MI.send('conversion', {
      unique_id: {{Order ID}},
      value: {{Total Value}},
      currency: 'DKK',
      promotion_codes: {{Discount Codes}}
      });
      </script>

    6. Now you need to set the trigger for the tag. You can do this by clicking on the pencil icon in the ‘Triggering’ panel, this appears when hovering over the panel.

    7. In the ‘Choose a trigger’ drawer that opens, choose the trigger that you noted from 1c.

    8. Now let’s save the tag by clicking the ‘Save’ button.

    9. Congratulations, you have now setup the Make Influence conversion tag.

Step 3 - Publishing the changes in Tag Manager.

  1. If you have followed Steps 1 and 2 correctly, you are ready to publish so that the tracking is available on your store.

    1. First click on the ‘Submit’ button in the top right of the Tag Manager workspace

    2. In the drawer that opens, you can optionally name the version and add a description.

    3. Click on the ‘Publish’ button in the top right of the drawer. To publish the changes.

    4. Nice work! The Make Influence tracking is set up and you are now ready to get started with your first campaign.


Did this answer your question?