> ## 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.

# Upstack-Generated Events

> Events automatically generated by Upstack backend for Shopify customers — purchase segmentation, AOV tiers, and subscription tracking

<Info>
  **Automatically Generated** — All events in this section are created by Upstack backend services for Shopify customers. You do not need to fire these events manually — they appear in your destinations automatically based on purchase data analysis.
</Info>

## Overview

Upstack automatically generates enriched purchase events that segment your customers beyond the standard `purchase` event. These events enable more sophisticated ad optimization, better attribution, and deeper customer insights.

When a purchase occurs in your Shopify store, Upstack's backend analyzes the order and customer history to generate additional events alongside the standard `purchase` event.

## Available Events

### Customer Type Events

| Event             | Description                                  | Link                                                             |
| ----------------- | -------------------------------------------- | ---------------------------------------------------------------- |
| `nc_purchase`     | New customer purchases (first-time buyers)   | [Documentation](/pixel/events/upstack-generated/nc-purchase)     |
| `rc_purchase`     | Returning customer purchases (repeat buyers) | [Documentation](/pixel/events/upstack-generated/rc-purchase)     |
| `all_purchase`    | All purchases (combines NC + RC)             | [Documentation](/pixel/events/upstack-generated/all-purchase)    |
| `lapsed_purchase` | Purchases from lapsed customers who returned | [Documentation](/pixel/events/upstack-generated/lapsed-purchase) |
| `upsell_purchase` | Upsell conversions                           | [Documentation](/pixel/events/upstack-generated/upsell-purchase) |

### AOV-Segmented Events

| Event               | Description                         | Link                                                        |
| ------------------- | ----------------------------------- | ----------------------------------------------------------- |
| `high_aov_purchase` | Purchases above average order value | [Documentation](/pixel/events/upstack-generated/aov-events) |
| `low_aov_purchase`  | Purchases below average order value | [Documentation](/pixel/events/upstack-generated/aov-events) |
| `p70_aov_purchase`  | Purchases above 70th percentile     | [Documentation](/pixel/events/upstack-generated/aov-events) |
| `p80_aov_purchase`  | Purchases above 80th percentile     | [Documentation](/pixel/events/upstack-generated/aov-events) |
| `p90_aov_purchase`  | Purchases above 90th percentile     | [Documentation](/pixel/events/upstack-generated/aov-events) |

### Subscription Events

| Event                             | Description                       | Link                                                                          |
| --------------------------------- | --------------------------------- | ----------------------------------------------------------------------------- |
| `subscription_initial_purchase`   | First-time subscription purchases | [Documentation](/pixel/events/upstack-generated/subscription-purchase-events) |
| `subscription_recurring_purchase` | Recurring subscription renewals   | [Documentation](/pixel/events/upstack-generated/subscription-purchase-events) |

## How They Work

```mermaid theme={null}
flowchart LR
    A[Shopify Webhook] --> B[Upstack Backend]
    B --> C{Customer Analysis}
    C --> D[NC/RC Classification]
    C --> E[AOV Segmentation]
    C --> F[Subscription Detection]
    C --> G[Lapsed Detection]
    D --> H[Destination Events]
    E --> H
    F --> H
    G --> H
```

1. **Shopify sends a purchase webhook** to Upstack when an order is placed
2. **Upstack analyzes** the customer's order history, order value, and subscription status
3. **Multiple events are generated** based on the analysis (e.g., both `nc_purchase` and `high_aov_purchase` for a high-value first-time buyer)
4. **Events are forwarded** to your configured destinations with proper attribution

## Why Use These Events?

### Better Ad Optimization

Instead of optimizing for all purchases equally, train ad algorithms to find:

* **New customers** — Reduce wasted spend on existing customers
* **High-AOV customers** — Find customers who spend more
* **Subscription-likely customers** — Acquire subscribers with higher LTV

### More Accurate Attribution

Understand which campaigns drive:

* True customer acquisition (not just repeat purchases)
* Premium customers (high AOV)
* Subscription sign-ups vs. one-time purchases
* Win-back conversions from lapsed customers

### Deeper Insights

Compare performance across customer segments:

* New vs. returning customer CAC
* High vs. low AOV by channel
* Subscription acquisition costs
* Win-back campaign effectiveness

## Destination Support

All Upstack-generated events are forwarded to your configured destinations:

| Destination       | Support | Notes                                     |
| ----------------- | ------- | ----------------------------------------- |
| Meta CAPI         | ✅ Full  | Event name + custom data for segmentation |
| Google Ads        | ✅ Full  | Filterable conversion events              |
| TikTok Events API | ✅ Full  | Event name included                       |
| Klaviyo           | ✅ Full  | Tagged events for segmentation            |
| GA4               | ✅ Full  | Custom dimensions available               |

## Getting Started

These events are generated automatically for Shopify stores — no additional configuration needed. To use them:

1. **Check your destinations** — Ensure you have destinations configured in Upstack
2. **Configure event mapping** — Select which generated events to send to each destination
3. **Set up conversion tracking** — Configure your ad platforms to track these specific events
4. **Build reports** — Use the Upstack dashboard to compare metrics across event types

<CardGroup cols={2}>
  <Card title="New Customer Purchases" icon="user-plus" href="/pixel/events/upstack-generated/nc-purchase">
    Optimize for customer acquisition
  </Card>

  <Card title="AOV Events" icon="chart-line" href="/pixel/events/upstack-generated/aov-events">
    Segment by order value
  </Card>

  <Card title="Subscription Events" icon="repeat" href="/pixel/events/upstack-generated/subscription-purchase-events">
    Track subscription metrics
  </Card>

  <Card title="Lapsed Purchases" icon="user-clock" href="/pixel/events/upstack-generated/lapsed-purchase">
    Measure win-back campaigns
  </Card>
</CardGroup>
