Product Analytics Table

product_analytics_tvf

The Product Analytics table provides detailed insights into product, variant, and collection performance, including sales, orders, customer behavior, and ad-driven metrics like clicks, impressions, and spend. Analyzing this table helps uncover sales drivers, understand purchasing trends, and evaluate how marketing efforts impact performance across different levels of your catalog.

🚧

Key Concepts When Using Product Analytics Table Function

Data Structure

  • The Product Analytics table function provides insights at the product, variant, and collection levels. Data is structured to allow users to analyze performance metrics for individual variants (e.g., specific sizes or colors), aggregate data at the product level (e.g., all sizes and colors of a product), and group performance at the collection level (e.g., curated product groups or merchandising themes).
  • The id field represents product_id, variant_id, or collection_id depending on the row, ensuring seamless identification across different levels of granularity.

Metrics and Attribution

  • Metrics such as spend, clicks, impressions, and visits are proportionally distributed (based on quantity, not price) to products, variants, and collections based on their contribution to completed orders, using the Triple Attribution model and lifetime attribution window by default.
📘

Note

event_date is a required field for queries on this table.

The Product Analytics table reflects data from your primary sales platform. It does not include sales data from Amazon or TikTok Shop.

Parameters

Parameters can be used to customize and filter the data in the table, and are applied before aggregation.

Title

ID

Description

Include Free Products

include_free_products

Includes products considered "free" based on multi-item discounts.

Possible values: true, false

Note: Some discounts are spread across multiple items in an order; if the discount fully covers the price of some of the items, those items are counted as “free".

Include Non-Active Products

include_non_active_products

Includes non-active (e.g. draft or pending) products.

Possible values: true, false

Dimensions

Dimensions are immutable properties that can be used for grouping data.

Title

ID

Type

Description

Event Date

event_date

date

The date the order was placed. Based on the shop time zone at the moment of the event (or the user time zone, if no sales platform is connected).

Event Day

event_date.day

date

The day on which the event occurred. Derived from event_date.

Event Week

event_date.week

date

The Sunday of the week during which the event occurred. Derived from event_date.

Event Month

event_date.month

date

The month during which the event occurred. Derived from event_date.

Event Quarter

event_date.quarter

date

The first month of the quarter during which the event occurred. Derived from event_date.

Event Year

event_date.year

date

The year during which the event occurred. Derived from event_date.

Collection ID

collection_id

string

The unique ID of the collection as defined in the sales platform.

Example value: 123456789

Collection Name

collection_name

string

The name of the collection as defined in the sales platform.

Example values: Summer Gift Guide, Long-Sleeve Packs, Christmas Collection

Entity Type

entity

string

The entity type of the item.

Example values: product, variant, product_collection

ID

id

string

The unique ID of the item for the current row. The value depends on the granularity level of the query (variant-level granularity → variant_id; product-level granularity → product_id; collection-level granularity → collection_id).

Example value: 3891505496131

Inventory Quantity

inventory_quantity

string

The current inventory quantity of the product or variant.

Example values: 21749, 57, 332

Name

name

string

The name of the item for the current row. The value depends on the granularity level of the query (variant-level granularity → variant_name; product-level granularity → product_name; collection-level granularity → collection_name).

Example values: Paring Knife Travel Case, Forest Green, Christmas Collection

Product ID

product_id

string

The unique ID of the product as defined in the sales platform.

Example value: 3891505496131

Product Image URL

product_image_url

string

The URL of the product image.

Product Name

product_name

string

The name of the product as defined in the sales platform. This value is always product-level (e.g., “T-Shirt”, “Hoodie”) even when querying variant-level granularity, ensuring each variant row also shows the product it belongs to.

Example values: Green Soft Socks 3-Pack, Paring Knife Travel Case, Gift Subscription

Product Tags

product_tags

repeated string

Tags associated with the product, assigned by the seller in the sales platform.

Example values: 3-pack, Sale, discount_eligible

Shop ID

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: example-US.myshopify.com, example-EU.myshopify.com

Shop Name

shop_name

string

The name of the shop. Can be used to group or filter data by shop in multi-store reports.

Example values: example-US, example-EU

SKU

sku

string

The SKU (Stock Keeping Unit) for the product or variant as set within the main sales platform.

Example values: GP-BACK-02, A02630, POP200NAVY

Variant ID

variant_id

string

The unique ID of the variant as set within the main sales platform.

Example value: 33193425920151

Variant Name

variant_name

string

The name of the variant as defined in the main sales platform.

Example values: Forest Green, M, iPhone 14 Pro

Vendor

vendor

string

The vendor of the product or variant.

Example values: Route, Canon, Corso, MyShop

Measures

Measures are numeric fields that can be aggregated and/or combined to calculate new metrics.

Title

ID

Type

Description

Added to Cart Events

added_to_cart_events

numeric

Number of times the product or variant was added to a cart. Adding multiple units in a single action counts as one event.

Added to Cart Items

added_to_cart_items

numeric

Total quantity of the product or variant added to carts. Each unit counts individually, even when multiple units are added in a single action.

Clicks

clicks

numeric

Total number of ad clicks attributed to the product or variant, based on its share of units sold per ad.

Clicks for Product = (Units Sold for Product / Units Sold for Ad) × Clicks for Ad, summed across all relevant ads and campaigns.

Customers

customers

numeric

Total number of unique customers who purchased the product or variant.

