# Install on Podia

> Add Reveata to a Podia site through its third-party code settings, serve it from your own subdomain, and credit Podia sales to their visits from the conversion code.

Podia runs your own tracking code on the pages it hosts, including checkout, on plans that include third-party code. Your account email must be verified.

Copy the snippet from your Reveata dashboard (it contains your website’s tracking id):

```html
<script
  defer
  data-website-id="ws_your_tracking_id"
  src="https://reveata.com/js/script.js"
></script>
```

## Add it to your site

1. In Podia, open **Settings → Analytics**, find **Third-party code** and choose **Edit**.
2. Paste the snippet into **Website tracking code**, then save.

Podia places this code at the end of each page rather than in the `<head>`. The snippet works there too. It runs on your site, sales pages and checkout, but not inside the product viewer where signed-in customers watch their courses.

In Reveata, add the website with the address visitors use: your custom domain, or your `.podia.com` address. If your Podia pages live on a subdomain of your main site (for example `shop.example.com` next to `example.com`), one Reveata website covers both, and the same visitor is recognised on each.

## Serve it from your own subdomain

Podia can’t run proxy code, but with a custom domain the [managed proxy](https://reveata.com/docs/managed-proxy) needs none: add one DNS record (for example `stats.example.com`) where your domain’s DNS is managed, then replace the snippet with the new one Reveata gives you.

## Revenue

Podia pays you through the Stripe and PayPal accounts you connected in **Settings → Payments**. Two steps:

1. **Get the sales in.** Connect the same Stripe account in Reveata under **Settings → Payments** ([restricted key](https://reveata.com/docs/stripe-restricted-key) or [Connect with Stripe](https://reveata.com/docs/stripe-connect)). PayPal sales are not in Stripe; send those with the [Payments API](https://reveata.com/docs/payments-api), or count them as unverified browser payments (below).
2. **Credit them to visits.** Podia runs **Conversion tracking code** (next to **Website tracking code** in the third-party code settings) once, after a successful purchase, and gives it the order as `Podia.Conversion`. Paste this there:

```html
<script>
  (function () {
    var c = window.Podia && window.Podia.Conversion;
    var email = c && c.customer && c.customer.email;
    if (email && window.reveata) window.reveata('payment', { email: email });
  })();
</script>
```

The Stripe payment with that email, from a day before to a day after, is credited to the visitor who just bought. Podia only provides the order once, so reloading the page sends nothing. See [Thank-you page payments](https://reveata.com/docs/thank-you-page-payments).

To count PayPal sales from the same code, turn on **Settings → Payments → Accept unverified browser payments** in Reveata and add the amount: `{ email: email, amount: c.revenue_cents / 100, currency: c.currency }`. These payments are marked **Unverified**. If a Stripe payment with the same email arrives within a day, it replaces the unverified one, so a sale is never counted twice.


More options, including identifying people on your email signup forms: [Revenue from Podia](https://reveata.com/docs/revenue-podia).

## Check it works

1. Open your Podia site in a normal browser window with ad blockers turned off for it.
2. Open **Realtime** in Reveata: your visit appears within a few seconds.
3. If nothing arrives, follow [Verify your installation](https://reveata.com/docs/verify-your-installation).

For revenue: open your site from a link ending in `?ref=test`, buy a cheap product, and refund it afterwards. The sale appears under **Revenue** with the source `test`.

## Goals

You usually can’t add attributes to Podia’s own buttons, so use goals that need no code. In Reveata, open **Goals**, choose **Add goals** and use **Page visit, no code**: enter the path of a page only buyers or subscribers reach, such as Podia’s thank-you page (`/thanks/` followed by the product’s address), and a goal name like `purchase`. Funnels can use page visits as steps too: see [Funnels](https://reveata.com/docs/funnels).

## Common pitfalls

- **No third-party code setting.** Your plan doesn’t include it, or your email isn’t verified yet.
- **Code meant for the `<head>`.** Podia doesn’t support it, but the Reveata snippet doesn’t need to be there.
- **A checkout success redirect.** If you redirect buyers to a page of your own after checkout, the conversion code may not run on Podia’s page; call `reveata('payment', …)` on your own page instead, or rely on email matching.
- **Counting sales twice.** Don’t send the same sales with the Payments API and through Stripe.
