# RevenueCat

> Connect RevenueCat to see which links bring in app users, trials and subscriptions.

Connect RevenueCat to see which links bring in app users, trials and subscriptions.

## What you can do

- Count first opens, trials, subscriptions and renewals.
- See real app revenue on your Board and in Analytics, in US dollars.
- Rank your links by the subscribers they bring.

## Before you begin

> **Tip:** You need a RevenueCat project you can manage. It takes about two minutes: you copy one ID and create one key.

## Get your RevenueCat ID and key

1. In RevenueCat, open your project, then **Project settings**.
2. Copy your **Project ID**. It starts with proj.
3. Open **API keys** and click **+ New secret API key**. Name it **Link Studio** and choose **V2**.
4. Give it read access to **Customer information**: customers, subscriptions and purchases. Nothing else is needed.
5. Click **Generate** and copy the key. It starts with sk_.

See [RevenueCat’s guide to API keys](https://www.revenuecat.com/docs/projects/authentication) if your screens look different.

## Connecting RevenueCat

To connect RevenueCat:

1. Click **Add-ons** in the sidebar.
2. Find **RevenueCat** under **Connections** and click **Connect**.
3. Fill in the fields below.
4. Click **Connect**.

| Field | What to enter |
| --- | --- |
| Name | A name you will recognize, like RevenueCat. |
| Identity namespace | Your website or app, like yourshop.com. Use the same one for every tool that belongs to the same site or app. |
| Project ID | Your RevenueCat project ID, starting with proj. |
| Secret API key | Your v2 secret key, starting with sk_. |

> **Figure:** Connecting RevenueCat
>
> Link Studio's RevenueCat form with a project ID and secret key filled in

Once connected, your whole history comes in, so your numbers fill in straight away. After that, Link Studio reads your customers again as soon as it finishes, so new sales keep coming in.

## Connect your app to your links

For an install or subscription to count on the link that brought it, your app saves the link when it opens from one. Read the link ID and click ID from the link that opened the app, for example a deferred deep link, and save them on the customer in RevenueCat with the time, like this:

```
Purchases.shared.attribution.setAttributes([
  "ls_link_id": linkId,
  "ls_click_id": clickId,
  "ls_touch_at": ISO8601DateFormatter().string(from: Date())
])
```

> **Tip:** Your developer or AI coding assistant can add this in a few minutes. Give them this page.

## Check it's working

- On **Add-ons**, the RevenueCat card shows **Disconnect** and the last sync time.
- In **Analytics**, first opens, trials and subscriptions start to appear within a few minutes.
- Revenue appears on the Board and in Analytics in US dollars.

## Disconnecting RevenueCat

On the **Add-ons** page, click **Disconnect** on the RevenueCat card and confirm. RevenueCat stops syncing until you connect it again.

## FAQs

### Does Link Studio count RevenueCat test payments?

No. Link Studio keeps RevenueCat test and sandbox data out of your live reports.

### Why does Link Studio show RevenueCat revenue in dollars?

Link Studio shows all revenue in US dollars. RevenueCat reports the dollar amount of every sale, so totals in Link Studio match RevenueCat.

### Do I need Superwall as well as RevenueCat in Link Studio?

No. Connect the one you use for subscriptions. If you connect both to Link Studio, each sale is still counted once.

### How quickly do RevenueCat sales show up in Link Studio?

People who used your site or app in the last 30 minutes, or paid in the last day, are checked every few seconds, so their purchases show up quickly. RevenueCat has no list of recent sales, so Link Studio reads everyone else one by one about every 10 minutes. The more customers you have, the longer each read takes.

Source: https://linkstudio.link/docs/revenuecat/
