Follow

Google Tag Manager Install (GTM Install)

 

Code for GTM the below code can be installed via Google tag manager. You will need to update the server name from the below (which is EXAMPLE) to the server name sent to you in your set up email. If you need clarification on the name of your server this is, please speak with the support team or your account manager

 

  1. Create a new tag of type ‘Custom HTML
  2. Go to your Google Analytics account and copy the JavaScript snippet
  3. Create a new tag of type ‘Custom HTML’. Name it ‘Calltracks plug in’.
  4. Paste the JavaScript snippet into the input box in GTM
  5. save

 

 

<link href="//EXAMPLE.calltracks.com" rel="preconnect">

<script>

(function()

{ e=document.createElement("script"); e.type="text/javascript",

e.async=1,

e.src="//EXAMPLE.calltracks.com/wnd/loader.js";

document.getElementsByTagName("head")[0].appendChild(e); }

)();

</script>

 

 

GDPR Compliancy Steps
 
Either of the following steps needs to be followed in order for your call tracking to be GDPR compliant if you do not follow either of the steps below the Javascript will NOT fire. We have two options which you can choose from. You will need to check with the GDPR specialist in your business who will be able to advise you of which method fits your company GDPR procedures.

Option 1 

The parameter 'force_tracking=1' can be used when calling the Calltracks 'loader.js' code. This will overwrite any subsequent settings and will ensure that your dynamic numbering will work. However, when you do install user controls, remember to remove this function or any options the user chooses will be ignored. 

Please note: You do not need to replace the whole Javascript on your website to use this option, simply add the bold section below to your existing Javascript on all pages.

Should you prefer to replace the whole piece of code with this example please replace the word Example with what is currently shown in your code. 

 

Example code:

 

<link href="//EXAMPLE.calltracks.com" rel="preconnect">

<script>

(function()

{ e=document.createElement("script"); e.type="text/javascript",

e.async=1,

e.src="//EXAMPLE.calltracks.com/wnd/loader.js?force_tracking=1";

document.getElementsByTagName("head")[0].appendChild(e); }

)();

</script>

 

Option 2


You may also implement the following via Google Tag Manager:

<script>window.calltracksCookiesAllowed = true</script> 

 

Example of a consent button that sets tracking allowed:

<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/cookie-bar/cookiebar-latest.min.js"</script>
<script>
function pollForButton() {
  btn = document.getElementById("cookie-bar-button");
  if(btn == undefined) {
    setTimeout(pollForButton, 100);
  } else {
    btn.onclick = function() { window.calltracksCookiesAllowed = true; };
  }
}
pollForButton();
</script>

 

 

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments