Skip to main content

Setting up Orion to work with Primis

Below you will find the steps in order of how they should be completed with links to the sections below going into more detail.

Steps

  1. Have the module enabled
  2. Update Bootstrap Code
  3. Spiny Team Review

Have the module enabled

Please let the Spiny team know before proceeding so we can enable this integration's module for your bundle. Once enabled you can proceed with this integration.

Update Bootstrap Code

In order to ensure Primis impressions are counted by Spiny please update your bootstrap code in accordance with the following:

  1. Add the just-in-time minified code for Primis. This code will setup the preliminary event listeners Orion needs to capture events prior to Orion loading into the page before Orion's internal event listeners can take over.
<!-- Spiny.ai Orion Bootstrap START --->
<script>
// Add just-in-time minified code for Primis
(function(c,a,p,t,u,r,e,d){var il;c[a]=c[a]||{},c[a][p]=c[a][p]||[],c[a][t]=c[a][t]||function(x){var y=[];c[a][p].push(function(){for(var ix=0;ix<y.length;ix++){var cr=y[ix];x[r[1]].apply(x[r[1]],[cr])};c[r[1]](d,il);c[a][t](x)});var evs=x[e];for(var ix=0;ix<evs.length;ix++){var cb=(function(n){return function(){var ar=arguments;c[a][p].push(function(){c[a][u].apply(c[a][u],[x,n].concat(ar))})}})(evs[ix]);y.push(x[r[0]](evs[ix],cb))}};il=function(ev){c[a][t](ev.detail)};c[r[0]](d,il)})(window, "orion", "queue", "wrapPrimis", "delegatePrimisEvent", ["addEventListener", "removeEventListener"], "allowedEvents", "primisPlayerInit");
// ...rest of bootstrap code
</script>
<!-- Spiny.ai Orion Bootstrap END --->

Spiny Team Review

Once completed please add these changes to a staging site for our team to confirm and once approved please deploy the changes to your production environments.