Expand my Community achievements bar.

Applications for the 2024 Adobe Target Community Mentorship Program are open! Click to the right to learn more about participating as either an Aspirant, to professionally level up with a new Certification, or as a Mentor, to share your Adobe Target expertise and inspire through your leadership! Submit your application today.

How To Inject a Script in Redirected Page?

Avatar

Level 2

I am redirecting page using script

<script>

var url = "https://www.abcdefgh.com";

$(location).attr('href',url);

</script>

How can I make changes in redirected page using Adobe Target?

6 Replies

Avatar

Level 2

Hi Rounak,

It sounds like you are using the form composer to inject your script on the initial page that you are redirecting.
If that's the case, then you can simply add another location to your experience, that would target the page that you redirected your traffic to, and make changes there. See screenshot below, pointing out where you can add another location  to your experience.

1752672_pastedImage_0.png

Avatar

Level 2

Hi yannickschwarz,

Thanks for your response!

I have created Visual activity of AB test and adding below script to redirect to page B.

<script>

var v=location.href;

if(v.indexOf("/ca")>0 && v.indexOf("/en")>0){

  var url = "https://www.acfsffhshh.com/en-ca/asia-on-sale"; // dummy URL

$(location).attr('href',url);

}

</script>

The page is redirecting properly but now I need to make some changes (Eg: Changing some Heading and changing some image) on redirected page.

Please suggest how should I implement in order to make changes in redirected page.

Regards,
Rounak Kumar

Avatar

Level 2

Hi Rounak,

Sorry, I can't help you with that any further. I'm not familiar with the Visual Activity composer as I build all my experiences in the form composer.

Worst case scenario, you could always create a second campaign, targeted to the redirected page and make your changes there, using the visual composer. But I'm not sure if you can make those changes within the visual activity composer, after a redirect.

Avatar

Employee

@rounak Mathu. I agree with what Yannick suggested. If you are using the visual experience composer , then you will need to setup a second test on the redirect page and can make the needed changes there .

Avatar

Employee

@Rounak Mathur

By default, Visual composer does not allow to make changes on the redirected page.

As already suggested, you would need to create a new activity on the redirected URL for any further changes on the page.

Also, you can try including your redirected page as an additional page in the experience. Hope that helps.

Avatar

Employee Advisor

@Rounak Mathur,

Here is a screen-shot showing you how to easily add a redirect from the Virtual Experience Composer. Hope this helps!

If this satisfies your query please like, mark as helpful and mark as answer. Otherwise lets keep the conversation going. Hope you have a wonderful day.

Screen-shot showing how to do it:

redirect_in_VEC.png

Mihnea Docea | Technical Support Consultant | Customer Experience | Adobe | (:: 1 (800) 497-0335