Customer Segmentation Analytics Table
customer_segmentation_analytics_tvf
The Customer Segmentation Analytics table measures segment performance around a pinned date, including revenue, purchase frequency, and list dynamics. One row per customer per segment instance. Learn more about customer segmentation.
Table GuideWhat You Can Answer With This Table
- How did a segment perform before vs after a specific date? — use
pinned_event_datewith revenue and AOV columns- What products and channels drive a segment's purchases? — use product/campaign/ad breakdown columns
- How is segment membership changing? — use 30-day list dynamics (growth, attrition, persistence, loyalty)
Before You Query
- Required parameters:
pinned_event_date,instance_event_date_start,instance_event_date_end,secondary_event_date_start,secondary_event_date_end,segment_id- Pinned event date is the anchor for comparing "before" vs "after" performance.
- Instance event dates filter which segment snapshots to include. Secondary event dates filter the joined activity (Orders, Pixel Orders).
- Columns labeled
7_day_or30_day_use default windows relative topinned_event_date. To change the window, update the formula interval and rename the alias. Click a column ID in the SQL Builder to view default queries.- Query one derived metric per request. Combining many derived metrics in a single query can lead to slower performance.
- Use smaller date ranges to avoid heavy queries.
Key Relationships
Table Join Key What the Join Enables Customer Segmentation segment_id+instance_event_dateLink analytics with the underlying segment membership snapshot Customers customer_identitytocustomer_idoremail_addressCustomer profile data (name, email, tags, consent) Orders customer_identitytocustomer_idoremail_addressTransaction-level details not in pre-aggregated metrics (product IDs, order tags) Pixel Orders customer_identitytocustomer_idoremail_addressAttribution-level detail (campaign IDs, channels) When to Use a Different Table
- Need the segment membership list (which customers, not performance) → Customer Segmentation table.
- Need customer profiles without segment context → Customers table.
- Need order-level detail not available in pre-aggregated metrics → join to Orders or Pixel Orders via
customer_identity.
Parameters
Parameters can be used to customize and filter the data in the table, and are applied before aggregation
Title | ID | Type | Description |
|---|---|---|---|
Instance Event Date End |
| parameter | End of the segment instance window. Filters which segment instances (runs/snapshots) to include when building the customer list. Use with Example value: |
Instance Event Date Start |
| parameter | Start of the segment instance window. Filters which segment instances (runs/snapshots) to include when building the customer list. Use with Example value: |
Pinned Event Date |
| parameter | The anchor date used to compare before/after segment instance windows. Example value: |
Secondary Event Date End |
| parameter | End of the joined activity window. Filters joined activity pulled from tables other than the Customer Segmentation table (e.g. Orders, Pixel Orders). Use with Example value: |
Secondary Event Date Start |
| parameter | Start of the joined activity window. Filters joined activity pulled from tables other than the Customer Segmentation table (e.g. Orders, Pixel Orders). Use with Example value: |
Segment ID |
| parameter | The unique identifier for a segment. Example value: |
Dimensions
Dimensions are immutable properties that can be used for grouping data
Title | ID | Type | Description |
|---|---|---|---|
Customer Identity |
| string | The identity of the customer in the segment (can be Example values: |
Customer Identity Type |
| string | The type of identity the segment uses for this customer. Example values: |
Instance Event Date |
| date | The event date used for data from tables other than the Customer Segmentation table (e.g., Orders table, Pixel Orders table). Used in membership/instance joins. Formatted according to the ISO 8601 international standard. Example value: |
Segment Name |
| string | The human-readable name of the segment. Example values: |
Shop ID |
| string | The unique ID of the shop (often corresponds to the shop domain). Can be used to group or filter data by shop in multi-store reports. Example values: |
Shop Name |
| string | The name of the shop. Can be used to group or filter data by shop in multi-store reports. Example values: |
Derived
Derived fields are metrics that are pre-calculated using multiple measures or advanced formulas
| Title | ID | Type | Description |
|---|---|---|---|
| 30-Day List Attrition | 30_day_list_attrition | formula | Number of customers who were in the segment 30 days before the pinned_event_date, and left the segment on the pinned_event_date. |
| 30-Day List Growth | 30_day_list_growth | formula | Number of customers who were not in the segment 30 days before the pinned_event_date, and joined the segment on the pinned_event_date. |
| 30-Day List Persistence | 30_day_list_persistence | formula | Count of customers who remained in the segment for at least 30 days (were active both 30 days before the pinned_event_date and on the pinned_event_date). |
| 30-Day Loyal Customers | 30_day_loyal_customers | formula | Number of highly engaged customers who were active on both the start and end dates of a 31-day period and maintained 95% activity frequency (active on at least 29 out of 31 days) |
| 30-Day Recent Joiners | 30_day_recent_joiners | formula | Number of customers who were not in the segment 30 days before the pinned_event_date but joined the segment within the last 29 days leading up to the pinned_event_date. |
| Ad IDs (Last 7 Days) | ad_ids_last_7_days | formula | Ad IDs for customers from the selected segment instances in the 7 days prior to the pinned_event_date. |
| Ad IDs (Next 7 Days) | ad_ids_next_7_days | formula | Ad IDs for customers from the selected segment instances in the 7 days after the pinned_event_date. |
| AOV (Last 7 Days) | aov_last_7_days | formula | Average order value for customers from the selected segment instances in the 7 days prior to the pinned_event_date. |
| AOV (Next 7 Days) | aov_next_7_days | formula | Average order value for customers from the selected segment instances in the 7 days after the pinned_event_date. |
| Campaign IDs (Last 7 Days) | campaign_ids_last_7_days | formula | Campaign IDs for customers from the selected segment instances in the 7 days prior to the pinned_event_date. |
| Campaign IDs (Next 7 Days) | campaign_ids_next_7_days | formula | Campaign IDs for customers from the selected segment instances in the 7 days after the pinned_event_date. |
| Channels (Last 7 Days) | channels_last_7_days | formula | Pixel-attributed channels for customers from the selected segment instances in the 7 days prior to the pinned_event_date. |
| Channels (Next 7 Days) | channels_next_7_days | formula | Pixel-attributed channels for customers from the selected segment instances in the 7 days after the pinned_event_date. |
| Cities (Last 7 Days) | cities_last_7_days | formula | Shipping cities for customers from the selected segment instances in the 7 days prior to the pinned_event_date. |
| Cities (Next 7 Days) | cities_next_7_days | formula | Shipping cities for customers from the selected segment instances in the 7 days after the pinned_event_date. |
| Countries (Last 7 Days) | countries_last_7_days | formula | Shipping countries for customers from the selected segment instances in the 7 days prior to the pinned_event_date. |
| Countries (Next 7 Days) | countries_next_7_days | formula | Shipping countries for customers from the selected segment instances in the 7 days after the pinned_event_date. |
| Order Tags (Last 7 Days) | order_tags_last_7_days | formula | Order tags for customers from the selected segment instances in the 7 days prior to the pinned_event_date. |
| Order Tags (Next 7 Days) | order_tags_next_7_days | formula | Order tags for customers from the selected segment instances in the 7 days after the pinned_event_date. |
| Product IDs (Last 7 Days) | product_ids_last_7_days | formula | Product IDs purchased by customers from the selected segment instances in the 7 days prior to the pinned_event_date. |
| Product IDs (Next 7 Days) | product_ids_next_7_days | formula | Product IDs purchased by customers from the selected segment instances in the 7 days after the pinned_event_date. |
| Purchase Frequency (Last 7 Days) | purchase_frequency_last_7_days | formula | Average number of orders per customer from the selected segment instances in the 7 days prior to the pinned_event_date. |
| Purchase Frequency (Next 7 Days) | purchase_frequency_next_7_days | formula | Average number of orders per customer from the selected segment instances in the 7 days after the pinned_event_date. |
| Revenue (Last 7 Days) | revenue_last_7_days | formula | Total order revenue generated by customers from the selected segment instances in the 7 days prior to the pinned_event_date. |
| Revenue (Next 7 Days) | revenue_next_7_days | formula | Total order revenue generated by customers from the selected segment instances in the 7 days after the pinned_event_date. |
Updated 2 days ago