Expand my Community achievements bar.

Ask our product team on how to best grow your experimentation and personalization strategies with Target during our AMA on May 6th!

at.js download script

Avatar

Level 9

According to this implementation pattern: https://experienceleague.adobe.com/en/docs/target-dev/developer/client-side/at-js-implementation/dep...

Does I need to wrap at.js code like that? Could somebody explain me this in detail?

<script src="at.js">

Michael_Soprano_0-1742137405127.png

</script>

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

2 Replies

Avatar

Employee

There are two ways to implement via at.js

 

1) Without tag:

 

Go to Administration -> Implementation and download the at.js library 

 

SarthakBh_0-1742137644070.png

In your frontend code place this file in the public directory, in your index.html page(i am assuming you are working with React, but the method is similar in other frameworks as well) call the at.js library like <script src="public/path_to_downloaded_file"></script>

 

2) Implement via launch 

 

1) Create a tag

2) Fire the load target rule

3) Run a build 

4) Copy the script tag from Environment. 

5) Paste it in your frontend code, i.e., index.html file.

 

Do let me know if you have some questions

 

Thank you! 

Sarthak Bhatt | Senior Product Consultant | Customer Experience | Adobe  

 

 

Avatar

Community Advisor

@Michael_Soprano  

at.js should be implemented in the <head> element of every page of your website as  external JS [not inline to ur code] if you are not using Launch and keep this priority order second if you are using datalayer

 

 <!--Target's JavaScript SDK, at.js-->
    <script src="at.js"></script>
    <!--/at.js--