Expand my Community achievements bar.

Question about JavaScript use in Adobe Target Campaigns


Level 4

I'm trying to add some custom JavaScript via Adobe Target for an A/B test.  I have a simple countdown timer in JS that runs great via my codepen. The problem is that it seems that Adobe Target loads the experience a bit late.  Due to the need for page load improvements the Adobe Target script is implemented in the <body>, not the <head> of the site. (Yes, I know.. but I'm just a small cog in the machine.)


Are there any trick or techniques that I can use to get the script to load more efficiently?  I've tried a MutationObserver,  'window.onload = function()' and DOMContentLoaded  - but nothing seems to help.  The timer outputs like this when running via Target:


When it should be like this based on my script:



Any insights on a solution is appreciated.




0 Replies