Javascript for OneTrust consent collection not accepted in survey | XM Community
Skip to main content
Question

Javascript for OneTrust consent collection not accepted in survey

  • February 5, 2020
  • 3 replies
  • 411 views

Forum|alt.badge.img+1
Hello, Did anyone has experienced a One Trust consent collection implementation using JavaScript editor in a survey? The OneTrust platform provides a script to implement in the JS editor but, when saving, gives me the error "Unexpected token <". The fault seems to be in the <script> tag but I can't make it work since it runs everywhere except here. I've uploaded my JS script. Can anyone please advise?

3 replies

Forum|alt.badge.img+1
  • Author
  • February 5, 2020
Hello, Did anyone has experienced a One Trust consent collection implementation using JavaScript editor in a survey? The OneTrust platform provides a script to implement in the JS editor but, when saving, gives me the error "Unexpected token <". The fault seems to be in the <script> tag but I can't make it work since it runs everywhere except here. I've uploaded my JS script. Can anyone please advise?!

Yash
Level 1 ●
Forum|alt.badge.img+3
  • Level 1 ●
  • February 6, 2020
Hi, You can also include this text to your question text i.e. in HTML editor so this will look like as: <script> // your consent code/text </script>

Sasha
Forum|alt.badge.img+2
  • May 5, 2021

Hello, did you have any success with this?