Affiliate tracking interference w/ window.open() method and new tab vs current tab redirects

[ad_1]

I am working on an affiliate content site which has been configured to open affiliates links via a redirect using JavaScript window.open() method. This opens the link in a new tab. This is done strategically so the current tab can redirect to a different page on the site.

However, we are having issues with a lot of our sales/conversions not tracking properly when we configure our links this way.

I wondered if there was a rel= attribute or referral policy that could be affected. Similarly, could cookies be affected with window.open() method, or by opening in a new tab vs the same/current tab? My expertise with browser configurations and javascript is limited so I am a bit unsure where to start looking for the root cause.

For reference, the code used to open the links looks like this:

(function($) {

$(document).on(‘form\_submission\_success’, function(e, response, form){

// get field values and combine

var link = document.querySelectorAll(‘\[name=”link”\]’)\[0\].value;

var uid = document.querySelectorAll(‘\[name=”uid”\]’)\[0\].value;

var redirectTo = link + uid;

// open redirectTo new tab

[window.open](https://window.open)(redirectTo, ‘\_blank’);

});

})(jQuery);

If anyone has encountered this issue before, would appreciate any insight on the matter. Thank you in advance.

[ad_2]

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer