Library Header and Library Footer code not behaving as expected

davidj23014378 08-10-2019

I'm attempting to implement a function that sets all active activity names into a cookie value.

After toggling on all Activity Response Tokens in setup, I'm following the basic instruction here to debug:  Response tokens.​  These instructions contain this simple script, and state that will work if added to Library Footer:

document.addEventListener(adobe.target.event.REQUEST_SUCCEEDED, function(e) { console.log("Request succeeded", e.detail); }); 

I also have one activity running to help debug, that contains:

console.log('in Activity!');

That correctly outputs to console when I view the site.

However, there is no response from the Library Footer code.  In addition, just adding the following to either Footer or Header Library code also outputs nothing.

console.log('Library Footer')

console.log('in Activity!');

It is as if the Library Footer/Header code is not being injected...

Install Information:

Target is currently being added via Launch (development environment).  I'm able to toggle to development environment on the site via this extension: Launch and DTM Switch - Chrome Web Store

Can anyone give me a pointer on what is going on?  Am I misunderstanding Library Header/Footer as JS code that gets injected onto every page?  Thank you!

Answers (0)