Scroll tracking payload
For server-side implementations, you are responsible for capturing and sending scroll events to your designated endpoint, just as you would for page load events, clicks, and impressions.
If you are unable to send scroll tracking data this way, contact your onboarding or account manager. We can explore alternative solutions, such as leveraging our JavaScript implementation.
Scroll events should be sent when the user reaches 30%, 60%, and 90% of the page. Ensure this value is included in actionValue as shown in the example payload below.
curl --location 'https://{region}.production.ai.zephr.com/{hostname}/SendEventData' \ --header 'Content-Type: application/json' \ --header 'Authorization: Basic *****************' \ --data '{ "action": 46, "dtId": "a1b2c3d4-e5f6-78a9-bc01-23de45f6a7b8", "actionValue": "30", "refer": "https://www.google.com/", "requestUrl": "https://www.publisherdomain/path", "user": { "userState": "anonymous", "userId": ", }, "context": { "countryCode": "GBR", "userAgent": "Mozilla/5.0 (iPhone; CPU iPhone OS 17_5_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.5 Mobile/15E148 Safari/604.1", "referSource": "www.google.com" } }'
Properties
The following table outlines the required variables and their corresponding values for event tracking in AI Paywall:
Variable | Description |
brandId (required for client-side) |
A unique brand identifier dynamically populated by JavaScript. |
wId_2 (required) |
An offer ID or rate plan array passed by the client. |
dtId (required) |
The blaize_tracking_id value. For client-side implementations, this is automatically populated by JavaScript. For server-side implementations, you must retrieve it from the Zephr cookie. |
action (required) |
A unique identifier indicating the action taken. |
value (required for conversion events) |
The conversion event value is in cents; for example, 3900 represents 39.00 USD. It accepts any local currency in a cents-based format. |
isAttr (optional, specific to conversion events) |
If true, the conversion did not originate from a CTA on a Zephr component, for example, site navigation or external links. |
refer (required) |
The document.referrer value passed by the client. |
requestUrl (required) |
The current page URL. Use window.location.href for this value. |
actionValue (required for scroll tracking events) |
The scroll depth percentage—accepted values: 30, 60, 90. |
User Object
This table lists the data variables about the user that must be provided by the client.
Variable | Description |
userState (required) |
The user type. The accepted values are anonymous, registered, and subscribed. Client-side JavaScript handles this automatically; otherwise, use the logic outlined here. |
userID (required when userState is registered, empty when anonymous) |
A unique identifier assigned to the user. |
knownDate (optional) |
The timestamp of when the user was first identified. |
isTrial (optional) |
You can set it to true if the user is currently on a trial subscription. |
isLapsed (optional) |
You can set it to true if the user’s subscription has expired and hasn't been renewed. |
Context Object
This table lists the context variables about the content that must be provided by the client.
Variable | Description |
increaseRA (required) |
You can set it to true if the page should count towards the metering/paywall limit; false if tracking only a page view. |
articleId (required if increaseRA is true) |
A unique article ID. If unavailable, use requestURL. |
section (optional) |
The content section or category of the page. |
subSection (optional) |
Additional details about the page. |
articleType (optional) |
The template type of the article. |
articleClass (optional) |
Defines if the article is eligible to be blocked or other relevant categorization. |
Product Object
This table lists the context variables about the paywall offer that must be provided by the client.
Variable | Description |
offerName (optional) |
The name of the offer displayed. |
offerKey (optional) |
Any additional key/ID associated with the offer. |
product_sku (optional) |
A unique SKU assigned for tracking and inventory. |
product_name (optional) |
The name of the product. |
product_subscription_interval (optional) | The billing interval for subscriptions such as monthly or yearly. |
Context Object
This table lists the additional metadata about the journey that must be provided by the client.
Variable | Description |
countryCode (optional) |
A 3-letter country code following ISO 3166-1 alpha-3. If not supplied, it can be retrieved from the browser. |
userAgent (optional) |
A string identifying the user's OS, device, and browser. Can be retrieved from the browser if not provided. |
referSource (optional) |
If a naming convention for refer values is maintained, they can be sent using this variable. |
custom (optional) |
An object containing additional key-value pairs for passing extra data beyond standard parameters. |
Checkout Object
This table lists the information on the checkout journey that must be provided by the client.
Variable | Description |
isAlt (optional) |
Set this to true if the user switched to a different offer during checkout, for example, an upgrade/downgrade, from the originally selected paywall offer. |
isDropOff (optional) |
A boolean flag indicating whether the user started but did not complete the checkout process. Set to true if the user entered the checkout flow but exited before completing their purchase. |