Setting up Orion to work with Taboola
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 Taboola impressions are counted by Spiny please update your bootstrap code in accordance with the following:
- Add
"handleTaboolaRenderEvent"
to theorionMethods
array.
<!-- Spiny.ai Orion Bootstrap START --->
<script>
// Add "handleTaboolaRenderEvent" to orionMethods
var orionMethods = ["init","registerPost","report","newPageView","setContext", "handleTaboolaRenderEvent"];
(function(s,p,i,n,y){s[i]=s[i]||{queue:[]};for(var x=0;x<n.length;x++){(function(m){s[i][m]=s[i][m]||function(){var a=arguments;s[i].queue.push(function(){s[i][m].apply(s[i],a)})}})(n[x])}if(y){var e=p.createElement("script");e.type="text/javascript";e.async=true;e.src=y;var f=p.getElementsByTagName("script")[0];if(f){f.parentNode.insertBefore(e,f)}else{var d=p.getElementsByTagName("head")[0];if(d){d.appendChild(e)}}}})(window,document,"orion",orionMethods,null);
orion.init(...)
</script>
Add Taboola Render Event Listener
Please ensure the following code is ran after the bootstrap code but before Taboola's processes start.
<script>
// Add global Taboola event listner
window._taboola = window._taboola || [];
window._taboola.push({listenTo: "render",handler: orion.handleTaboolaRenderEvent});
</script>
This will ensure Orion can properly register render events and further listen for viewable impression events for Taboola ad units.
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.