James Bachini

Setting Up Facebook & Google Adwords Conversion & Retargeting Pixels

Conversion tracking is important because it will show you how much each lead or purchase is costing you in advertising costs. For most marketers this is their key performance indicator as it has a direct influence on their profits.

Retargeting (or remarketing) tracking is important because by building an audience we can launch cost-effective marketing campaigns targeting people who are already somewhat aware of our brand/content/offer.

Conversion and retargeting tracking works by placing a small piece of code on your website. This loads the pixel when a visitor visits your site (for retargeting) and when they check out or get to the “Thank You” page (for conversion tracking). This information is then fed back to your advertising dashboard so you can see what ads are converting best and launch remarketing campaigns at audiences you have built.

adwords facebook conversion retargeting pixelFacebook and Google Adwords both provide conversion and retargeting tracking. There are some differences between the platforms. Google uses separate pixels for each while facebook uses a general pixel which you paste on every page of your site and then track custom events.

Let’s look at how we setup both.

Adwords Retargeting Pixel

  1. From Adword Dashboard click Shared library in the bottom left corner of adwords
  2. Click “Audiences” > “Website visitors” > “Set up remarketing” or “+ Remarketing List” if you have already set it up once.
  3. Enter your domain or page in the “Enter a value (e.g. page.html)” field.
  4. In the “Membership duration” field enter how long you want to keep members in your list after visiting your page. If not sure set to the maximum of 540 days.
  5. Click Save which will take you bacek to the audiences page.
  6. In the top right corner you see a button saying “Tag Details”, click this then click “Setup” > “View Adwords tag for websites”This will display the code for the pixel.

Adwords Conversion Pixel

  1. From Adword Dashboard click “Tools” from the main navigation bar
  2. Select “Conversions” then the red “+Conversion” button
  3. From the options displayed select “Website”
  4. Enter a name for the pixel and optional value.
  5. Change “Count” from “Every” to “One”
  6. Set the category to “Lead” or “Sale” depending on what you are tracking.
  7. Click save and continueThe code for the conversion pixel will be displayed

Facebook Retargeting (Audience) Pixel

  1. Log in to Facebook the select “Ads Manager” from the navigation bar.
  2. From the new menu in the top left select  “Audiences”
  3. Click on the “Create Audience” button the “Create a custom audience”
  4. Select “Website Traffic” from the list
  5. Change the “Website Traffic” field to “People who visit specific web pages
  6. Then in the “URL contains” field enter your domain or page
  7. Change “In the last” field to however long you want to keep users in your list after they visit. Max 180 days
  8. Give your audience a descriptive name and click “Create Audience”
  9. Select the audience you just created from the list and click on the cog icon in the bottom left of the pop up modal box.Select “View Pixel Code” to display your general facebook pixel.

Facebook Conversion Pixel

  1. Log in to Facebook the select “Ads Manager” from the navigation bar.
  2. From the new menu in the top left select “Pixels”
  3. Click “Actions” > “View Pixel Code” to display your general facebook pixel
  4. Click on the “Create Conversion” button
  5. Select “Track conversions with standard events” then click “See More”
  6. You can see the javascript code displayed next to each event. The most popular two are:
Purchase
Track purchases or checkout flow completions (ex. landing on “Thank You” or confirmation page)
fbq(‘track’, ‘Purchase’, {value: ‘0.00’, currency:’GBP’});Lead
Track when a user expresses interest in your offering (ex. form submission, sign up for trial, landing on pricing page)
fbq(‘track’, ‘Lead’);

These two codes need the general facebook pixel already loaded in the page. They also need to be wrapt in script tags like below:
<script>
fbq(‘track’, ‘Purchase’, {value: ’15’, currency:’USD’});
</script>

Conclusion

Conversion tracking codes should be placed in your “Thank You” pages. And retargeting pixels should be placed on the page you are using to drive traffic to from your ads, and possibly throughout your entire site.

Conversion tracking will be displayed in your stats on Adwords or Facebook. With Facebook you may need to add an extra column to the stats table to show whatever you set the pixel event to i.e. Purchase/Lead

Retargeting campaigns can be setup like you would a normal campaign just select the audience that you have built. There are minimum size audiences on both networks of one hundred visitors. So you will need a hundred people to see the pixel code before your retargeting campaign will kick in.

Advanced Tips

Inside these files we are going to place all our pixels and upload them to the server with your website or landing page. Then just use iFrames to load each set of pixels like below.
<iframe src=”//mydomain.com/conversion.html” width=”1″ height=”1″></iframe>

Notice how I didn’t add the http or https before the mydomain.com, this is so that it will work with both. Keep in mind that cookies wont transfer between http and https which can mess up some tracking systems. Generally it is better to either stick to a secure site for everything if you are taking financial transactions or handling sensitive information such as user passwords or just keep everything on the normal http:// without SSL.

One drawback of the iframe method is you can’t fire events from Javascript. For 99% of advertisers this isn’t necessary though and you can simply dynamically load a new iframe from the Javascript code as necessary. If you need to pass through values or other information just change the conversion.html extension to .php and add on a conversion.php?value=15 this can then be accessed with:

<?php echo $_GET[‘value’]; ?>

Conversion tracking and retargeting campaigns have really gone mainstream in the last few years and rightfully so. These are two of the most powerful tools available to online marketers.


Get The Blockchain Sector Newsletter, binge the YouTube channel and connect with me on Twitter

The Blockchain Sector newsletter goes out a few times a month when there is breaking news or interesting developments to discuss. All the content I produce is free, if you’d like to help please share this content on social media.

Thank you.

James Bachini

Disclaimer: Not a financial advisor, not financial advice. The content I create is to document my journey and for educational and entertainment purposes only. It is not under any circumstances investment advice. I am not an investment or trading professional and am learning myself while still making plenty of mistakes along the way. Any code published is experimental and not production ready to be used for financial transactions. Do your own research and do not play with funds you do not want to lose.