Source: https://datafa.st/docs/attribution-guide-with-podia
Markdown source: https://datafa.st/docs/attribution-guide-with-podia.md
Description: Set up revenue attribution when using DataFast with Podia. Track course sales and subscription revenue through Stripe integration.

# Attribute revenue with Podia

← [Revenue attribution guide](/docs/revenue-attribution-guide)

# Attribute revenue with Podia

> Make sure you've [added DataFast tracking](/docs/podia) to your Podia site and [connected your Stripe account](/docs/connect-payment-provider) first.

### 1. Access Podia's Third Party Code settings

1. Log in to your Podia dashboard
2. Go to **Settings** > **Third Party Code**
3. Scroll down to the **Conversion tracking code** section

### 2. Add the DataFast conversion tracking code

Paste the following code in the **Conversion tracking code** field:

```html
<script id="datafast-queue">
  window.datafast = window.datafast || function() {
    window.datafast.q = window.datafast.q || [];
    window.datafast.q.push(arguments);
  };
</script>
<script>
  try {
    if (
      typeof Podia !== "undefined" &&
      Podia.Conversion &&
      Podia.Conversion.customer
    ) {
      var email = Podia.Conversion.customer.email;
      window.datafast("payment", { email: email });
    }
  } catch (e) {
    console.error("DataFast tracking error:", e);
  }
</script>
```

### 3. Save the settings

Click **Save** to apply the conversion tracking code.

## Important notes

- The conversion tracking code only runs on successful purchase completion

> After a successful purchase, you should see revenue data in your DataFast dashboard.
