Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Adobe Target Community Q&A Coffee Break: On Wednesday, February 1 at 8am PT, Brent Kostak of the Adobe Target Product team will be joining us to answer your Target questions. To register and for more information, follow the link to the right.

at.js 2.x TriggerView - Possible to Add Custom JS Code via VEC


Level 3


I have implemented the triggerView functionality on my organization's SPA. I can add CSS, basic HTML, and other changes to a particular view in the VEC. However, I have not been able to successfully add Custom Code (specifically a JS script); the script simply does not execute. I have tried multiple combinations: adding to head/not adding to head, various scripts including simple console.logs, etc. To be clear, I am very familiar with adding custom JS to "normal" (not using triggerView()) Experiences to through the VEC, even to the same SPA that is not working with the triggerViews.


Is this a known issue? Specifically, is it even possible to add custom JS to a particular view via the VEC? If not, any suggestions as to what may be going wrong?


2 Replies


Level 2

Hi @KMarchewa , 


just to understand your problem correct. You can add HTML and it works, but if you within the HTML add Javascript like this via a script tag is does not execute?

<script> console.log("Hello"); </script>


Level 3

That is correct. Even such simple statement does not work using the "Custom Code" option with the "Add to Head" option checked (I also tried <div><script>console.log("...")</script></div> WITHOUT the "Add to Head" option checked).