Fulfillment Costs

fulfillment_costs

numeric

Total costs associated with fulfilling orders that include the product or variant.

Impressions

impressions

numeric

Total number of ad impressions attributed to the product or variant, based on its share of units sold per ad.

Impressions for Product = (Units Sold for Product / Units Sold for Ad) × Impressions for Ad, summed across all relevant ads and campaigns.

New Customer Fulfillment Costs

new_customer_fulfillment_costs

numeric

Total costs associated with fulfilling orders that include the product or variant placed by new customers.

Learn how Triple Whale classifies new/returning customers.

New Customer Orders

new_customer_orders

numeric

The total number of orders by new customers that contain the product or variant.

Learn how Triple Whale classifies new/returning customers.

New Customer Revenue

new_customer_revenue

numeric

The total revenue derived from orders by new customers that contain the product or variant.

Learn how Triple Whale classifies new/returning customers.

New Customer Units Sold

new_customer_total_items_sold

numeric

Total quantity of the product or variant ordered by new customers.

Learn how Triple Whale classifies new/returning customers.

New Customer Total Order Value

new_customer_total_order_value

numeric

The total revenue of orders by new customers that contain the product or variant, before shipping, taxes, discounts, or refunds.

Learn how Triple Whale classifies new/returning customers.

Ads

number_of_ads

numeric

Total number of ads contributing to orders containing the product or variant.

Orders

orders

numeric

The total number of orders that contain the product or variant.

Repeat Customers

repeat_customer

numeric

Total number of unique customers who purchased the product or variant more than once.

Returns

returns

numeric

The total number of product or variant units returned.

Order Revenue

revenue

numeric

The total revenue from orders that contain the product or variant.

Ad Spend

spend

numeric

Total ad spend attributed to the product or variant based on its proportional share of units sold in each ad. This does not include custom ad spend or adjustments for returns.

Ad Spend for Product = (Units Sold for Product / Units Sold for Ad) × Ad Spend for Ad, summed across all relevant ads and campaigns.

Units Sold

total_items_sold

numeric

The total number of individual units sold for the product or variant.

Total Order Value

total_order_value

numeric

The total revenue of orders that contain the product or variant, before shipping, taxes, discounts, or refunds.

Visits

visits

numeric

Total number of sessions attributed to the product or variant, based on its share of units sold per ad.

Visits for Product = (Units Sold for Product / Units Sold for Ad) × Sessions for Ad, summed across all relevant ads and campaigns.

Derived

Derived fields are metrics that are pre-calculated using multiple measures or advanced formulas.

Title

ID

Type

Description

Average Purchase Price

avg_purchase_price

formula

The average price per item sold.

Average Purchase Price = Order Revenue / Units Sold

Contribution Margin

contribution_margin

formula

The total profit contribution after subtracting fulfillment costs and ad spend from total revenue.

Contribution Margin = Order Revenue - Fulfillment Costs - Ad Spend

Contribution Margin Per Item

contribution_margin_per_item

formula

The profit contribution for each item sold.

Contribution Margin Per Item = (Order Revenue - Fulfillment Costs - Ad Spend) / Units Sold

Cost Per Acquisition (CPA)

cpa

formula

The cost to acquire a single order.

CPA = Total Ad Spend / Total Orders

Cost Per Click (CPC)

cpc

formula

The average cost for each click on an ad.

CPC = Total Ad Spend / Total Clicks

Cost Per Thousand Impressions (CPM)

cpm

formula

The cost to reach 1,000 ad impressions.

CPM = Total Ad Spend / (Total Impressions / 1,000)

Click-Through Rate (CTR)

ctr

formula

The percentage of ad impressions that resulted in clicks.

CTR = Total Clicks / Total Impressions

Gross Profit

gross_profit

formula

The total profit excluding fulfillment costs.

Gross Profit = Revenue - Fulfillment Costs

New Customer AOV

new_customer_aov

formula

The average order value for new customers, indicating the average spend per order by new customers.

New Customer AOV = New Customer Total Order Value / New Customer Orders

Learn how Triple Whale classifies new/returning customers.

New Customer CPA

new_customer_cpa

formula

The cost to acquire a single new paying customer.

New Customer CPA = Total Ad Spend / New Customer Orders

Learn how Triple Whale classifies new/returning customers.

New Customer Gross Profit

new_customer_gross_profit

formula

The gross profit generated from new customers.

New Customer Gross Profit = New Customer Revenue - New Customer Fulfillment Costs

Learn how Triple Whale classifies new/returning customers.

New Customer ROAS

new_customer_roas

formula

Revenue generated from new customers relative to ad spend.

New Customer ROAS = New Customer Revenue / Ad Spend

Learn how Triple Whale classifies new/returning customers.

Pixel Conversion Rate

pixel_conversion_rate

formula

The percentage of visits who made a purchase.

Pixel Conversion Rate = Total Orders / Total Visits

Product AOV

product_aov

formula

The average order value for products, representing the average amount spent per order.

Product AOV = Total Order Value / Total Orders

Return Rate

return_rate

formula

The percentage of purchased items that customers return.

Return Rate = Returns / Units Sold

Return on Ad Spend (ROAS)

roas

formula

The total revenue generated relative to ad spend.

ROAS = Order Revenue / Ad Spend

Repeat Purchase Rate

rpr

formula

The percent of purchases made by returning customers.

RPR = Repeat Customers / Total Orders