Skip to main content

Path to Purchase

The Path to Purchase template analyzes which advertising campaigns customers interacted with before making a purchase. This helps partners understand how different ad formats and campaigns influence buying decisions and optimize their media investment strategies.

The analysis identifies all paid media touchpoints (campaign interactions) that occurred within 14 days before a purchase, grouping orders by the unique combination of campaigns encountered, in no particular order. Orders with no attributed campaign interactions are classified as organic purchases.

You can perform the following actions with this template:

  • Analyze campaign influence on purchase behavior across all Instacart ad formats.
  • Identify which combinations of campaigns drive conversions.
  • Compare paid media attributed sales versus organic sales.
  • Understand multi-touch attribution patterns across your campaigns.

Run the query

Use the following query to analyze the path to purchase:

set cleanroom_name = 'CLEANROOM_NAME';
call samooha_by_snowflake_local_db.consumer.run_analysis(
$cleanroom_name, -- cleanroom name
'path_to_purchase',
[], -- Consumer tables (none needed)
[], -- Provider tables (none needed)
object_construct(
'start_date', '2024-09-01',
'end_date', '2024-12-31'
)
);

Parameters

ParameterDescriptionData typeAllowed valuesRequired or optional
start_dateSets the start of the analysis period for order dates.stringDate no earlier than September 1, 2024, must be before end_date, cannot be in the future. Use the following format: YYYY-MM-DD.required
end_dateSets the end of the analysis period for order dates.stringDate no earlier than September 1, 2024, must be after start_date, cannot be in the future. Use the following format: YYYY-MM-DD.required

Result

ResultDescription
CAMPAIGN_PATHAn array of objects containing campaign details (campaign_id, campaign_name, campaign_format) that were interacted with in the 14 days prior to purchase, in no particular order. Returns 'NONE' for organic orders with no attributed campaign interactions.
SALESTotal sales amount in dollars for all orders attributed to this campaign path combination.
ORDERSTotal count of orders attributed to this campaign path combination.

Example result

CAMPAIGN_PATHSALESORDERS
[{"campaign_id": 12345, "campaign_name": "Holiday Promo", "campaign_format": "SPONSORED_PRODUCT"}, {"campaign_id": 67890, "campaign_name": "Brand Awareness", "campaign_format": "SHOPPABLE_DISPLAY"}]1250.7542
[{"campaign_id": 12345, "campaign_name": "Holiday Promo", "campaign_format": "SPONSORED_PRODUCT"}]890.5028
NONE5430.25187

Data collection and classification

The Path to Purchase template organizes and categorizes the data using the following methods:

  • Minimum user threshold. Results are only returned when at least 100 unique users are present in the dataset.
  • Attribution window. Campaign interactions are attributed to purchases that occur within 14 days after the interaction.
  • Date validation. Prevents analysis of data before September 2024 or in the future, and ensures start_date precedes end_date.

Use cases

The following use cases are examples of how this template works:

  • Multi-touch attribution analysis. Understand which combinations of campaigns work together to drive conversions.
  • Campaign effectiveness comparison. Compare sales and order volumes across different campaign paths to identify high-performing strategies.
  • Paid vs. organic analysis. Evaluate the proportion of sales driven by advertising versus organic customer behavior.
  • Ad-format performance. Analyze which ad formats (Sponsored Products, Display, Homepage, etc.) appear most frequently in successful purchase paths.
  • Media mix optimization. Use path insights to inform budget allocation across different campaign types and formats.

Best practices

Consider the following best practices when running this query:

  • Select date ranges that capture complete campaign flight periods for accurate attribution.
  • Account for the 14-day attribution window when analyzing campaign performance near the end of your date range.
  • Compare results across different time periods to identify trends in customer journey patterns.
  • Use the organic (NONE) path as a baseline to measure incremental impact of paid media.
  • Consider that longer campaign paths may indicate more complex customer journeys requiring multiple touchpoints.

Methodology

This template employs various methodologies to gather, analyze, and interpret data.

Attribution approach

The Path to Purchase calculation uses a 14-day lookback window to connect campaign interactions with subsequent purchases.

  • Lookback window. For each purchase, examine all campaign interactions (impressions and clicks) that occurred in the 14 days prior.
  • Path identification. Group all unique campaigns encountered during the lookback period into a campaign path.
  • Order attribution. Attribute the entire order value and count to the identified campaign path combination.
  • Organic classification. Orders with no campaign interactions in the 14-day lookback window are classified as organic (NONE).

Calculate Path to Purchase metrics

The Path to Purchase template aggregates orders and sales by unique campaign path combinations. For each order:

  1. Identify all campaigns interacted with in the 14 days before purchase.
  2. Create a unique campaign path based on the combination of campaigns.
  3. Attribute the full order value and count to that path.

The following shows the aggregation logic: For each unique campaign path combination:

  • SALES = Σ (order value for all orders with this path).
  • ORDERS = Count of distinct orders with this path.

Where:

  • Campaign path is the unique combination of campaigns encountered before purchase.
  • Order value is the total sales amount for each order.
  • Orders with no campaign interactions are grouped under "NONE".

Limitations and considerations

Keep in mind the following limitations and considerations when using this template:

  • Historical data availability. Data is only available from September 1, 2024 onward.
  • Fixed attribution window. The 14-day lookback window is standardized and cannot be customized.
  • Path sequencing. This version captures which campaigns were encountered, but not the order in which they occurred.
  • Product-level attribution. Attribution is based on product-level campaign targeting; orders are attributed when purchased products match campaign products.
  • Equal credit distribution. All campaigns in a path receive equal implicit credit; no weighted attribution is applied.
  • Market scope. Analysis is limited to US market data.