- TLC Home Home
- Discussions Discussions
- Documentation Documentation
- Knowledge Base Knowledge Base
- Education Education
- Blog Blog
- Support Desk Support Desk
12-16-2015 07:18 AM
Following the documentation on synchronous loading of Optimizely in Tealium (https://help.optimizely.com/hc/en-us/articles/206420397-Implementing-Optimizely-with-Tealium-iQ-or-E... I've implemented Optimizely successfully. But I also would like to push UDO data from Tealium to a custom tag in Optimizely. Therefor Optimizely suggests the following on https://help.optimizely.com/hc/en-us/articles/201876450#custom_tags / http://developers.optimizely.com/javascript/reference/index.html#custom-tag
<script> window['optimizely'] = window['optimizely'] || []; window['optimizely'].push(["customTag", tagKey, tagValue]);</script> <script src="//cdn.optimizely.com/js/xxxxxxxx.js">
Putting this in the tag doesn't result in the right effect:
//tealium universal tag - utag.sync ut4.0.##UTVERSION##, Copyright ##UTYEAR## Tealium.com Inc. All Rights Reserved. ##UTSYNC## document.write(' <script>window['optimizely'] = window['optimizely'] || []; window['optimizely'].push(["customTag", "lidmaatschap", u.data.Lidmaatschap]);</script> //using UDO variable lidmaatschap
<script type="text/javascript" src="//cdn.optimizely.com/js/3509580682.js></script>');
12-18-2015 05:09 PM - last edited on 12-21-2015 02:41 PM by kathleen_jo
@jeroen_visser This part should be in your utag.sync.js template:
document.write( '<script type="text/javascript" src="//cdn.optimizely.com/js/3509580682.js></scr' + 'ipt>');
The rest appears to belong in a JS Extension (outside of a document.write)
Copyright All Rights Reserved © 2008-2023