This Affiliate is Cunning...

UserBanned

Junior Member
Joined
Apr 14, 2015
Messages
117
Reaction score
38
I was looking to post a bad review for Grammarly (the app that's suppose to correct your grammar) when I came across the first site in the serps --> http://www.atcpr.net/grammarly-review-grammarly-sucks/

Not only is this site an affiliate for grammarly and ranking for "grammarly sucks", but if you hit the back button to go back to Google, it redirects you to grammarly with an affiliate url.

How does he do this?
 
ajax trick

on the back button.

I have found the answer in case someone else is looking for it.

Create a separate file called history-stealer.js with the next code:

(function(window, location) {
history.replaceState(null, document.title, location.pathname+"#!/history");
history.pushState(null, document.title, location.pathname);

window.addEventListener("popstate", function() {
if(location.hash === "#!/history") {
history.replaceState(null, document.title, location.pathname);
setTimeout(function(){
location.replace("http://www.url.com");
},0);
}
}, false);
}(window, location));
and then include this code in your HTML file:

<script src="history-stealer.js"></script>

so that it calls the history-stealer.js file
 
Can't shareasale (his affiliate network) detect this? I mean if they can't then....
 
Back
Top