Expand my Community achievements bar.

SOLVED

script tag use in activities on some A/B tests

Avatar

Level 1

We are looking to run an A/B test in Adobe Target with HTML content within our activities as the test experience.  Within the test the code used is window.setAbTest('blah blah', 'B')
For this experience we reached significance, but upon further review it appears that the majority of the traffic that triggered this is coming from mobile traffic and none from desktop.  When I checked with some previous tests we used similar logic but embedded the code within a script tab and the traffic for the test group conversion was evenly divided between mobile and desktop users. 

Does a test without a script tag not work for desktop traffic or limit it capabilities within Adobe target?

Topics

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

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

Hi @fishmatt ,

When using the custom code (HTML) option under the VEC's modification tab to inject a script, ensure that the JavaScript or jQuery code is wrapped inside <script></script> tags.

To address your query, the type of code written does not affect whether an activity qualifies. An activity will qualify as long as the audience criteria are met. Visits and visitor counts will increment regardless of whether the code executes correctly on the page, and attribution will occur for the appropriate channel.

However, if the code fails due to incorrect placement, the activity will still qualify (provided the user meets the audience criteria), and the metrics will continue to increment.

In your case, confirm that the audience setup includes all desktop users to ensure they can see the activity. Could you share more details about your audience setup and provide a screenshot of the modification tab? This will help debug the issue further.

To summarize your question—does omitting the <script> tag in the custom code block prevent a test from working for desktop traffic or limit its capabilities in Adobe Target?

  • No.

View solution in original post

3 Replies

Avatar

Correct answer by
Employee Advisor

Hi @fishmatt ,

When using the custom code (HTML) option under the VEC's modification tab to inject a script, ensure that the JavaScript or jQuery code is wrapped inside <script></script> tags.

To address your query, the type of code written does not affect whether an activity qualifies. An activity will qualify as long as the audience criteria are met. Visits and visitor counts will increment regardless of whether the code executes correctly on the page, and attribution will occur for the appropriate channel.

However, if the code fails due to incorrect placement, the activity will still qualify (provided the user meets the audience criteria), and the metrics will continue to increment.

In your case, confirm that the audience setup includes all desktop users to ensure they can see the activity. Could you share more details about your audience setup and provide a screenshot of the modification tab? This will help debug the issue further.

To summarize your question—does omitting the <script> tag in the custom code block prevent a test from working for desktop traffic or limit its capabilities in Adobe Target?

  • No.

Avatar

Level 1

Thanks for clarifying things.  In our case, the audience is anyone coming to the domain provided, it is not limited to one type of user in any regard.  So it is strange that our test would reach confidence at a base level, but when diving deeper into the numbers it looks like 95% of the successful conversion tests came from mobile users.  

Avatar

Employee Advisor

Hi @fishmatt ,

If the conversion happens only on mobile, there might be some issue with delivering the content on the page for desktop devices. could you please elaborate on the goal metric that you have selected for your activity?