> ## Documentation Index
> Fetch the complete documentation index at: https://docs.partnero.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Integrate Podia

> Track Podia course, download, coaching and membership purchases by referred customers in Partnero.

[Podia](https://www.podia.com) is a platform for selling courses, digital downloads, coaching and memberships. You track Podia purchases in Partnero with two pieces of code on your Podia site.

## How it works

1. **PartneroJS** remembers which partner sent the visitor.
2. **The conversion tracking code** runs after checkout. It creates the customer and records the purchase for that partner, with the buyer's email, the amount and the order ID that Podia provides.

## Before you start

* **Podia Mover plan or higher** for third-party code.
* **Admin access** to your Podia site and to your Partnero program.

## Set up tracking

**1. Add the tracking snippet**

In Partnero, go to **Integration** → **Guides** → **Podia** and copy the PartneroJS snippet. It contains your program's ID. Then:

1. Log in to Podia, click your site name and select **Admin**.
2. Go to **Settings** → **Analytics** and click **Edit** next to **Third-party code**.
3. Paste the snippet into the **Website tracking code** field and save.

**2. Add the purchase code**

Choose a method below and paste its code into the **Conversion tracking code** field in the same **Third-party code** settings.

**3. Test with a real purchase**

Open your site through a partner's referral link in a private browser window, with ad blockers turned off, and buy a product. Podia runs tracking code for visitors who are logged out of Podia, so the private window matters. The customer appears under **Customers** in Partnero.

## Choose how purchases are tracked

> [tab] Conversion tracking code
>
> The recommended method. It records purchases paid through Stripe or PayPal, and creates the customer for free products.
>
> 1. In Partnero, turn on **Allow JS calls to create transactions**; see [Secure JavaScript calls](https://docs.partnero.com/integrations/how-to-enable-secure-javascript-calls.md).
> 2. Paste this code into **Conversion tracking code** in Podia and save.
>
> ```html theme={"system"}
> <script>
> window.addEventListener('load', function() {
>   var conversion = window.Podia && window.Podia.Conversion;
>   if (!conversion || !conversion.customer || !conversion.customer.email) {
>     return;
>   }
>   var customer = conversion.customer;
>   var name = [customer.first_name, customer.last_name].filter(Boolean).join(' ');
>   po('transactions', 'create', {
>     data: {
>       key: 'podia_' + conversion.object.order_id,
>       amount: conversion.revenue,
>       amount_units: conversion.currency,
>       customer: {
>         key: customer.email,
>         email: customer.email,
>         name: name || customer.email
>       }
>     },
>     options: {
>       create_customer: true
>     }
>   });
> });
> </script>
> ```
>
> Podia runs the code once per purchase, so each sale is recorded once.
>
> > [!NOTE]
> >
> > This method records the purchase made at checkout. When you refund a referred customer, delete the transaction in Partnero to reverse the commission. To track membership renewals too, use the **Stripe** method.

> [tab] Stripe
>
> If Podia takes payments through your Stripe account, [connect Stripe](https://docs.partnero.com/integrations/stripe.md) to Partnero. Payments, membership renewals and refunds by referred customers are then tracked automatically.
>
> Partnero matches each Stripe payment to a customer by email, so paste this code into **Conversion tracking code** in Podia to create the customer. Use it instead of the conversion tracking code from the other tab.
>
> ```html theme={"system"}
> <script>
> window.addEventListener('load', function() {
>   var conversion = window.Podia && window.Podia.Conversion;
>   if (!conversion || !conversion.customer || !conversion.customer.email) {
>     return;
>   }
>   var customer = conversion.customer;
>   var name = [customer.first_name, customer.last_name].filter(Boolean).join(' ');
>   po('customers', 'signup', {
>     data: {
>       key: customer.email,
>       email: customer.email,
>       name: name || customer.email
>     }
>   });
> });
> </script>
> ```
>
> > [!NOTE]
> >
> > Renewals are always credited to the partner. The first payment is credited when the customer is created before Stripe reports it, which can go either way because Podia shows the thank-you page after taking the payment. If most of your sales are one-time purchases, use the conversion tracking code method.

## Troubleshooting

> [accordion] Nothing appears in Partnero after a test purchase
>
> Test in a private window, logged out of Podia and with ad blockers turned off. Check that the PartneroJS
> snippet is in **Website tracking code** and the purchase code is in **Conversion tracking code**.

> [accordion] The customer appears but there's no transaction
>
> With the conversion tracking code, check that **Allow JS calls to create transactions** is on, and that the
> product is paid. With Stripe, check that Stripe is connected to Partnero and that the purchase was paid
> through Stripe.

> [accordion] Purchases are counted twice
>
> Stripe is connected while the conversion tracking code also records purchases. Use the code from the
> **Stripe** tab, which creates the customer only.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.