Add a Tracking Pixel

This article goes over adding a tracking pixels to your Teachable school. We refer to Facebook most often, because it is the most popular platform for tracking code and it can be a convoluted platform for pixel code setup.

Overview

A tracking pixel is a singular pixel on your page that acts as a “code” or “script” that communicates back to the platform you want to track traffic through or run online ads on (Facebook, Twitter, LinkedIn, etc.).

CAUTION: The use of tracking pixels may affect whether or not your school meets privacy and data consent standards under the European Union’s General Data Protection Regulation. We recommend consulting a legal professional before using tracking pixels on your school.

Adding a Pixel to Your School

  1. Log in to your Teachable school and select Site from the admin sidebar.
  2. Click Code Snippets from the submenu. 
  3. Paste your pixel code inside the Head Code Snippets text field to track the actions of your students who are currently logged in. 
  4. Click Save.
    fb_pixel_head_code.png

Testing Your Tracking Pixel

After you've saved your code snippets, you should test them to make sure the tracking pixel is working correctly. Depending on your platform there may be tools available to test with. Some platforms run the test inside the platform (Twitter, LinkedIn), others provide tools (like Facebook’s below).

Facebook Pixel Helper

Install the Facebook Pixel Helper Chrome Extension to ensure that your Facebook pixel code is working correctly.

Install the browser add-on, open Facebook in a new tab, and then open your school in a second tab. Click on the blue "</>" symbol on your browser header bar and read the message.

4.pixelhelper.png

The helper will tell you if there are any issues. Green means it’s working, red means it isn’t working. If it isn’t working, read the “show” messages to get feedback as to why it isn’t working and follow their steps to fix it.

Finishing Setup on Your Platform

Once you’ve added your pixel to the desired location on your school, remember to finish setting it up on your advertising platform.

For example, on Facebook you would go to Audiences inside the Ad Manager. Click Create a Custom Audience.

create a custom audience

Then, choose Website Traffic.

website traffic

Then, fill out the screen with the following information:

  1. Choose “People who visit specific web pages”
  2. Then enter a keyword your URL contains, instead of the full URL (avoid using www or http as it is known to cause issues with tracking data)
  3. If you want to track a specific sales page, create a new custom audience and put the sales page URL in (without www or http or a / at the end)
  4. Track the maximum days, 180
  5. Check the box to include past traffic
  6. Name your audience
  7. Click Create to save this audience

website traffic audience details

Your audience is now in place for you to start monitoring your traffic. We recommend you create a base audience of visitors to your entire school and create separate new audiences for visitors on specific sales pages in your school.

Adding a Facebook Event Pixel to Your Thank You Page

Facebook allows you to track specific events using customizable event codes. These codes are unique scripts that can be used on any page in your site, and they track events like user searches, completed registrations, courses being added to a cart, and so on, with a different type of code used for each event.

A pixel on your thank you page allows you to track who has made a purchase in order to better customize your Facebook ads. This is also useful if you'd like to advertise to people who have already purchased your course; for example, you could target them with an advertising campaign for similar courses that you have.

Here, we’ll walk through how to add an event pixel to your thank you page. Facebook changes their interface from time to time, so when in doubt, reference their guide on event codes.

  1. Copy your Facebook pixel event code from inside the Pixels area of Facebook’s Ad Manager. 5.eventcodelist.pngThere are nine different types of events, but the “Purchase” event code is best for this scenario.
  2. Paste the event code into a text editor to adjust the parameters (for this code, editable fields are value and currency). Re-copy the adjusted code. 
    6.editcode.png
  3. Log in to your Teachable admin area.
  4. Navigate to the course where you’d like to add this Facebook pixel.
  5. Inside the submenu, select Thank You Page.
  6. Scroll down to the Settings section, toggle Add Custom <head> Code, paste your code, and click Savethankyoupage_addcode.png
  7. While inside your course, copy the course ID from the URL (between /courses/ and /thank-you-page). copy thank you page course url
  8. Return to the Ad Manager on Facebook, open the menu, and click on Custom Conversions8.customconversion.png
  9. Click Create a Custom Conversion. In the builder window, choose URL Contains and paste the course ID from step 7 in the box. This will track anyone who visits the thank you page of this specific course. 11.addcourseid.png Click Next
  10. On the next screen, input your purchase price so you can run reports based on sales inside Facebook. 12.price.png Click Create, and you’re ready to go.

You may need to activate your pixel by visiting the thank you page while you are logged in to Facebook or whatever platform you are tracking from. Follow the next steps to activate it (these steps are required by Facebook but may not be required on other platforms):

  1. If you are on a paid plan, create a 100% off coupon. If you are on a free plan, temporarily add a “FREE” price option.
  2. Now open an incognito window. In this window log in to Facebook and open a new tab with the link to your course.
  3. Enroll in your course with an email that is different from your Teachable account.
  4. It will now take you to the thank you page. You can leave this tab open until you are done.
  5. Check your pixel helper tool and make sure your conversion pixel shows green for success.
Was this article helpful?
5 out of 9 found this helpful
thanks_illustration

Can't find what you're looking for?

Contact us
thanks_illustration