Expand my Community achievements bar.

SOLVED

Best way to deploy 3rd party javascript container tag via DTM?

Avatar

Level 4

Hi guys,

I'm looking to integrate a 3rd party tag container across a subset of pages covered by DTM using a page load rule with appropriate path based conditions.

I've been provided with literally the url to the container js file, ie. //www.abc.com/file.js, and I'm not sure whether I should embed this as a javascript tag as is,  or a html tag with <script> tags. Being a tag container, I need to load this top of page asynchronously.

What is the best way for me to deploy this tag within DTM?

Cheers, Jez

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi Jerome/ Stephanie,

Third-party tags are set up within the 'JavaScript / Third-Party Tags’ section of the rule. To add a tag / script, first, expand the ‘Javascript/Third Party Tags’ section and click ‘Add New Script’. Then, in the text box, add a name and select the script type (Non-Sequential JavaScript, Non-Sequential HTML, Sequential JavaScript). Paste or type in the desired content into the text area and click ‘Save Code’. 

For more information on load order / script type, see help link here -https://marketing.adobe.com/resources/help/en_US/dtm/load_order.html

In general, when a vendor asks that their tag be placed top of the page asynchronously,create a Page Load Rule and specify it to be triggered at "top of the page " and use the container type as "Non Sequential Javascript"  and it will inject the script  asynchronously in <HEAD> below DTM library include script

Thanks & Regards

Parit Mittal

View solution in original post

4 Replies

Avatar

Level 10

Hi there,

Thanks for reaching out to Adobe Community.

Please go through the below link and see if it helps:

https://marketing.adobe.com/resources/help/en_US/dtm/t_third_party_tags.html

Thanks!

Avatar

Level 4

Thanks Shekhar - I'd already found that page, however that only covers the types of code offered, and not the actual detail for implementing this tag.

For example, if I'm selecting javascript do I just need to include the javascript code, vs html where I need to include the <script> tags? 

When should I use either option? Is there a suggested best practice approach?

I've already gone through the help and not found it helpful for this issue, hence my reach out to the community :)

J

Avatar

Level 1

I know that this is an older topic but I am looking for an answer to the same question.  Are there any other links that may be more beneficial?

Avatar

Correct answer by
Level 10

Hi Jerome/ Stephanie,

Third-party tags are set up within the 'JavaScript / Third-Party Tags’ section of the rule. To add a tag / script, first, expand the ‘Javascript/Third Party Tags’ section and click ‘Add New Script’. Then, in the text box, add a name and select the script type (Non-Sequential JavaScript, Non-Sequential HTML, Sequential JavaScript). Paste or type in the desired content into the text area and click ‘Save Code’. 

For more information on load order / script type, see help link here -https://marketing.adobe.com/resources/help/en_US/dtm/load_order.html

In general, when a vendor asks that their tag be placed top of the page asynchronously,create a Page Load Rule and specify it to be triggered at "top of the page " and use the container type as "Non Sequential Javascript"  and it will inject the script  asynchronously in <HEAD> below DTM library include script

Thanks & Regards

Parit Mittal