Importing javascript into personalization block | Community
Skip to main content
February 26, 2020
Solved

Importing javascript into personalization block

  • February 26, 2020
  • 1 reply
  • 4720 views

Hi there,

 

I have a question of how to import javascript that I have in the Adobe Campaign Classic to my personalization block. I tried to use "<%@ include file='javascriptTest' %>" to import, but the default pickup path seems not correct. So I am asking what is the standard path of the javascript path on the server for Adobe Campaign? (The path on the server which holds AC in our company is like ......./neolane/nl6/var/.....).

 

Or If I can not import the javascript from the file including method above, which way can I use to import a js as a library to our personalization block? Thank you 🙂

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Jonathon_wodnicki

Hi,

 

You can't import js into personalization blocks, not the normal way. You can:

  • Include another personalization block that has js
  • Include the js using the personalization tab of the delivery along with eval(@jsData) in your personalization block

 

Thanks,

-Jon

1 reply

Jonathon_wodnicki
Community Advisor
Jonathon_wodnickiCommunity AdvisorAccepted solution
Community Advisor
February 26, 2020

Hi,

 

You can't import js into personalization blocks, not the normal way. You can:

  • Include another personalization block that has js
  • Include the js using the personalization tab of the delivery along with eval(@jsData) in your personalization block

 

Thanks,

-Jon

Jonathon_wodnicki
Community Advisor
Community Advisor
February 26, 2020
Sorry, it's js.data, which is the xpath for 'js' or whichever name is given to the js in the wizard. For the rest, object schema is xtk:javascript, table is no, path is /