Hiding Links in Magento from AvantLink Affiliate Traffic
Posted in Code on August 15th, 2010 by AlexMagento, as many of you are by now aware, is an incredibly powerful e-commerce platform if not a bit frustrating. Lately we have been building our fair share of Magento sites. Many of our clients are using AvantLink for their affiliate marketing programs. In our opinion, the guys at Avantlink run one of the best affiliate management programs out there. Because of the quality of their affiliates, there are gonna be times when, as an Avantlink Merchant, you’ll need to hide links from the affiliate traffic.
In one case, our client, Marine Products has a link to their Ski Boat listings in the main navigation menu. Since boats are not part of their affiliate program, AvantLink affiliates will consider this a bleed off and will not send traffic to Marine Products.
The fix for this is really simple:
Go to Admin>System>Configuration>Design
In the Design Panel You have the option of Placing Content in “Miscellaneous HTML”
Place the following code snippet in the input box, making sure to replace the info “XXX” with your account number and our style descriptors with your own.
<script type="text/javascript">
var avad = avant_get_cookie('avant_XXX');
if (avad != null)
{jQuery(".sidebar_callout_mercury").css("display","none");
jQuery(".nav-boats").css("display","none");
jQuery(".boats_home").css("display","none");}
</script>
Note, you will need to make sure that you have the AvantLink Tracking Script installed (”avant_sfpc_XXX.js”). Again XXX should contain your account number.
If you have any questions or need assistance with any Magento or Avantlink integration, please contact us.
