Documentation Index
Fetch the complete documentation index at: https://docs.abconvert.io/llms.txt
Use this file to discover all available pages before exploring further.
Preview — this page is an early draft. We’re still verifying the API reference against the current endpoints. Fields, response shapes, and examples may change before this section is marked stable. Follow PRO-1459 or ask in
#abconvert-dev if you’re integrating against this today.How tracking works
When a visitor lands on your store, the ABConvert script:- Calls
GET /api/get-sessionto generate a session ID. - Calls
GET /api/observe/sessionto register the visitor against active experiments. - Calls
GET /api/observeon product pages to record page views. - Posts to the unified
/api/track/eventendpoint (via Web Pixel) for add-to-cart, checkout, and order events.
/api/track/event and /api/track/assignment) are the primary tracking path used by the Web Pixel. The legacy endpoints below are also supported for backwards compatibility.
Generate a session ID
Returns a new UUID to use as the visitor’s session identifier for the current browsing session.Example request
Response
Get visitor country code
Returns the two-letter ISO country code for the current visitor, resolved from their IP address. Used to apply geographic targeting rules.Example request
Response
Track product page views
Records that a visitor viewed a specific product page under a specific experiment assignment.Query parameters
Your store’s Shopify domain, e.g.
your-store.myshopify.com.The Shopify product ID of the viewed product.
The
_id of the experiment the visitor is enrolled in.Example request
Track visitor sessions
Records a visitor session event for an experiment. Called once per page load to maintain session-level attribution.Query parameters
Your store’s Shopify domain.
The session ID returned by
GET /api/get-session.The
_id of the experiment the visitor is enrolled in.Example request
Unified event tracking (Web Pixel)
The primary tracking endpoint used by the ABConvert Web Pixel extension. Records any behavioral event and writes it to BigQuery for analytics processing.Query parameters
Your store’s Shopify domain.
Request body
The current visitor’s session ID.
The current visitor’s persistent ID.
The event type. Standard values include
page_viewed, product_viewed, product_added_to_cart, checkout_started, checkout_completed. See the full list below.The source system sending this event. One of
"script", "webpixel", or "webhook".Client-side timestamp. Accepts an ISO 8601 string or Unix milliseconds.
Array of experiment IDs the visitor is currently assigned to. Pass an empty array
[] if the visitor has no active assignments.The current page path, e.g.
/products/blue-shirt. Maximum 2000 characters.Event-specific data. Maximum 10KB. Common fields:
Example request
Response
202 Accepted on success. Use the fire-and-forget pattern — do not block on this response.
Experiment assignment tracking
Records the moment a visitor is bucketed into a test group, along with a snapshot of their visitor context. Written once per visitor per experiment.Request body
The current visitor’s session ID.
The current visitor’s persistent ID.
The experiment the visitor is being assigned to.
The assigned group index.
0 = control, 1+ = variant, -1 = excluded.Client-side timestamp of the assignment moment.
Why this assignment was made. Values:
random_split, force_assign_group, force_assign_excluded, audience_targeting_excluded, namespace_excluded, traffic_allocation_excluded.Two-letter country code of the visitor.
Visitor device type:
"desktop", "mobile", "tablet", or "bot".Whether this is a
"new" or "returning" visitor.UTM source parameter captured from the landing URL.
UTM medium parameter.
UTM campaign parameter.
Google click ID, if present.
Facebook click ID, if present.
Example request
Response
Legacy tracking endpoints
These endpoints pre-date the unified tracking API and remain supported. The Web Pixel extension uses the unified/api/track/event endpoint instead.
GA4 impression metadata
Resolves the GA4 measurement ID and experiment metadata needed to send anabconvert_experience_impression event to Google Analytics 4. The ABConvert script calls this automatically when GA4 integration is enabled.
Query parameters
The experiment ID to resolve metadata for.
The test group index the current visitor is assigned to. Must be a non-negative integer.
Example request
Response — found
Response — not found or feature disabled
This endpoint is intentionally resilient — it returns an empty
found: false response rather than a 500 error when metadata is unavailable. This prevents storefront script errors from affecting visitor experience.Custom events
You can track custom storefront interactions and measure their impact in A/B test results using the Shopify analytics publish API:/api/track/event with eventType: abconvert:custom_event:video_play. Event names may be up to 77 characters and support structured naming with :, /, and . separators.
For the event to be tracked, the visitor must have an active experiment assignment. Events sent when experimentIds is empty are ignored by the Web Pixel subscriber.