DTM change pageBottom() behavior or else add a new/custom callback event

Avatar

Avatar

joshd7227840

MVP

Avatar

joshd7227840

MVP

joshd7227840
MVP

17-04-2014

Okay so here's the problem,

 

Summary: Allow for DTM to load a tool but not output the "trigger" code.

 

Many sites are setup to output content and libraries and other resources in a progressive manner.  For example, when you use angular.js framework. 

 

The issue with this vs. DTM is that a lot of things happen after DTM does its thing, even pageBottom() stuff.   This is particularly problematic as far as being able to set Data Elements. 

 

For example, I add Adobe Analytics tag to DTM.  I also add code to pop Data Elements so that I can in turn use the DTM forms to populate s.prop1 or whatever.  However, because of the nature of certain frameworks like angular.js that make AJAX calls for resources after the page is fully loaded, DTM provides no way to hold off triggering the Adobe Analytics call until I explicitly specify it.  My choices are to make it pop on page top or page bottom (when _satellite.pageBottom() is triggered) and that's it.  

 

I *thought* I could just put _satellite.pageBottom() in a callback function withing the angular.js framework but this doesn't work.  Apparently the core DTM code will trigger page bottom stuff on dom ready if pageBottom() hasn't already been called.  Why it does this I have no idea but this would have been a simple solution if it didn't do it.  

 

So my first suggestion would be to change the behavior of "page bottom" to only trigger when _satellite.pageBottom() is explicitly called.  Maybe have a checkbox in DTM to specify this so that user gets an option for it?

 

Failing that,  I suggest that a new "Custom" option be added that basically says "output the library, but do not make the "trigger" call until I explicitly say so".   You don't even need to do much on this count, except just prevent DTM from outputting the "trigger" stuff.  Then the "trigger" stuff can be done with a Direct Call rule and _satellite.track().  

 

In the case of Adobe Analytics, I have found several workarounds so far, and both of them are not really acceptable. 

 

1) Use a direct call rule to output a 2nd adobe analytics call in my angular.js loaded callback function.  This is not acceptable because it doubles the adobe analytics requests, and those requests cost money and have implications on reports

 

2) Ditch having Adobe Analytics as a listed tool.  Put the entire adobe analytics library into a direct call custom js code rule and just pop everything i need there, and call the direct call rule in my callback.  This completely defeats the point of using a tag manager.  At this point, DTM is just a useless wrapper bloating things. 

 

3) put the DTM "top" code (the script include) into the angular.js callback as well.  I'm not sure this will even work. I have no idea how DTM will react to being added after page load.  Who knows what adverse side effects will occur from this.  It will certainly destroy DTM's timing scope but who knows how deep that cut will be. 

4 Comments (4 New)
4 Comments

Avatar

Avatar

jackmoe5

Avatar

jackmoe5

jackmoe5

17-04-2014

+1 to this request.

 

Josh has been gracious in assisting me to diagnose the timing disagreement that angularjs is having with DTM as well as providing me with some potential work arounds.

 

Looking forward to discussing a potential solution for this.

Avatar

Avatar

GaMeur1

Avatar

GaMeur1

GaMeur1

18-10-2017

+1

Hi, I'm having the same kind of problem and I'm disappointed to see that this thread is open for a long time and it seems that there is still no answer to it... What a shame.

Avatar

Avatar

jantzen_belliston-Adobe

Community Manager

Total Posts

1.9K

Likes

312

Correct Answer

570

Avatar

jantzen_belliston-Adobe

Community Manager

Total Posts

1.9K

Likes

312

Correct Answer

570
jantzen_belliston-Adobe
Community Manager

18-10-2017

Sorry for the delay in response. This item was submitted as an idea rather than a question. Ideas are reviewed as they are voted on by product and engineering groups and thus are not as closely monitored by the community team.

Have you tried disabling the default page load beacon by using return false in the custom code of the Analytics tool? This will disable the default page load beacon. You can then use a event based rule or direct call rule to trigger the Analytics beacon when you are ready.

Single Page Apps are tricky to deal with since most of the content is loaded asynchronously. This makes it tough for DTM to know when the page is completely loaded. Because of this, we have to rely on the developer or a event (hash change) to know when to fire the beacon. We realize adding return false to the Analytics tool isn't ideal. This is why Adobe Launch will be much different.

The next generation Tag Management solution from Adobe, called Adobe Launch, will be releasing later this year. We're currently working to wrap up a beta program where customers have been providing feedback and helping us to improve the product. In Adobe Launch, you'll have more options with your rules that will allow you to better deploy our tag management solution with SPA frameworks.

Finally, as you may have noticed, DTM has been marked as legacy within the Experience Cloud UI. Legacy DTM (the existing production version) will be supported for the foreseeable future. Adobe will continue to fix any significant bugs and ensure consistent performance. No major feature enhancements are planned for Legacy DTM.

We're working to make the migration process from Legacy DTM to the new Launch from Adobe as easy as possible so customers can take advantage of the more than twenty new features, Extensions, and APIs available with Launch.

Avatar

Avatar

GaMeur1

Avatar

GaMeur1

GaMeur1

18-10-2017

Hi Jantzen,

thanks for your answer.

Yes, I tried the "return false" method and then get a "SATELLITE: Adobe Analytics: custom init suppressed beacon".

Problem is that in this case, you're not able to use any "pageBottom" anymore (neither the "implicit one, nor one we want to have when a page of the SPA is loaded).

I agree that I could use a direct call rule or event based rule. Why I want to use page load rule (with page bottom trigger) is because in this way I can have several page load rules with different filter for the triggering and all those rules will fire only one page hit to Analytics! I think that's the real power of page load rules in DTM. Unfortunately, I don't believe I can do that with direct call rules or event based rules...

Is there no way to stop this implicit pageBottom when it's not in the page source code?