/api/public/track-view
Public · no auth
Track a page view
Record a page-view event for a landing page. The visitor's IP is resolved to a geographic location automatically. Call this once per page load from the page's front-end JavaScript immediately after the page renders.
Body parameters
auto-derived Type, required, and constraints are read from this endpoint's validation rules at build time — they can't drift from the contract the API actually enforces.|
landing_page_id
string · identifier
required
|
The landing page whose view count is being incremented. |
|
utm_source
string
optional
|
Campaign source passed through from the page URL. max: 255 |
|
utm_medium
string
optional
|
Campaign medium (e.g. "email", "cpc"). max: 255 |
|
utm_campaign
string
optional
|
Campaign name. max: 255 |
|
utm_term
string
optional
|
Paid-search keyword term. max: 255 |
|
utm_content
string
optional
|
Creative variant identifier. max: 255 |
Responses
curl -X POST https://landing.pivotal.digital/api/public/track-view \
-H "Content-Type: application/json" \
-d '{"landing_page_id": 42, "utm_source": "newsletter", "utm_medium": "email"}'
{ "success": true, "message": "View tracked successfully" }
{ "message": "The landing page id field is required.", "errors": { "landing_page_id": ["The landing page id field is required."] } }
{ "success": false, "message": "Failed to track view" }
/api/public/track-email
Public · no auth
Track an email open
Record an email-open event. Embed the endpoint URL as a 1×1 tracking-pixel <img> in outbound HTML emails. The endpoint always returns a transparent GIF, regardless of whether the event was recorded, so broken tracking never renders a broken image to the recipient.
Body parameters
auto-derived Type, required, and constraints are read from this endpoint's validation rules at build time — they can't drift from the contract the API actually enforces.|
tracking_id
string
required
|
Unique identifier for the sent email, used to correlate the open with the send. |
|
lead_id
integer
optional
|
ID of the lead associated with this email send. |
Responses
curl -G https://landing.pivotal.digital/api/public/track-email \
--data-urlencode "tracking_id=abc123" \
--data-urlencode "lead_id=9241" \
--output pixel.gif
<1×1 transparent GIF — Content-Type: image/gif>
{ "message": "The tracking id field is required.", "errors": { "tracking_id": ["The tracking id field is required."] } }
/api/public/track-preview
Public · no auth
Track an asset preview
Record an asset-preview interaction and increment the asset's download counter. When a landing-page ID is also supplied, a click analytics event is written against that page so the interaction appears in page-level reporting.
Body parameters
|
asset_id
string · identifier
required
|
The asset whose preview the visitor interacted with. |
|
landing_page_id
string · identifier
optional
|
The landing page the asset was previewed from, used to attribute the click event to the page. |
Responses
curl -X POST https://landing.pivotal.digital/api/public/track-preview \
-H "Content-Type: application/json" \
-d '{"asset_id": 17, "landing_page_id": 42}'
{ "success": true, "message": "Preview tracked successfully" }
{ "message": "The asset id field is required.", "errors": { "asset_id": ["The asset id field is required."] } }
{ "success": false, "message": "Failed to track preview" }
/api/public/track-contact-click
Public · no auth
Track a contact link click
Record a phone or email link click on a landing page. Fires when a visitor taps a tel: or mailto: CTA, creating a phone_click or email_click analytics event attributed to the page. Geographic data is derived from the visitor's IP.
Body parameters
|
landing_page_id
string · identifier
required
|
The landing page on which the click occurred. |
|
click_type
string
required
|
The type of contact link clicked — either `phone` or `email`. one of: phone, email |
Responses
curl -X POST https://landing.pivotal.digital/api/public/track-contact-click \
-H "Content-Type: application/json" \
-d '{"landing_page_id": 42, "click_type": "phone"}'
{ "success": true, "message": "Contact click tracked successfully" }
{ "message": "The selected click type is invalid.", "errors": { "click_type": ["The selected click type is invalid."] } }
{ "success": false, "message": "Failed to track contact click" }
/api/public/phone-tap
Public · no auth
Report a phone tap as an ad conversion
Report a tap on a phone number as an ad conversion. Sent once per visit by the page's own listener when a conversion tracking entry on it has "Also send phone taps" switched on: the tap is sent to Google Ads from our server, matched on the visitor's ad click, once per ad click. Taps from visitors who did not come from an ad, or who refused marketing cookies, are not sent.
Rate limited.
Body parameters
auto-derived Type, required, and constraints are read from this endpoint's validation rules at build time — they can't drift from the contract the API actually enforces.|
t
string
required
|
Comma-separated ids of the tracking entries the page carries (written by the page). max: 200 |
|
k
string
required
|
The page's signature over those ids (written by the page). max: 64 |
|
page_url
string
optional
|
The page's address, for the ad click when the visitor has no cookie yet. max: 2000 |
Responses
curl -X POST https://landing.pivotal.digital/api/public/phone-tap \
-H "Content-Type: application/json" \
-d '{"t": "44", "k": "<signature from the page>", "page_url": "https://example.com/?gclid=…"}'
{ "ok": true }
/api/public/analytics/event
Public · no auth
Track a web analytics event
Ingest a web analytics event from a browser. Accepts pageview and e-commerce event types sent by lt-analytics.js. The endpoint is fire-and-forget — it always returns 204 No Content and never blocks the visitor, even on error. Both application/json and text/plain bodies are accepted so the payload can be sent via navigator.sendBeacon without a CORS preflight.
Body parameters
|
site_key
string
optional
|
The property's public key (format `WA-XXXXXX`), identifying which analytics property to write the event against. |
|
event_type
string
optional
|
The event to record: `pageview`, `engagement`, `perf`, `custom`, an enhanced-measurement type (`click_outbound`, `file_download`, `form_start`, `form_submit`, `video_start`, `video_progress`, `video_complete`, `js_error`), an e-commerce type (`viewitem`, `viewitemlist`, `addtocart`, `removefromcart`, `viewcart`, `checkout`, `addpaymentinfo`, `addshippinginfo`, `purchase`, `refund`, `cancellation`) or `search`. GA4 names (`view_item`, `add_to_cart`, `begin_checkout`…) are accepted as aliases. Any other value is stored as a `custom` event named after it — never as a pageview. |
|
event_name
string
optional
|
Name of a `custom` or enhanced-measurement event (e.g. `signup_completed`). |
|
params
string
optional
|
Object of event parameters (strings; numbers are stringified). |
|
pageview_id
string · identifier
optional
|
Client id of the page view this row belongs to (joins `engagement` / `perf` rows to their view). |
|
engagement_ms
string
optional
|
For `engagement` rows: visible-tab milliseconds since the last engagement row of this view. |
|
scroll_depth_pct
string
optional
|
For `engagement` rows: deepest scroll position reached, 0–100. |
|
fcp
string
optional
|
For `perf` rows: First Contentful Paint, ms. Also `lcp`, `inp` (ms) and `cls` (unitless). |
|
landing_path
string
optional
|
Session-scoped: the path the session started on. Sent on every event. |
|
session_referrer_domain
string
optional
|
Session-scoped: the entry referrer's host. |
|
session_utm_source
string
optional
|
Session-scoped entry UTM source; also `session_utm_medium`, `session_utm_campaign`, `utm_content`, `utm_term`, `utm_id`. |
|
click_id
string · identifier
optional
|
Entry click id value (`gclid`, `gbraid`, `wbraid`, `fbclid`, `msclkid`, `ttclid`, `dclid`); `click_id_type` names which. |
|
ad_campaign_id
string · identifier
optional
|
Session-scoped: the ad's campaign id from the landing URL's `lp_cid`; also `ad_group_id` (`lp_agid`), `ad_keyword` (`lp_kw`), `ad_match_type` (`lp_mt`), `ad_id` (`lp_ad`). |
|
is_new_visitor
boolean
optional
|
`1` when this is the visitor's first session. |
|
user_id
string · identifier
optional
|
Hashed known identity set by `LT.analytics.identify()`. |
|
visitor_props
string
optional
|
Object of visitor properties set by `LT.analytics.identify(id, props)`: up to 20 short facts about the person (e.g. `{"industry": "Retail", "size": "11-50"}`). Keys `[a-z0-9_]`, max 40 chars; values max 100 chars; values containing an email address are dropped. |
|
items
string
optional
|
For e-commerce events: array of `{id, name, price, quantity, category}` (GA4 `item_id`/`item_name` accepted). `item_list` names the list. |
|
url
string · url
optional
|
Full URL of the page at the time of the event. |
|
path
string
optional
|
URL path component of the page (e.g. `/pricing`). |
|
referrer
string
optional
|
The document referrer at the time of the event. |
|
page_title
string
optional
|
Title of the page as reported by `document.title`. |
|
utm_source
string
optional
|
UTM source extracted from the page URL. |
|
utm_medium
string
optional
|
UTM medium extracted from the page URL. |
|
utm_campaign
string
optional
|
UTM campaign extracted from the page URL. |
|
visitor_id
string · identifier
optional
|
Stable anonymous visitor identifier (set by `lt-analytics.js`, persisted in localStorage). |
|
session_id
string · identifier
optional
|
Session identifier, rotated after 30 minutes of inactivity. |
|
device_type
string
optional
|
Detected device class (e.g. `desktop`, `mobile`, `tablet`). |
|
browser_name
string
optional
|
Browser name as detected client-side. |
|
os_name
string
optional
|
Operating system name as detected client-side. |
|
screen_width
string
optional
|
Screen width in CSS pixels. |
|
screen_height
string
optional
|
Screen height in CSS pixels. |
|
viewport_width
string
optional
|
Viewport width in CSS pixels. |
|
viewport_height
string
optional
|
Viewport height in CSS pixels. |
|
dom_load_time
string
optional
|
DOM-ready duration in milliseconds (from `performance.timing`). |
|
ttfb
string
optional
|
Time to first byte in milliseconds. |
|
connection_type
string
optional
|
Network connection type (e.g. `4g`, `wifi`) from the Network Information API. |
|
language
string
optional
|
Browser language tag (e.g. `en-GB`). |
|
session_page_views
string
optional
|
Number of pages viewed within the current session. |
|
product_id
string · identifier
optional
|
For e-commerce events: identifier of the product involved. |
|
product_name
string
optional
|
For e-commerce events: display name of the product. |
|
quantity
string
optional
|
For e-commerce events: item quantity. |
|
price
string
optional
|
For e-commerce events: unit price of the item. |
|
currency
string
optional
|
For e-commerce events: ISO 4217 currency code (e.g. `GBP`). |
|
cart_total
string
optional
|
For e-commerce events: total cart value at the time of the event. |
|
order_id
string · identifier
optional
|
For `purchase` events: unique order reference. |
|
payment_method
string
optional
|
For `purchase` events: payment method used (e.g. `stripe`, `paypal`). |
|
webdriver
string
optional
|
Set to `true` by automation tools; events flagged this way are recorded as bot traffic. |
Responses
curl -X POST https://landing.pivotal.digital/api/public/analytics/event \
-H "Content-Type: application/json" \
-d '{
"site_key": "WA-ABC123",
"event_type": "pageview",
"url": "https://example.com/pricing",
"path": "/pricing",
"referrer": "https://google.com",
"page_title": "Pricing",
"visitor_id": "v_a1b2c3d4",
"session_id": "s_x9y8z7"
}'
(empty body — always returned, even on error)
Landing Platform