Expand my Community achievements bar.

SOLVED

Can we add 2 Adobe Launch scripts in the source code

Avatar

Level 4

Can we add 2 Adobe Launch scripts in the source code our devs are asking with Analytics they are not able to process them when needed in the timing of the different tags, pixels, target. They are suggesting using async calls and AA calls in one instance library and all marketing tools, pixels, tags, etc in another. They ran a page speed report and looked at how timing is affecting and they want to improve the load time. What would be a good explanation to give them to use 1 launch script only?

1 Accepted Solution

Avatar

Correct answer by
Community Advisor and Adobe Champion

That doesn't make a lot of sense... having one less tag manager is better for performance.. why would they think adding a second one would help anything?

 

Assuming this works, which I don't know it even would.. there are general standard scripts that come along with the tag manager that would be loaded twice (for each script) which would definitely be detrimental to performance (and that's assuming having two versions of those scripts don't clash with one another). Not to mention, performance improves by having less individual resource calls.. so adding a whole new tag manager is opposite to that philosophy... 

 

You can set different triggers in Adobe Launch, you don't need to fire everything all at once.... Adobe Launch is already generally loaded as an async script already...  

 

If they are having issues with timing:

 

i.e maybe they are using DOM Ready, or Window Loaded to trigger the tracking, but not all the elements are ready, they can do what we did.

 

Our sites have a dependency on some slower third party "cross tracking"... so I had my developers create a custom JS event.. when the site loads, they can collect all the data we need for tracking, set it to our data layer, then they fire the custom event (screenChange).

 

My trigger in Adobe Launch is a custom code trigger that looks for "screenChange"... basically this is similar to how you would handle an SPA site (that only triggers DOM Ready or Window Loaded on the initial page, then uses JS to update the content of the page without actually triggering standard web loading events)

 

If you really wanted to, you could set up multiple events that trigger at different times in the page load cycle.

 

View solution in original post

5 Replies

Avatar

Correct answer by
Community Advisor and Adobe Champion

That doesn't make a lot of sense... having one less tag manager is better for performance.. why would they think adding a second one would help anything?

 

Assuming this works, which I don't know it even would.. there are general standard scripts that come along with the tag manager that would be loaded twice (for each script) which would definitely be detrimental to performance (and that's assuming having two versions of those scripts don't clash with one another). Not to mention, performance improves by having less individual resource calls.. so adding a whole new tag manager is opposite to that philosophy... 

 

You can set different triggers in Adobe Launch, you don't need to fire everything all at once.... Adobe Launch is already generally loaded as an async script already...  

 

If they are having issues with timing:

 

i.e maybe they are using DOM Ready, or Window Loaded to trigger the tracking, but not all the elements are ready, they can do what we did.

 

Our sites have a dependency on some slower third party "cross tracking"... so I had my developers create a custom JS event.. when the site loads, they can collect all the data we need for tracking, set it to our data layer, then they fire the custom event (screenChange).

 

My trigger in Adobe Launch is a custom code trigger that looks for "screenChange"... basically this is similar to how you would handle an SPA site (that only triggers DOM Ready or Window Loaded on the initial page, then uses JS to update the content of the page without actually triggering standard web loading events)

 

If you really wanted to, you could set up multiple events that trigger at different times in the page load cycle.

 

Avatar

Level 4

Thank you for the detailed response.I will convey this to the developers.

Avatar

Community Advisor

Whoever suggested loading two tag managers would improve page speed was high on something. Adding something to a web page increases the resources that the browser needs to load, which definitely increases page load time.

Specifically for Adobe Launch, each time an Adobe Launch snippet is run, it creates a "_satellite" object that holds all of that property's rules and data elements. If you run 2 snippets, the second snippet's _satellite object could overwrite the first one. Assuming the one with AA runs first, followed by the one with all of the other marketing tags, then you're almost likely to realise that your AA beacons aren't being fired because their rules/data elements have been overwritten already.

I suspect that they want you to create a second property to make it easy for their users to be added there to add/delete/change whatever marketing tags that they want without needing you to get involved. But that's not ideal because you should know how all of your site's analytics and marketing tags are firing, so that they can all be measured consistently, i.e. with the same events and conditions.

Avatar

Level 4

Thank you for the detailed response.I will convey this to the developers.

Avatar

Community Advisor and Adobe Champion

Moreover, adding 2 "Adobe Launch" scripts will only give you one single instance of _satellite where the JS loaded later won.