Product Analytics Table Function (BETA)

product_analytics_tvf

The Product Analytics table provides detailed insights into product and variant 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 product-level performance.

🚧

Key Concepts When Using Product Analytics Table Function

Data Structure

  • The Product Analytics table function provides insights at both the product and variant levels. Data is structured to allow users to analyze performance metrics for individual variants (e.g., specific sizes or colors) and aggregate data at the product level (e.g., all sizes and colors of a product).
  • The id field represents either the product_id or variant_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 and variants 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.

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 time zone of the shop at the moment of purchase.

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.

Entity

entity

string

The entity type of the item.

Example values: product, variant

ID

id

string

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

Example value: 3891505496131

Inventory Quantity

inventory_quantity

string

The current inventory quantity of the product or variant.

Example values: 21749, 57, 332

Product ID

product_id

string

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

Example value: 3891505496131

Product Image URL

product_image_url

string

The URL of the product image.

Product Tags

product_tags

repeated string

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

Example values: 3-pack, Sale, discount_eligible

Product Title

product_title

string

The title of the product as set within the main sales platform.

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

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

Title

title

string

The title of the product or variant as set within the main sales platform.

Example values: Paring Knife Travel Case, Gift Subscription, Black, XXL

Variant ID

variant_id

string

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

Example value: 33193425920151

Variant Title

variant_title

string

The title of the variant as set within 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.

New Customer Orders

new_customer_orders

numeric

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

Note that Triple Whale classifies all customers as either new or returning, while the main sales platform may leave some unclassified, potentially leading to discrepancies.

New Customer Revenue

new_customer_revenue

numeric

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

Note that Triple Whale classifies all customers as either new or returning, while the main sales platform may leave some unclassified, potentially leading to discrepancies.

New Customer Total Items Sold

new_customer_total_items_sold

numeric

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

Note that Triple Whale classifies all customers as either new or returning, while the main sales platform may leave some unclassified, potentially leading to discrepancies.

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 adjustments such as discounts, shipping, fees, taxes, and refunds.

Note that Triple Whale classifies all customers as either new or returning, while the main sales platform may leave some unclassified, potentially leading to discrepancies.

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 derived from orders by 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 adjustments such as discounts, shipping, fees, taxes, and 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 / Total Items 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) / Total Items Sold

Cost Per Acquisition (CPA)

cpa

formula

The cost to acquire a single paying customer.

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

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

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

New Customer ROAS

new_customer_roas

formula

Revenue generated from new customers relative to ad spend.

New Customer ROAS = New Customer Revenue / Ad Spend

Pixel Conversion Rate

pixel_conversion_rate

formula

The percentage of visitors who made a purchase.

Pixel Conversion Rate = Total Orders / Total Visitors

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 / Total Items 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