Experience custom code runs twice | Community
Skip to main content
February 2, 2018

Experience custom code runs twice

  • February 2, 2018
  • 1 reply
  • 13424 views

I created an activity in Adobe Target that has an Experience that runs 100% to test custom code.  I checked off the box to let the code run in the head.  The custom code is a jQuery document ready that then makes a requireJS call (asynchronous) to load another JS file.  Once that file loads, it executes a console.log message.

I noticed that every time this experience runs, this custom code runs twice, so the console message is shown twice.

I found another thread here dated April 2016 where Adobe staff said there was a bug in Adobe Target, and it would get fixed in May 2016.

Extra link rendering after recent Target updates

It seems this problem still exists for Ajax calls in custom code.  Is there still a problem in Adobe Target?  I had to employ the workaround in that other thread, but I am not satisfied that I have to use this workaround.

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

1 reply

will_lanni
June 8, 2019

We have same issue.

just upgraded to at.js 2.1.0

We have an A/B test.

All the code does is run a console.log.

We see two console logs trigger.

In other properties where we use at.js 1.x we do not have this problem.

surebee
Adobe Employee
Adobe Employee
June 13, 2019

Hi @will.lanni,

Do you have a sample link I can replicate the issue on?

Thanks!

will_lanni
June 13, 2019

I will need to get permission to set up a live activity on production so I can share it. I'll post back here when I get that going.