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

# subscription_initial_purchase Event

> Track first subscription purchases — generated automatically from Shopify subscription orders, or fired manually from SaaS apps and other platforms.

> [!NOTE]
>
> **Automatically generated for Shopify** — Upstack creates this event from Shopify subscription orders, so Shopify stores don't fire it manually. On other platforms, [fire it yourself](#fire-it-manually-non-shopify).

Fires when a customer places the first order of a subscription.

## How It Works

Upstack checks every `purchase` event it processes. It generates `subscription_initial_purchase` as a copy of the purchase when either of these is true:

* The order has one of these tags: `Subscription First Order`, `Subscription First Order Loop`, `First Subscription`, `subscription_start` or `subscription checkout`. Case doesn't matter, but the tag must match exactly.
* At least one line item has a Shopify selling plan, and the order isn't a [recurring subscription order](https://docs.upstackdata.com/event-tracking/event-taxonomy/upstack-generated/subscription-recurring-purchase.md).

The original `purchase` event is still sent as usual.

## Parameters

On Shopify, you don't send this event. Upstack creates it from [`purchase`](https://docs.upstackdata.com/event-tracking/event-taxonomy/standard-events/purchase), so it carries the same standard parameters and user data.

## Destination Mapping

| Destination | Event name | Sent by default |
| - | - | - |
| Meta | `subscriptionInitialPurchase` (custom event) | Yes |
| TikTok | `SubscriptionInitialPurchase` | Yes |
| Klaviyo | `Subscription Initial Order - Upstack` | Yes |
| Microsoft Ads | `subscription_initial_purchase` (custom event) | Yes |
| Google Ads | The conversion action you map it to | No. Map it to a conversion action |
| GA4, Pinterest, Reddit | Your choice | No. Add a [destination event mapping](https://docs.upstackdata.com/guides/custom-events/destination-event-mappings.md) |
| Snapchat, LinkedIn, AppLovin | Not sent | No |

Meta needs each custom event approved before you can optimize on it. See [How to approve Meta custom events](https://docs.upstackdata.com/destinations/catalog/meta-capi/how-to-approve-facebook-meta-custom-events.md).

## Fire it manually (non-Shopify)

On platforms other than Shopify — for example a SaaS app billing through Stripe — Upstack can't detect subscription orders, so fire this event yourself. Shopify stores shouldn't fire it manually, or it will be counted twice.

```javascript theme={null}
window._upstack('track', 'subscription_initial_purchase', {
  // Standard parameters
  value: 99.00,
  currency: 'USD',
  subscriptionId: 'sub_def456',
  accountId: 'acct_abc123',
  planId: 'plan_pro_monthly',
  planName: 'Pro Plan',
  billingInterval: 'month',

  // User data
  email: 'jane@example.com'
});
```

| Name | Type | Required | Example value | Description |
| - | - | - | - | - |
| `value` | `number` | Yes | `99.00` | Payment amount, in major units. |
| `currency` | `string` | Yes | `USD` | ISO 4217 currency code. |
| `subscriptionId` | `string` | Yes | `sub_def456` | Your subscription ID. |
| `accountId` | `string` | Yes | `acct_abc123` | Your account or organization ID. |
| `planId` | `string` | Yes | `plan_pro_monthly` | Your plan ID. |
| `planName` | `string` | No | `Pro Plan` | Plan display name. |
| `billingInterval` | `string` | No | `month` | One of `day`, `week`, `month`, `year`. |

Fire it when:

* The first subscription charge succeeds
* A trial converts to its first paid billing period

## Metrics Available

| Metric | Description |
| - | - |
| Subscription Initial Purchases | New subscription sign-ups |
| Cost per Subscription Initial Purchase | CAC for new subscribers |
| Subscription Initial Purchase Value | Revenue from new subscriptions |

> [!NOTE]
>
> For other subscription lifecycle events (trials, plan changes, cancellations), see [SaaS Events](https://docs.upstackdata.com/event-tracking/event-taxonomy/saas-events).

## Related events

* [purchase](https://docs.upstackdata.com/event-tracking/event-taxonomy/standard-events/purchase.md) — The base purchase event
* [subscription\_recurring\_purchase](https://docs.upstackdata.com/event-tracking/event-taxonomy/upstack-generated/subscription-recurring-purchase.md) — Recurring subscription renewals
* [nc\_purchase](https://docs.upstackdata.com/event-tracking/event-taxonomy/standard-events/nc-purchase.md) — New customer purchases


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