Create Event
Changed onTracks a conversion or engagement event for an account, such as a lead or a sign-up, so it can be attributed to the ads and links that drove it. Send server-side events with an API key that has event:create; the browser pixel calls this without authentication.
Request
- Base URLhttps://api.whop.com/api/v1
- Auth
- HTTP bearer
- or none
Headers
A unique key that makes this request safe to retry. See Idempotent requests.
Request body
Parameters for CreateConversion
The account to associate with this event.
The channel where an event originated
The build of the hosted app that served the page where the event occurred.
The hosted app that served the page where the event occurred.
Tracking and attribution context.
The available currencies on the platform
Custom event name when event_name is 'custom'. Maximum 35 chars for this value.
For 'leave' events: milliseconds the visitor spent on the page.
Client-provided identifier for deduplication. Generated if omitted.
The type of event.
Use a standard event (lead, submit_application, contact, complete_registration, schedule, view_content, add_to_cart, initiate_checkout) or pass your own name directly for a custom event.
When the event occurred. Defaults to now.
The product associated with the event.
The referring URL.
For 'page' events: true when the page was restored from the back/forward cache.
For 'identify' events: where the identity was captured (url, form, manual, iframe).
For 'page' events: the document title.
The URL where the event occurred.
User identity and profile data.
Monetary value associated with the event.
The variant associated with the event.
Example request
{
"account_id": "biz_xxxxxxxxxxxxxx",
"action_source": "website",
"app_build_id": "apbu_xxxxxxxxxxxxx",
"app_id": "app_xxxxxxxxxxxxxx",
"context": {
"ad_campaign_id": "23851234567890123",
"ad_id": "23851234567890125",
"ad_set_id": "23851234567890124",
"fbc": "fb.1.xxxxxxxxxx.IwAR0shine",
"fbclid": "IwAR0shineTimeAutoDetailing",
"fbp": "fb.1.xxxxxxxxxx.xxxxxxxxxx",
"fingerprint": "fp_4d19c7",
"fingerprint_confidence": 6.9,
"ga": "GA1.1.xxxxxxxxxx.xxxxxxxxxx",
"gbraid": "0AAAAA-shinetime",
"gclid": "Cj0KCQiAshinetime",
"ig_sid": "ig_shinetime_1",
"ip_address": "1.2.3.4",
"language": "en-US",
"li_fat_id": "lifat-shinetime",
"msclkid": "a1b2c3d4shine",
"rdt_cid": "t2_shinetime",
"sc": "BDFB1C71",
"sccid": "sccid-shinetime",
"screen_resolution": "390x844",
"timezone": "America/Chicago",
"ttclid": "E.C.P.ttclid.shine",
"ttp": "2ShineTimeTtp",
"twclid": "twclid-shinetime",
"user_agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 17_5 like Mac OS X) AppleWebKit/605.1.15",
"utm_campaign": "ceramic-coating-spring",
"utm_content": "carousel-a",
"utm_id": "utm_88213",
"utm_medium": "cpc",
"utm_source": "google",
"utm_term": "ceramic coating austin",
"wbraid": "Cj0KCQjw-wbraid-shine"
},
"currency": "usd",
"custom_name": "coating_deposit_paid",
"duration": 42,
"event_id": "evnt_xxxxxxxxxxxxx",
"event_name": "coating_deposit_paid",
"event_time": "2023-12-01T05:00:00.401Z",
"product_id": "prod_xxxxxxxxxxxxx",
"referrer_url": "https://www.google.com/",
"source": "website",
"title": "Ceramic coating quote request",
"url": "https://shinetime.example/quote",
"user": {
"anonymous_id": "anon_8f2c41",
"birthdate": "1990-01-15",
"city": "Austin",
"country": "US",
"email": "marcus@shinetime.example",
"external_id": "crm_8842",
"first_name": "Dana",
"gender": "female",
"last_name": "Whitfield",
"linked_anonymous_id": "anon_1b9de0",
"linked_wuid": "user_xxxxxxxxxxxxxx",
"member_id": "mber_xxxxxxxxxxxxx",
"membership_id": "mem_xxxxxxxxxxxxxx",
"name": "Dana Whitfield",
"phone": "+xxxxxxxxxxx",
"postal_code": "78756",
"state": "TX",
"user_id": "user_xxxxxxxxxxxxx",
"username": "danawhitfield"
},
"value": 6.9,
"variant_id": "plan_xxxxxxxxxxxxx"
}Response
event created
Example response
{
"id": "evnt_xxxxxxxxxxxxxx"
}Changes
- info
added the new
hnlenum value to the request propertycurrency/oneOf[subschema #1]
- info
- warning
removed the request property
plan_id - info
added the new optional request property
variant_id
- warning