Follow

Personalization Engine Setup with Tealium Async tags

Instructions for implementing Personalization manager can be found here:

https://getstarted.sailthru.com/site/personalization-engine/pe-setup/

 

But because some tag managers may load JavaScript that Personalization Manager also relies on, you may need to customize this code. If your site uses Tealium in async mode, you may need to implement the tag in this manner:

 

 

// Sets up JS
require.config( {
paths:

{ "Sailthru": "https://ak.sail-horizon.com/spm/spm.v1.min", }

,
waitSeconds: 300,
shim: {
Sailthru:

{ exports: 'Sailthru' }

,
}
});

// Executes JS
require(["Sailthru"], function (Sailthru) {
console.log("Edit this file to use SPM onsite!");
var client_id = '<INSERT CLIENT ID>';
Sailthru.init(

{ customerId: client_id}

);
});

 

 

An example of Tealium tags in async mode:

 

 

<!-- Async Load of Tealium utag.js library -->
<script type="text/javascript">
(function(a,b,c,d)

{ a="//tags.tiqcdn.com/utag/<account>/<site>/prod/utag.js"; b=document;c="script";d=b.createElement(c);d.src=a;d.type="text/java"+c;d. <URL> async=true; a=b.getElementsByTagName(c)[0];a.parentNode.insertBefore(d,a); }

)();
</script>

 

 

An example of non-async Tealium tags:

 

 

<script type="text/javascript">
(function($)

{ if ("<account>" in $ && "utagClassic" in $.<account>) $.<account>.utagClassic.initialize("//tealium.hs.llnwd.net/o43/utag/<account>/<site>/prod/utag.js"); }

 

 

Top