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

The 1st edition of the Target Community Lens newsletter is out now! Click to the right to find all the latest updates

Experience Fragment Not Working - Error: atComponentInserted is not defined

Avatar

Level 2

I am trying to use experience fragments in a simple a/b test.

 

The XF's have been successfully been imported into Target, but will not show up in the test variation. 

 

When test using the Activity QA URL... I am getting an error and the XF isn't loading. 

I can see the page is trying to load the XF...

 

<div class="at-script-wrapper"><script class="at-loader" id="atloader-a85d8898-2" type="text/javascript">atComponentInserted({"scriptId":"atloader-a85d8898-2","path":"/content/experience-fragments/large-format/language-masters/en/site/TEST/eDM50.nocloudconfigs.html"});</script></div>

 

...but the atComponentInserted function is not found...

 

1 Uncaught ReferenceError: atComponentInserted is not defined at <anonymous>:1:1

 

The error seems to be originating from Launch, but I can't find any documentation on the atComponentInserted function, so I'm not sure where to start to troubleshoot. 

 

Any information on this would be helpful. 

 

 

 

 

 

1 Reply

Avatar

Level 6

@patrickb8312284 Is this response from Target or inside the experience Target is trying to deliver on the front-end? Can you share the payload that Target responds with? Please remove any private data. Right now I am thinking that you have inline JS that might be having a race issue one when this atComponentInsert function is needed.

The ultimate experience is back.

Join us in Vegas to build skills, learn from the world's top brands, and be inspired.

Register Now