Tracking pixels are very useful to help you collect data and market to your audience. This article will teach you how to add these 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.
NOTE: Facebook is constantly changing their platform so at any given time one of our screenshots may not match inside Facebook exactly. We will do our best to keep this guide updated.
What Is a Tracking Pixel?
A tracking pixel is a small amount of text 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.).
You may need to add this tracking pixel to your school and specific courses as part of the advertising requirements on certain platforms. It is a good idea to do this right away so you can start collecting traffic regardless of whether you are running ads or not. This traffic history is very useful when the time comes for you to start running online ads.
Adding a Pixel in Code Snippets
You can add a pixel code across your school so that it tracks the actions of logged-out users and/or logged-in users. This is useful because it allows you to see how people are interacting with your school and plan your advertising accordingly. For instance, if you'd like to advertise to those who may not have purchased a course or signed up yet, you could target them with a campaign that gives them compelling reasons to enroll.
- Log into your Teachable school and select Site from the admin sidebar.
- Click Code Snippets from the submenu.
- Paste your Facebook pixel code inside the Logged In text field to track the actions of your students who are currently logged in.
- Similarly, paste your Facebook pixel code inside the Logged Out text field to track the actions of logged-out users.
- Click Save.
Testing Your Tracking Pixel
After you have saved your code snippets, you should test 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 addon, 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.
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 pixels 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.
Then, choose Website Traffic.
Then, fill out the screen with the following information:
- Choose “People who visit specific web pages”
- 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)
- 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)
- Track the maximum days, 180
- Check the box to include past traffic
- Name your audience
- Click Create to save this audience
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.
- Copy your Facebook pixel event code from inside the Pixels area of Facebook’s Ad Manager. There are nine different types of events, but the “Purchase” event code is best for this scenario.
- 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.
- Log into your Teachable admin area.
- Navigate to a specific course where you’d like to add this Facebook pixel.
- Inside the submenu, select Thank You Page.
- Scroll down to the Head Includes section, paste your Facebook event code, and click Save.
- While inside your course, copy the course ID from the URL (between /courses/ and /thank-you-page).
- Return to the Ad Manager on Facebook, open the menu, and click on Custom Conversions.
- 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. Click Next.
- On the next screen, input your purchase price so you can run reports based on sales inside Facebook. 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 into 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):
- 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.
- Now open an incognito window. In this window log into Facebook and open a new tab with the link to your course.
- Enroll in your course with an email that is different from your Teachable account.
- It will now take you to the thank you page. You can leave this tab open until you are done.
- Check your pixel helper tool and make sure your conversion pixel shows green for success.
Facebook can take hours to show the pixel is active, so just be patient. You can close your thank you page tab when you are done.