–Hidden comment

Use attributes in format region_from and region_to= to change the languages showing in language switcher.
Available regions are:
europe_from europe_to
asia_from asia_to
mideast_from mideast_to
america_from america_to

Example:
europe_from=0 europe_to=22 will put all languages (ordered in language switcher settings) from 1 to 21 to Europe region:
asia_from=22 asia_to=25 will put all languages from 23 to 24 (so only 2) into Asia region.

teachable

A platform that lets you easily create and sell online courses even with no design or coding experience.

Teachable lets you easily create and sell online courses even with no design or coding experience.

The integration requires you to edit thank you pages for all courses which you wish to track. It enables you to use per product tracking, lifetime commissions and multiple currencies.

Thank you page integration

Teachable currently doesn’t have one general thank you page and therefore it requires you to add tracking codes to every single course you wish to track with Post Affiliate Pro. To do this navigate in your teachable admin account to Courses, Edit a course, then on the left side go to Pages and edit the Thank You Page where you need to check the checkbox for Add Custom Code and enter there the following code:

<script id="pap_x2s6df8d" src="https://URL_TO_PostAffiliatePro/scripts/trackjs.js" type="text/javascript"></script> <script type="text/javascript">
function getTokens(){
    var tokens = [];
    var query = location.search;
    query = query.slice(1);
    query = query.split('&');

    $.each(query, function(i,value){
        var token = value.split('=');
        var key = decodeURIComponent(token[0]);
        var data = decodeURIComponent(token[1]);
        tokens[key] = data;
    });    return tokens;
}

tokens = getTokens();
PostAffTracker.setAccountId('Account_ID');
var sale = PostAffTracker.createSale();
sale.setTotalCost(tokens['final_price']/100);
sale.setOrderID(tokens['sale_id']);
sale.setProductID(tokens['purchased_course_id']);

PostAffTracker.register();
</script>

If you wish to use Lifetime Commissions then you can save user’s ID into the commission by adding the following function under the line with sale.setProductID:

sale.setData1(tokens['user_id']);

If you’d like to save user’s email address and it is available on thank you page you will need to customize the code to scrape the email address from the thank you page’s content.

If you are selling in multiple currencies and you want to correctly track the commissions using Multiple Currencies feature then also add this line:

sale.setCurrency(tokens['currency'];

Do not forget to insert the click tracking code into your landing pages.

Get the actual click tracking code from your Post Affiliate Pro merchant panel Tools > Integration > Clicks tracking and then navigate in your Teachable admin panel to Site > Code Snippets and insert the code to Head Code Snippets and Save the section.

Back to Integrations Create account for FREE

Our website uses cookies. By continuing we assume your permission to deploy cookies as detailed in our privacy and cookies policy.

×

Schedule a one-on-one call and discover how Post Affiliate Pro can benefit your business.

We’re available on multiple dates

Schedule a call