As part of continual improvements to our infrastructure, we've updated the content delivery network that serves our JavaScript SDK to your users, along with optimisations to the way our JavaScript tag executes on the page.

This update improves performance for you users: it reduces the size of the downloaded JavaScript by up to 50% and improves network latency and queueing times. The impact of this will be reflected by Permutive executing and updating targeting data faster, leading to increased targetable inventory (e.g. in DFP).

For older versions of our JavaScript tag, we have set a sunset date of September 30th 2018, when we'll no longer continue to support these versions. Please update your tag before this date.

Replacing your existing Permutive JavaScript snippet

To update your Permutive JS tag, you will need to replace the existing tag with the following updated tag.

<script>!function(n,e,o,r,i){if(!e){e=e||{},window.permutive=e,e.q=[],e.config=i||{},e.config.projectId=o,e.config.apiKey=r,e.config.environment=e.config.environment||"production";for(var t=["addon","identify","track","trigger","query","segment","segments","ready","on","once","user","consent"],c=0;c<t.length;c++){var f=t[c];e[f]=function(n){return function(){var o=Array.prototype.slice.call(arguments,0);e.q.push({functionName:n,arguments:o})}}(f)}}}(document,window.permutive,"<PROJECT_ID>","<API_KEY>",{});
</script>
<script async src="https://cdn.permutive.com/<PROJECT_ID>-async.js"></script>

Please note <PROJECT_ID>  and <API_KEY> must be replaced with your Permutive project's ID and a public API key, respectively.

  • <PROJECT_ID>: This is the 36-character string passed as the first argument to permutive.init  in your existing snippet. You can also find this under Project ID in the Settings section for your project in our dashboard.
  • <API_KEY> : This is the 36-character string passed as the second argument to permutive.init  in your existing snippet. You can also find this value by choosing one of your public keys in the SettingsKeys section for your project in our dashboard.

Many of our customers insert their own page properties into the Permutive tag. This is where the following code appears at the end of the script:

permutive.addon("web", { page: {
  // Page properties here
}});

If your tag includes page properties, your code for this should remain unchanged - you should keep this code at the end of the first <script>  element.

You will need to update your tag on every site/domain where Permutive is deployed.

This article assumes that you already have a Permutive project and have been provided our JavaScript tag for deployment on site. If this is not the case, then please get in touch!

Did this answer your question?