Can you configure Adobe Dynamic Tag Manager (DTM) to load a script prior to the data elements being set?

StackOverflow https://stackoverflow.com/questions/23502346

Question

I would like to load a global JS object, which will include helper functions and global variables, that the data elements in Adobe DTM can use. It seems, however, that even when I set the page load rule for this script to "top of page" it still gets rendered after the data elements are set, causing an undefined error message.

Anyone run into this problem and have a solution they can share?

Was it helpful?

Solution

Load it as sequential javascript or html. This way it will load before anything else.

OTHER TIPS

Are you using Sitecatalyst? If so, to add to Brett's answer I think you have to use sequential html. I believe sequential javascript gets processed after the tracking call has been sent. Alternatively, you can add the functions and variables into the hosted script before the AppMeasurement / s_code. Alternatively again, you might be able to pass a lot of work to the data elements in the first place.

I've had luck using: Trigger rule at: "Bottom of Page" This way Vars are set before you run your script. Hope this helps. -Steve

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top