Skip to Content
DestinationsBigQueryClient-Side Events

Client-Side Events

Vendo streams client-side Shopify storefront events directly to BigQuery in real-time via the Web Pixel extension.

Events Captured

Event NameDescription
page_viewedPage view
product_viewedProduct page view
collection_viewedCollection page view
search_submittedSearch performed
product_added_to_cartAdd to cart
product_removed_from_cartRemove from cart
cart_viewedCart page view
checkout_startedCheckout initiated
checkout_contact_info_submittedContact info entered
checkout_address_info_submittedAddress entered
checkout_shipping_info_submittedShipping selected
payment_info_submittedPayment info entered
checkout_completedPurchase completed

Event Schema

All client-side events are inserted into the events table with this schema:

ColumnTypeDescription
event_nameSTRINGLowercase event name (e.g., “page_viewed”)
event_timestampTIMESTAMPWhen the event occurred
user_idSTRINGShopify Customer ID (null for anonymous)
anonymous_idSTRINGShopify device/client ID
session_idSTRINGBrowser session ID
page_urlSTRINGFull page URL
page_titleSTRINGDocument title
page_pathSTRINGURL pathname
referrerSTRINGReferring URL
device_typeSTRINGDevice type (Desktop, Mobile, Tablet)
browserSTRINGBrowser name
osSTRINGOperating system
screen_widthINTEGERScreen width in pixels
screen_heightINTEGERScreen height in pixels
languageSTRINGBrowser language
currencySTRINGCurrency code
valueFLOATEvent value (cart total, product price, etc.)
utm_sourceSTRINGUTM source parameter
utm_mediumSTRINGUTM medium parameter
utm_campaignSTRINGUTM campaign parameter
utm_contentSTRINGUTM content parameter
utm_termSTRINGUTM term parameter
gclidSTRINGGoogle Click ID
fbclidSTRINGFacebook Click ID
msclkidSTRINGMicrosoft Click ID
ttclidSTRINGTikTok Click ID
propertiesSTRINGEvent-specific properties (JSON)
productsSTRINGProduct array (JSON)
sourceSTRINGSource identifier
versionSTRINGTracking version
insert_idSTRINGUnique event ID for deduplication

Example Payloads

Page Viewed

{ "event_name": "page_viewed", "event_timestamp": "2024-01-15T10:30:00.000Z", "user_id": null, "anonymous_id": "shop_client_abc123", "session_id": "sess_xyz789", "page_url": "https://mystore.com/collections/summer", "page_title": "Summer Collection – My Store", "page_path": "/collections/summer", "referrer": "https://google.com", "device_type": "Desktop", "browser": "Chrome", "os": "Mac OS X", "screen_width": 1440, "screen_height": 900, "language": "en-US", "currency": "USD", "value": 0, "utm_source": "google", "utm_medium": "cpc", "utm_campaign": "summer-sale", "gclid": "CjwKCAjw...", "properties": "{}", "products": null, "source": "vendo_web_pixel", "version": "1.0.0", "insert_id": "49b71cd2-295b-476a-a345-0eb50bd13b57" }

Product Viewed

{ "event_name": "product_viewed", "event_timestamp": "2024-01-15T10:32:00.000Z", "user_id": null, "anonymous_id": "shop_client_abc123", "session_id": "sess_xyz789", "page_url": "https://mystore.com/products/classic-tshirt", "page_title": "Classic T-Shirt – My Store", "page_path": "/products/classic-tshirt", "referrer": "https://mystore.com/collections/all", "device_type": "Desktop", "currency": "USD", "value": 29.99, "utm_source": "google", "utm_medium": "cpc", "properties": "{\"product_id\":\"gid://shopify/Product/7894561230\",\"product_title\":\"Classic T-Shirt\"}", "products": "[{\"product_id\":\"gid://shopify/Product/7894561230\",\"sku\":\"TSHIRT-BLK-M\",\"name\":\"Classic T-Shirt\",\"price\":29.99,\"quantity\":1,\"variant_id\":\"gid://shopify/ProductVariant/42345678901\",\"variant_title\":\"Black / Medium\",\"brand\":\"My Brand\",\"category\":\"Apparel\"}]", "source": "vendo_web_pixel", "version": "1.0.0", "insert_id": "prod-view-event-id-123" }

Product Added to Cart

{ "event_name": "product_added_to_cart", "event_timestamp": "2024-01-15T10:35:00.000Z", "user_id": null, "anonymous_id": "shop_client_abc123", "session_id": "sess_xyz789", "page_url": "https://mystore.com/products/classic-tshirt", "device_type": "Desktop", "currency": "USD", "value": 59.98, "utm_source": "google", "utm_medium": "cpc", "properties": "{\"quantity\":2}", "products": "[{\"product_id\":\"gid://shopify/Product/7894561230\",\"sku\":\"TSHIRT-BLK-M\",\"name\":\"Classic T-Shirt\",\"price\":29.99,\"quantity\":2,\"variant_id\":\"gid://shopify/ProductVariant/42345678901\",\"variant_title\":\"Black / Medium\",\"brand\":\"My Brand\",\"category\":\"Apparel\"}]", "source": "vendo_web_pixel", "version": "1.0.0", "insert_id": "add-cart-event-id-456" }

Cart Viewed

