Highlighted

Tealium Custom Container: Ability to add data-* metatag to the script tag for the Tag code.

Bronze Contributor
Bronze Contributor

Hi,

 

I am working to create a custom Tag template to load and execute Dynatrace Tag on my application pages. Dynatrace wants the files loaded with script tag metatag data-*. I dont see any way in tealium where I can provide or update meta tag. Even if I mdify the template it doesnt work.

 

Load this file on application page 

https://js-cdn.dynatrace.com/jstag/147f273fa2a/ruxitagent_2SVfgjqrx_10129170927131437.js

 

It should be injected on page as:

 

<script type="text/javascript" src="https://<domain>/ruxitagent_2SVfgjqrx_10129170927131437.js" data-dtconfig="app=EE65AC73D852ECA6|cors=1|featureHash=2SVfgjqrx|lastModification=0|dtVersion=10129170927131437|reportUrl=https://bf68934zep.bf.dynatrace.com/bf|tp=500,50,0,1" crossorigin="anonymous"></script>

 

Any help would be appreciated.

 

 

2 REPLIES 2
Highlighted

Tealium Custom Container: Ability to add data-* metatag to the script tag for the Tag code.

Gold Contributor
Gold Contributor

Hello @amit_ranjan,

 

I'd recommend you to have a look at below Post which is similiar to DynaTrace tag be added to the head of the page.

 

https://community.tealiumiq.com/t5/Tealium-iQ-Tag-Management/Is-it-possible-to-add-a-tag-to-the-head...

 

I believ it helps to proceed further. Thanks!

 

 

Highlighted

Tealium Custom Container: Ability to add data-* metatag to the script tag for the Tag code.

Tealium Employee

Hi @amit_ranjan

 

If you are using the Custom Container and using the u.loader or the utag.ut.loader methods to load the script you can use the attrs property to add data to the script tag.

 

Example:

 

utag.ut.loader({attrs : {"data-something" : "somedata"}, src : "/blanks.js"});

 

This will add the HTML:

 

ut_loader.png

 

Hope this helps,

Adrian 

Ask me anything Tealium related or Javascript, or NodeJS.
Please remember to mark solutions as accepted for future searchers.