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.
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
- Log in to your Teachable school and select Site from the admin sidebar.
- Click Code Snippets from the submenu.
- Paste your pixel code inside the Head Code Snippets text field to track the actions of your students who are currently logged in.
- Click Save.
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.
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.
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 in to your Teachable admin area.
- Navigate to the course where you’d like to add this Facebook pixel.
- Inside the submenu, select Thank You Page.
- Scroll down to the Settings section, toggle Add Custom <head> Code, paste your 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 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):
- 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 in to 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.