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

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?

有帮助吗?

解决方案

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

其他提示

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

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top