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