How To Cloak Affiliate Links In Blogger - Onetechspot
Select Page

Cloak Affiliate Links In Blogger

Some bloggers think it’s not an option for bloggers to cloak affiliate links, but it’s wrong. We now have a jquery plugin to help with this. Disguise a blogger’s affiliate link As you know, WordPress has a lot of plugins for Cloak affiliate links. Cloak Affiliate Links In Blogger

Cloak Affiliate Links In Blogger

However, Blogger doesn’t have such a plugin. That’s why some blogger experts have created a blogger affiliate link cloaking plugin to camouflage blogger affiliate links. Cloak Affiliate Links In Blogger

What is link cloaking?

Link cloaking is a process that allows you to hide the original affiliate link using URL masking. Link cloaking is also very important for bloggers. If you don’t disguise your affiliate links, your blog may be punished by Google. Cloak Affiliate Links In Blogger

Why hide it?

Your answer is here. Affiliate links contain numbers, letters and special characters, and search engines don’t like affiliate links. If you use the original affiliate link in your post, your blog may be penalized by Google. Therefore, it is important to do this.

How will cloud Computing Transform Traditional Computing?

How to spoof affiliate links on Blogger Blog

  1. Log in to Blogger Blog Dashboard.
  2. Then go to Topic >> Edit HTML.
  3. Now click anywhere in the code area  and press Ctrl + F  to open the search field.
  4. Now search for & lt; / head & gt ;. sign.
  5. If you find this tag,  paste the jquery code just above it.

<script src=’http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.js’ type=’text/javascript’></script>

Cloak Affiliate Links In Blogger

  1. Insert the following code directly via & lt; / head & gt ;.

<script>
var aff = new Array();

/* define your links here */

aff[‘Your affiliate Link1‘] = ‘Your regular Link1‘;

aff[‘Your affiliate Link2‘] = ‘Your regular Link2‘;

aff[‘Your affiliate Link3‘] = ‘Your regular Link3‘;

/* do not edit below this point */

/* reverse the key/value pairs so we can lookup based on value */

var aff_reverse = new Array();
for (k in aff) {
aff_reverse[aff[k]] = k;
}

/* scan all links when the document loads */

$(document).ready(function(){
$(‘a’).attr(‘href’,function(){

/* if the link isn’t listed above, do nothing */
if (!aff[$(this).attr(‘href’)]) {return $(this).attr(‘href’);}

/* ok, the link is in our list */
$(this).click(function(){

/* when the link is clicked on, revert it back to the affiliate link */

//$(this).attr(‘href’, aff_reverse[$(this).attr(‘href’)]);
return true;
});
$(this).mouseup(function(){

/* Firefox ignores onclick event when the link is opened via middle mouse (new tab) */
$(this).attr(‘href’, aff_reverse[$(this).attr(‘href’)]);
return true;
});
$(this).mouseout(function(){

/* revert back to non-aff link in case they opened in new tab */

$(this).attr(‘href’, aff[$(this).attr(‘href’)]);
return true;
});

/* change the affiliate link to a non-affiliate link */

return aff[$(this).attr(‘href’)];
});
});
</script>

Customization:

Replace affiliate Link1 with the original affiliate link like http://hostgator.com/id=Alfaaz

Replace the regular Link1  you need:

https: //shoutersplanet.blogspot .com / go / hostgator

Replace  links as needed

  1. Add http://hostgator.com/id=Alfaaz and it will automatically be placed at https://shoutersplanet.blogspot.com/go/hostgator Will be Converted.

This is the method I use to obfuscate affiliate links. Cloak Affiliate Links In Blogger