How To Inject a Script in Redirected Page?

Rounak_Mathur

14-05-2019

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?

Replies

Highlighted

yannickschwarz

14-05-2019

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

Highlighted

Rounak_Mathur

14-05-2019

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

Highlighted

yannickschwarz

14-05-2019

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.

Highlighted

Shruthi_N

Employee

14-05-2019

@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 .

Highlighted

tanvia28417128

Employee

17-05-2019

@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.

Highlighted

mikewebguy

Employee

17-05-2019

@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