How to implement AA script tag in a React JS project?

Avatar

Avatar

luizam67085634

Avatar

luizam67085634

luizam67085634

24-07-2018

Hello,

I have a huge Adobe Audience <script> tag and I have to insert it into a React JS project.

I was instructed to insert it in <head> tag, but I am trying to avoid inserting it in my index.html file because I feel it's not the best practice to put

a lot of code in it. I am wondering if there is a way to work around this and inserting this script tag with an approach that is more React-like.

Thank you very much

View Entire Topic

Avatar

Avatar

harishd90

Employee

Avatar

harishd90

Employee

harishd90
Employee

25-07-2018

Hi luizam67085634 ,

You could use a tag manager, such as DTM, Google, etc. to host the script and call it in your head section; or you can add call the script using script source tag, again in your head section.

Using a tag manager is recommended as you don't have to edit your site code every time you have to make changes/add/remove multiple scripts.

Regards,

Harish