campaign_ sessions
The campaign_sessions schema captures what visitors did during online store sessions that came from a marketing campaign. It carries the same engagement and funnel measures as the sessions schema, but only for campaign-driven traffic, with campaign, customer, device, browser, and location detail.
Anchor to Use casesUse cases
- Session volume: Group
campaign_sessionsandcampaign_online_store_visitorsbycampaign_idto see how much traffic each campaign drove and how many were distinct visitors. - Engagement: Show
campaign_bounce_ratewithcampaign_pageviews_per_sessionto judge whether a campaign's traffic engages or bounces. - Funnel: Track
campaign_sessions_with_cart_additions,campaign_sessions_that_reached_checkout, andcampaign_sessions_that_completed_checkoutto see where campaign traffic drops out of the purchase funnel. - Conversion breakdown: Break down
campaign_conversion_ratebysession_device_browser,session_device_os, orsession_countryto see which devices and markets convert campaign traffic best.
Anchor to MetricsMetrics
Counts and calculations that let you track key business indicators. Metrics show up as the columns when queried.
Metrics you can use when querying .
- Anchor to campaign_added_to_cart_ratecampaign_
added_ to_ cart_ ratecampaign_ added_ to_ cart_ rate PERCENTPERCENT The share of online store visits from campaigns where a visitor added at least one item to cart.
Campaign added to cart rate = sessions with cart additions / sessions- SECOND_DURATIONSECOND_DURATION
Average duration, in seconds, of campaign-associated online store visits
- Anchor to campaign_bounce_ratecampaign_
bounce_ ratecampaign_ bounce_ rate PERCENTPERCENT The share of online store visits from campaigns that ended after one pageview.
Campaign bounce rate = bounces / sessions- Anchor to campaign_bouncescampaign_
bouncescampaign_ bounces INTEGERINTEGER Campaign-associated online store visits that ended after a single pageview
- Anchor to campaign_checkout_conversion_ratecampaign_
checkout_ conversion_ ratecampaign_ checkout_ conversion_ rate PERCENTPERCENT Among campaign visits that reached checkout, this is the share that completed a purchase.
Campaign checkout conversion rate = sessions that completed checkout / sessions that reached checkout- Anchor to campaign_completed_checkout_ratecampaign_
completed_ checkout_ ratecampaign_ completed_ checkout_ rate PERCENTPERCENT Among campaign visits where a visitor added an item to cart and reached checkout, this is the share that completed a purchase.
Campaign completed checkout rate = sessions with cart additions that reached checkout and completed checkout / sessions with cart additions that reached checkout- Anchor to campaign_conversion_ratecampaign_
conversion_ ratecampaign_ conversion_ rate PERCENTPERCENT The share of online store visits from campaigns that ended in a completed checkout.
Campaign conversion rate = sessions that completed checkout / sessions- Anchor to campaign_online_store_visitorscampaign_
online_ store_ visitorscampaign_ online_ store_ visitors INTEGERINTEGER Each visitor is counted as a single visitor across their online store visits from campaigns.
- Anchor to campaign_pageviewscampaign_
pageviewscampaign_ pageviews INTEGERINTEGER A single online store visit from a campaign can contribute more than one pageview.
- Anchor to campaign_pageviews_per_sessioncampaign_
pageviews_ per_ sessioncampaign_ pageviews_ per_ session DECIMALDECIMAL Average number of pageviews per campaign-associated online store visit
Campaign-associated store pageviews per session = pageviews / sessions- Anchor to campaign_reached_checkout_ratecampaign_
reached_ checkout_ ratecampaign_ reached_ checkout_ rate PERCENTPERCENT The share of online store visits from campaigns where the visitor reached checkout.
Campaign reached checkout rate = sessions that reached checkout / sessions- Anchor to campaign_sessionscampaign_
sessionscampaign_ sessions INTEGERINTEGER One visitor can have multiple online store visits from campaigns.
- Anchor to campaign_sessions_that_completed_checkoutcampaign_
sessions_ that_ completed_ checkoutcampaign_ sessions_ that_ completed_ checkout INTEGERINTEGER Campaign-associated online store visits in which a purchase was completed
- Anchor to campaign_sessions_that_reached_and_completed_checkoutcampaign_
sessions_ that_ reached_ and_ completed_ checkoutcampaign_ sessions_ that_ reached_ and_ completed_ checkout INTEGERINTEGER Campaign-associated online store visits in which the checkout page was reached, then purchase was completed
- Anchor to campaign_sessions_that_reached_checkoutcampaign_
sessions_ that_ reached_ checkoutcampaign_ sessions_ that_ reached_ checkout INTEGERINTEGER Campaign-associated online store visits in which the checkout page was reached
- Anchor to campaign_sessions_with_cart_additionscampaign_
sessions_ with_ cart_ additionscampaign_ sessions_ with_ cart_ additions INTEGERINTEGER Campaign-associated online store visits in which a visitor added an item to cart
PERCENT
A percentage value represented as a decimal, where 0.25 represents 25%.
SECOND_DURATION
A duration measured in seconds.
INTEGER
A whole number without decimal places, used for counts, quantities, and other discrete numeric values.
DECIMAL
A precise decimal number used for calculations where fixed-point precision matters.
Anchor to DimensionsDimensions
Attributes of your data that let you look more granularly at aspects of the data. Group and filter by dimensions to shape the rows your query returns.
Dimensions you can use when querying .
- Anchor to campaign_idcampaign_
idcampaign_ id IDENTITYIDENTITY Unique identifier for a campaign
- Anchor to customer_idcustomer_
idcustomer_ id IDENTITYIDENTITY The unique Shopify identifier for the customer associated with the online store visit.
- Anchor to daydaydayDAY_TIMESTAMPDAY_TIMESTAMP
The day an online store visit from a campaign started.
- Anchor to day_of_weekday_
of_ weekday_ of_ week DAY_OF_WEEKDAY_OF_WEEK The day of the week an online store visit from a campaign started, with values Monday through Sunday.
- Anchor to hourhourhourHOUR_TIMESTAMPHOUR_TIMESTAMP
The hour an online store visit from a campaign started.
- Anchor to hour_of_dayhour_
of_ dayhour_ of_ day HOUR_OF_DAYHOUR_OF_DAY The hour of day an online store visit from a campaign started, with values 0 through 23.
- Anchor to landing_page_pathlanding_
page_ pathlanding_ page_ path STRINGSTRING The path of the first page a campaign visitor landed on when arriving at your online store. Values contain the part of the page address after your store's domain.
- Anchor to landing_page_typelanding_
page_ typelanding_ page_ type STRINGSTRING The type of first page a campaign visitor landed on when arriving at your online store, such as a product page, collection page, or the home page.
- Anchor to landing_page_urllanding_
page_ urllanding_ page_ url STRINGSTRING The full page address where a campaign visitor first arrived at your online store.
- Anchor to minuteminuteminuteMINUTE_TIMESTAMPMINUTE_TIMESTAMP
The minute an online store visit from a campaign started.
- Anchor to monthmonthmonthMONTH_TIMESTAMPMONTH_TIMESTAMP
The month an online store visit from a campaign started.
- Anchor to month_of_yearmonth_
of_ yearmonth_ of_ year MONTH_OF_YEARMONTH_OF_YEAR The month of year an online store visit from a campaign started, with values 1 through 12.
- Anchor to quarterquarterquarterQUARTER_TIMESTAMPQUARTER_TIMESTAMP
The quarter an online store visit from a campaign started.
- Anchor to referrer_domainreferrer_
domainreferrer_ domain STRINGSTRING The referring domain, with a leading
wwwomitted so visits fromwww.example.comandexample.comappear under the same domain.- Anchor to referrer_namereferrer_
namereferrer_ name STRINGSTRING The referring site name appears as lowercase text.
- Anchor to referrer_pathreferrer_
pathreferrer_ path STRINGSTRING The path on the referring site that led to the online store visit. Values contain the part of the referring page address after its domain.
- Anchor to referrer_sitereferrer_
sitereferrer_ site STRINGSTRING - Anchor to referrer_sourcereferrer_
sourcereferrer_ source STRINGSTRING The type of referrer that led to the online store visit, such as Direct, Search, Social, or Email.
- Anchor to referrer_termsreferrer_
termsreferrer_ terms STRINGSTRING - Anchor to referrer_urlreferrer_
urlreferrer_ url STRINGSTRING External page that led to an online store visit
- Anchor to referring_channelreferring_
channelreferring_ channel STRINGSTRING Channel that led to an online store visit
- Anchor to referring_mediumreferring_
mediumreferring_ medium STRINGSTRING The category of marketing channel that brought the visitor to your online store, such as social, email, or paid search.
- Anchor to referring_platformreferring_
platformreferring_ platform STRINGSTRING Platform that led to an online store visit
- Anchor to secondsecondsecondSECOND_TIMESTAMPSECOND_TIMESTAMP
The second an online store visit from a campaign started.
- Anchor to session_api_clientsession_
api_ clientsession_ api_ client STRINGSTRING The storefront type used for the online store visit from a campaign, such as Hydrogen, headless, or online store.
- Anchor to session_bouncedsession_
bouncedsession_ bounced BOOLEANBOOLEAN Whether the online store visit from a campaign ended after one pageview (
true) or had more than one pageview (false).- Anchor to session_citysession_
citysession_ city STRINGSTRING City where the visitor was located when they browsed your online store
- Anchor to session_countrysession_
countrysession_ country STRINGSTRING Country where the visitor was located when they browsed your online store
- Anchor to session_country_codesession_
country_ codesession_ country_ code STRINGSTRING Country code where the visitor was located when they browsed your online store
- Anchor to session_device_browsersession_
device_ browsersession_ device_ browser STRINGSTRING Browser used to visit your online store
- Anchor to session_device_browser_versionsession_
device_ browser_ versionsession_ device_ browser_ version STRINGSTRING Version number of the browser used to visit your online store
- Anchor to session_device_ossession_
device_ ossession_ device_ os STRINGSTRING Operating system of the device used for visiting your online store
- Anchor to session_device_os_versionsession_
device_ os_ versionsession_ device_ os_ version STRINGSTRING Operating system version of the visitor's device
- Anchor to session_device_typesession_
device_ typesession_ device_ type STRINGSTRING The kind of device a visitor used during the online store visit from a campaign, such as Desktop, Mobile, Tablet, or Smart TV.
- Anchor to session_durationsession_
durationsession_ duration INTEGERINTEGER Duration, in seconds, of the online store visit
- Anchor to session_idsession_
idsession_ id STRINGSTRING Shopify identifier for the online store visit
- Anchor to session_regionsession_
regionsession_ region STRINGSTRING State or province where the visitor was located when they browsed your online store (e.g., California, Ontario)
- Anchor to shop_idshop_
idshop_ id IDENTITYIDENTITY - Anchor to traffic_typetraffic_
typetraffic_ type STRINGSTRING The type of traffic that led to the online store visit from a campaign, such as Direct, Paid, Organic, or Unknown.
- Anchor to utm_campaignutm_
campaignutm_ campaign STRINGSTRING The campaign name from the UTM tags associated with the online store visit. Values are the text used in your campaign links.
- Anchor to utm_contentutm_
contentutm_ content STRINGSTRING - Anchor to utm_mediumutm_
mediumutm_ medium STRINGSTRING The medium value from the UTM tags associated with the online store visit. Values are the text used in your campaign links, such as email, social, or paid search.
- Anchor to utm_sourceutm_
sourceutm_ source STRINGSTRING - Anchor to utm_termutm_
termutm_ term STRINGSTRING The term value from the UTM tags associated with the online store visit, often used for keywords or targeting terms. Values are the text used in your campaign links.
- Anchor to weekweekweekWEEK_TIMESTAMPWEEK_TIMESTAMP
The week an online store visit from a campaign started.
- Anchor to week_of_yearweek_
of_ yearweek_ of_ year WEEK_OF_YEARWEEK_OF_YEAR The week of year an online store visit from a campaign started, with values 1 through 53.
- Anchor to yearyearyearYEAR_TIMESTAMPYEAR_TIMESTAMP
The year an online store visit from a campaign started.
- Anchor to shop_nameshop_
nameshop_ name STRINGSTRING Name of your store
IDENTITY
A unique identifier for a Shopify resource such as a customer, product, or order.
DAY_TIMESTAMP
A date value truncated to day precision.
DAY_OF_WEEK
A day within a week, used for weekday-based grouping and filtering.
HOUR_TIMESTAMP
A timestamp truncated to hour precision.
HOUR_OF_DAY
An hour within a day, typically represented as an integer from 0 to 23.
STRING
A sequence of characters representing text data.
MINUTE_TIMESTAMP
A timestamp truncated to minute precision.
MONTH_TIMESTAMP
A date value representing the start of a month.
MONTH_OF_YEAR
A month number within a year.
QUARTER_TIMESTAMP
A date value representing the start of a fiscal quarter.
SECOND_TIMESTAMP
A timestamp truncated to second precision.
BOOLEAN
A true or false value representing binary states.
WEEK_TIMESTAMP
A date value representing the start of a week.
WEEK_OF_YEAR
A week number within a year.
YEAR_TIMESTAMP
A date value representing the start of a year.
campaign_sales: Downstream order conversion for the same campaign sessions.campaign_products: Product-level attribution from the same campaign sessions.marketing_engagements: App-level engagement, ad spend, and impression data paired with sessions.