{ "event_name": "cart_viewed", "event_timestamp": "2024-01-15T10:38:00.000Z", "user_id": null, "anonymous_id": "shop_client_abc123", "session_id": "sess_xyz789", "page_url": "https://mystore.com/cart", "device_type": "Desktop", "currency": "USD", "value": 149.97, "properties": "{\"quantity\":3}", "products": "[{\"product_id\":\"gid://shopify/Product/7894561230\",\"name\":\"Classic T-Shirt\",\"price\":29.99,\"quantity\":2},{\"product_id\":\"gid://shopify/Product/7894561231\",\"name\":\"Running Shorts\",\"price\":45.00,\"quantity\":1}]", "source": "vendo_web_pixel", "version": "1.0.0", "insert_id": "cart-view-event-id-789" }

Checkout Started

{ "event_name": "checkout_started", "event_timestamp": "2024-01-15T10:40:00.000Z", "user_id": null, "anonymous_id": "shop_client_abc123", "session_id": "sess_xyz789", "page_url": "https://mystore.com/checkouts/abc123", "device_type": "Desktop", "currency": "USD", "value": 162.49, "utm_source": "google", "utm_medium": "cpc", "utm_campaign": "summer-sale", "properties": "{\"checkout_token\":\"abc123def456\",\"order_id\":\"gid://shopify/Order/5363269534010\",\"cart_subtotal_amount\":149.97,\"tax_amount\":12.52,\"shipping_amount\":0}", "products": "[{\"product_id\":\"gid://shopify/Product/7894561230\",\"name\":\"Classic T-Shirt\",\"price\":29.99,\"quantity\":2}]", "source": "vendo_web_pixel", "version": "1.0.0", "insert_id": "checkout-started-id-101" }

Checkout Completed

{ "event_name": "checkout_completed", "event_timestamp": "2024-01-15T10:45:00.000Z", "user_id": "6359703453860", "anonymous_id": "shop_client_abc123", "session_id": "sess_xyz789", "page_url": "https://mystore.com/checkouts/abc123/thank_you", "device_type": "Desktop", "currency": "USD", "value": 162.49, "utm_source": "google", "utm_medium": "cpc", "utm_campaign": "summer-sale", "gclid": "CjwKCAjw...", "properties": "{\"checkout_token\":\"abc123def456\",\"order_id\":\"gid://shopify/Order/5363269534010\",\"cart_subtotal_amount\":149.97,\"tax_amount\":12.52,\"shipping_amount\":10.00,\"email\":\"customer@email.com\",\"phone\":\"+14155551234\"}", "products": "[{\"product_id\":\"gid://shopify/Product/7894561230\",\"name\":\"Classic T-Shirt\",\"price\":29.99,\"quantity\":2}]", "source": "vendo_web_pixel", "version": "1.0.0", "insert_id": "checkout-completed-id-202" }

Collection Viewed

{ "event_name": "collection_viewed", "event_timestamp": "2024-01-15T10:28:00.000Z", "user_id": null, "anonymous_id": "shop_client_abc123", "session_id": "sess_xyz789", "page_url": "https://mystore.com/collections/summer", "device_type": "Desktop", "currency": "USD", "value": 0, "properties": "{\"collection_id\":\"gid://shopify/Collection/123456789\",\"collection_title\":\"Summer Collection\"}", "products": "[{\"product_id\":\"gid://shopify/Product/7894561230\",\"name\":\"Classic T-Shirt\",\"price\":29.99,\"quantity\":1},{\"product_id\":\"gid://shopify/Product/7894561231\",\"name\":\"Running Shorts\",\"price\":45.00,\"quantity\":1}]", "source": "vendo_web_pixel", "version": "1.0.0", "insert_id": "collection-viewed-id-303" }

Search Submitted

{ "event_name": "search_submitted", "event_timestamp": "2024-01-15T10:25:00.000Z", "user_id": null, "anonymous_id": "shop_client_abc123", "session_id": "sess_xyz789", "page_url": "https://mystore.com/search?q=t-shirt", "device_type": "Desktop", "currency": "USD", "value": 0, "properties": "{\"search_query\":\"t-shirt\"}", "products": "[{\"product_id\":\"gid://shopify/Product/7894561230\",\"name\":\"Classic T-Shirt\",\"price\":29.99,\"quantity\":1}]", "source": "vendo_web_pixel", "version": "1.0.0", "insert_id": "search-submitted-id-404" }

Querying Client-Side Events

Page Views by Day

SELECT DATE(event_timestamp) as date, COUNT(*) as page_views, COUNT(DISTINCT anonymous_id) as unique_visitors FROM `your_project.your_dataset.events` WHERE event_name = 'page_viewed' GROUP BY date ORDER BY date DESC

Product View to Add-to-Cart Conversion

SELECT DATE(pv.event_timestamp) as date, COUNT(DISTINCT pv.insert_id) as product_views, COUNT(DISTINCT atc.insert_id) as add_to_carts, SAFE_DIVIDE( COUNT(DISTINCT atc.insert_id), COUNT(DISTINCT pv.insert_id) ) * 100 as conversion_rate FROM `your_project.your_dataset.events` pv LEFT JOIN `your_project.your_dataset.events` atc ON pv.anonymous_id = atc.anonymous_id AND atc.event_name = 'product_added_to_cart' AND DATE(atc.event_timestamp) = DATE(pv.event_timestamp) WHERE pv.event_name = 'product_viewed' GROUP BY date ORDER BY date DESC

UTM Attribution for Completed Checkouts

SELECT utm_source, utm_medium, utm_campaign, COUNT(*) as conversions, SUM(value) as revenue FROM `your_project.your_dataset.events` WHERE event_name = 'checkout_completed' AND event_timestamp >= DATE_SUB(CURRENT_TIMESTAMP(), INTERVAL 30 DAY) GROUP BY utm_source, utm_medium, utm_campaign ORDER BY revenue DESC
Last updated on