Setting up Orion to work with STN
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
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 STN impressions are counted by Spiny please update your bootstrap code in accordance with the following:
- Add the just-in-time minified code for STN. 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 STN
(function(t,r,a,c,k,v,i,d,e,o,s){t[r]=t[r]||{},t[r][a]=t[r][a]||[];var n=new WeakMap(),z=[],f;t[r][c]=t[r][c]||function(x){t[r][a].push(function(){f&&t[d](e,f);for(var w=0;w<z.length;w++){var l=z[w];x[d](l[0],l[1])};t[r][c](x)});for(var j=0;j<v.length;j++){var u=v[j],h=(function(b){return function(){var w=arguments;t[r][a].push(function(){t[r][k].apply(t[r][k],[x,b].concat(w))})}})(u);x.on(u,h);z.push([u,h])}};f=function(){var w=t[o][s]();for(var j=0;j<w.length;j++){var g=w[j];n.has(g)||(n.set(g,1),t[r][c](g))}};t[i](e,f)})(window,"orion","queue","wrapSTN", "delegateSTNEvent",["ready","play","pause","seek","videoComplete","videoError","videoChange","fullScreenChange","playerError", "nextVideo","playerSetupError","adImpression","adError","adPlay","adComplete","adSkipped","adPaused"],"addEventListener","removeEventListener","voltaxPlayerLoaded","voltax","getAllPlayersOnPage");
// ...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.