Highlighted

data layer implementation query

Silver Contributor
Silver Contributor

Hi guys, I have beginner level question regarding implementing tealium code and data layer

 

I have a scenario where something similar to image below was implemented on the site by the previous developer of the site. The "'https://FileURL/tmsloader.min.js" file is hosted elsewhere on the site and  contains a script that has utag.js code in it.

label_1.png

I am not that familiar with data layer push method and wish to make changes by removing the data layer declaration above and replacing with the standard declaration method like the image below. I want to add properties to the data layer object. However,  I was asked to keep the TMS loader code as it is.

 

label_2.png

 

Question : Will there be any problem, with the approach above ?

 

My intention is to follow the  data layer variables decalration method  recommended by Tealium, and one which fits my understanding.

 

Thanks for comments!

 

I do NOT have an option to replace the TMS loader code above , directly with the utag.js from the code center like so:

 

<!-- Loading script asynchronously -->
<script type="text/javascript">
    (function(a,b,c,d){
    a='//tags.tiqcdn.com/utag//profile/prod/utag.js';
    b=document;c='script';d=b.createElement(c);d.src=a;d.type='text/java'+c;d.async=true;
    a=b.getElementsByTagName(c)[0];a.parentNode.insertBefore(d,a);
    })();
</script>

 

 

 

2 REPLIES 2

data layer implementation query

Bronze Contributor
Bronze Contributor

Hey hcerus,

No, you won't face any problem from data layer point of view, as data layer will exist at the time, tealium script gets loaded and tealium will be able to access the utag variables.

 

Thanks,

Rishabh

Highlighted

data layer implementation query

Silver Contributor
Silver Contributor

Thank you Rishabh!