Expand my Community achievements bar.

Help shape the future of AI assistance by participating in this quick card sorting activity. Your input will help create a more effective system that better serves your needs and those of your colleagues.
SOLVED

Advanced Target Implementation via DTM

Avatar

Level 10

Hello,

I would like to better understand DTM implementation options for Target. The documentation covers only the most straightforward option when Target is implemented as a Tool. However, this has a few limitations:

1) The Target library will be loaded on every single page the DTM code is deployed on. This is not good when a single DTM web property covers more than one domain while Target should be implanted on a single site or even on a limited number of site sections.

2) It is not possible to deploy different library types (at.js, mbox.js) on different pages or site sections. For example, the mbox library may be required for compatibility with AEM, while at.js for the site sections working as SPA.

Because of mentioned above the following questions appear:

  • Can the Target library be successfully implemented via Page Load Rule triggered on Top of Page if it is added as a sequential javascript?
  • If yes, will it be always executed after MCID Service?
  • If yes, could you advise where to populate mbox parameters?
1 Accepted Solution

Avatar

Correct answer by
Level 10

Mike,

Thanks for jumping in here!

Andrey,

In addition to Mike's answers, I was able to speak gather a bit more information for your consideration.

We have a help article that goes over the DTM load order here. I spoke with one of our DTM engineers about this and your question and he indicated that loading Target via Page Load Rule is definately possible. One thing you may want to consider is moving all your sites to AT.js since Google Chrome plans to start displaying warnings in the console for document.write calls on 2G networks (documentation here).

Additionally, I can report that the MCID tool will be loaded prior to the top of page Page Load Rules.

Thanks,
Jantzen

View solution in original post

4 Replies

Avatar

Level 10

just moving this question to the top in case somebody can help

Avatar

Level 5

We've used page level rules to restrict where the mbox.js loads and use a top of page sequential javascript as you suggested.  Since rules seem to fire in reverse alphabetically order, we named ours starting with ZZZ to ensure if would fire before any of our other top of page rules.  We also used a data element to control which pages this rule fired on (using either URL patterns or data layer values) though you could also use the page conditions or custom condition.

I'm not 100% sure on the MCID question but would think the answer is yes.

To create the mboxes, we created other top of page rules and dropped in 3rd party sequential HTML (as the Target Tool isn't being used). 

<div class="mboxDefault"> </div>
    <script type="text/javascript">
        mboxCreate("name of your  mbox","param1=xxx", "param2=yyy");
    </script>

We don't have Target automatically create global mboxes, so things may differ a bit in that situation.

Avatar

Correct answer by
Level 10

Mike,

Thanks for jumping in here!

Andrey,

In addition to Mike's answers, I was able to speak gather a bit more information for your consideration.

We have a help article that goes over the DTM load order here. I spoke with one of our DTM engineers about this and your question and he indicated that loading Target via Page Load Rule is definately possible. One thing you may want to consider is moving all your sites to AT.js since Google Chrome plans to start displaying warnings in the console for document.write calls on 2G networks (documentation here).

Additionally, I can report that the MCID tool will be loaded prior to the top of page Page Load Rules.

Thanks,
Jantzen

Avatar

Level 10

Thank you, Mike and Jantzen! The comments you have added are very helpful.