Skip to main content
November 9, 2026
Integrating Tapfiliate with Teachable lets you track the course sales your affiliates refer, including the coupon code used at checkout. The setup takes two code snippets: one in your school’s Head Code Snippets, and one on the Thank you page of each course you want to track. Note: Be aware that adding custom code into Teachable schools might require a subscription plan.

Step 1: Add the tracking code to every page

  1. On your School dashboard, go to Site > Code Snippets.
  2. Paste the following code into the Head Code Snippets window:
  1. Click Save.

Step 2: Add the conversion code to the Thank you page

Repeat these steps for each course whose sales you want to track.
  1. In the left-hand menu, go to Courses and open the course.
  2. At the bottom of the page menu, click Thank you page.
  3. Hover over the first block, Purchase Confirmation, and click Insert new block.
  4. Choose </> Add Liquid/HTML Block and paste the following code into the box:
  1. Click Save at the top of the screen.
In both snippets, replace YOUR_ACCOUNT_ID with your Tapfiliate account ID. You can find it by following this guide. The conversion code sends the sale amount, the customer’s email as the customer ID, the currency and, if one was used, the coupon code. Coupon codes you have assigned to affiliates are therefore tracked too, see How to Use and Track Coupon Codes. If you added the conversion code earlier: earlier versions of this article had a # in front of each {{ … }}. If your code has it, replace it with the code above. Sales tracked with the old code have a # in front of their ID and of the customer’s email, so Tapfiliate doesn’t match them with what the new code sends: it doesn’t recognize these customers as returning customers, and if the Thank you page of an old sale is opened again, that sale can be tracked a second time. It’s important to ensure the accuracy of your tracking setup before launching your program. To do this, perform a test conversion using the instructions described here.