Track Likes, Tweets, and +1s as Affiliate Conversions

Peter Hamilton

Are you tracking social engagements?

The beauty of affiliate marketing is that you can choose to pay affiliates and publishers for any type of user engagement. You don’t just have to reward affiliates for leads or sales, and with social networking and online community building becoming a major focus for online business, it makes sense to reward affiliates that generate new social engagements. These could be “Likes” on Facebook, new Tweets or even Google +1’s.

Setting up these social engagements as affiliate conversions is really pretty simple. You do have to place a little code, but the same is true for any conversion tracking. You can find documentation on how implement Facebook likes, Tweets, and Google +1’s in the HasOffers Wiki, but we’ll go ahead and hop right into tracking Facebook “likes” in this post so you get the basic idea.

Tracking Facebook “Likes” as Conversions

So let’s set up conversion tracking for Facebook Likes so you can start paying affiliates for the users that like your company, product, or service. When a like takes place, Facebook calls the displayConversionPixel function which will load the conversion tracking pixel. You’ll need to use a valid Facebook App ID and input into into the code. Follow the steps below.

1.  “Like” Button Start by updating the like button code with the URL of the page you want users to Like. At this time you can also modify the size or layout of the button.

<fb:like href="" send="false" layout="button_count" width="138" show_faces="false" font=""></fb:like>
<div id="fb-root"></div>
<script type="text/javascript">
	//facebook code
	window.fbAsyncInit = function() {
		FB.init({appId: 'XXXXXXXXXXXXXXX', status: true, cookie: true, xfbml: true});
		FB.Event.subscribe('edge.create', function(href, widget) {
			// Do something, e.g. track the click on the "Like" button here
			// push click to Google Analytics
			// _gaq.push(['_trackEvent', 'Social', 'Clicked', 'Facebook']);
	(function() {
		var e = document.createElement('script');
		e.type = 'text/javascript';
		e.src = document.location.protocol + '//';
		e.async = true;

View a working version here:

2.  Conversion Pixel in the <Head>

Assuming you have already set up an offer in HasOffers or other affiliate tracking software, you will need to add javascript to the <head> of your web page to use the loadConversionPixel function. Simple copy and past the code below into the header of your page, replacing highlighted text with the iFrame specifically generated for your affiliate offer.

<script type="text/javascript" src=""></script>
<script type="text/javascript">
	function loadConversionPixel(){
		// display HasOffers conversion tracking pixel
		$('#ho-pixels').append('<iframe src="" scrolling="no" frameborder="0" width="1" height="1"></iframe>');

Finish by inserting the following “div.” before the closing body tag of your web page. This allows the conversion pixel to be loaded in the div when a user Likes your page.

<div id="ho-pixels"></div>

Once you have all of this in place you’re ready to run a test and make sure Facebook “Likes” are being tracked for individual affiliates. See documentation in the HasOffers Wiki about tracking Facebook Likes as affiliate conversions.

Tweets as Affiliate Conversions

Tracking Tweets as Affiliate conversionsYou can easily set up conversion tracking for Twitter as well. When a user clicks the tweet button and shares your content on Twitter. You can now reward your affiliates for providing users that engage with your brand on Twitter. The implementation process is somewhat similar to Facebook, so we won’t cover it all in this post, but if you’re ready to get started, visit the HasOffers Wiki Page on Tweets. You can see a working version of a trackable Tweet Button Here.

Instructions -> Tracking Tweets as Affiliate Conversions

Google +1’s as Affiliate Conversions

tracking google plus one button as affiliate conversionsThe Google +1 Button is growing with fierce popularity, and if you’re tracking Tweets and Likes as affiliate conversions you should definitely be tracking +1’s. We’ve figured this one out for you as well. Just follow instructions in the HasOffers Wiki at the link below and you’ll be up and tracking in no time. Here is an example of a trackable Google +1 Button.

Instructions -> Tracking Google +1 Button as Affiliate Conversion

Tracking Social Buttons All in One Offer

You can set up these social engagements to track in one offer using “Offer Goals” or as individual offers, whichever makes the most sense for your business model. To set social engagements as additional goals on a single offer, just use the conversion tracking pixel that is specific to the Goal you created for that offer rather than create a new offer for each social action. This way, affiliates can use a single tracking link to promote your products or services and still get credit for the social actions they influence. Since the loadConversionPixel function is the same for all three social networks, you’ll only need to place that code once. Below you can see how setting up social actions as separate Offer Goals would appear in your HasOffers affiliate program (found on the view Offer page).

Tracking Social Actions Offer Goals Affiliate

Feel free to drop questions in the comments below. I hope this becomes a great way for you to reward the affiliates that provide high quality traffic. If an affiliate not only sends you new signups and sales but also customers that tend to tweet about their experience or “like” you on Facebook they are providing a ton of value, and I suggest rewarding those affiliates well.

Peter Hamilton

A digital marketer by background, Peter is the former CEO of TUNE, the enterprise platform for partner marketing. In 2018, he sold TUNE’s mobile measurement product to Branch, unifying measurement and user experience. He led TUNE’s efforts to bring better management technology and automation to marketing partnerships, across affiliates, influencers, networks, and business development relationships. Follow @peterhamilton

8 responses to “Track Likes, Tweets, and +1s as Affiliate Conversions”

  1. David Mimila says:

    Really interesting and with huge potential.
    One question though, is it possible to track a “Like” that happens within the Facebook brand page?

    Keeping users within the facebook environment would be huge

    Keep it up!

    • no, the only way for this custom code to work is when the like button (or other social action) is on your own page, where you have control. The idea is to track social engagement on your site or in an offer.

      this is something extremely important to major brands who want to increase social actions on their own websites, rather than sending their community to the another social platform.

  2. Rita Guarino says:

    Can a QR be created for each affiliate in order to track they Likes they generate for my FB page ?

  3. I love seeing the increased intersection of affiliate marketing and social media – good stuff, Peter!

  4. Thanks you for share 🙂

  5. Keith says:

    Peter, thanks for the info! We recently joined HasOffers to facilitate and track our social influence marketing platform and this functionality is just what we needed!

  6. Twila says:

    I appreciate, result in I discovered exactly what I was taking a look for.

    You have ended my 4 day long hunt! God Bless you man. Have a great day.

Leave a Reply