Skip to main content
POST
/
tracking_events
cURL
curl --request POST \
  --url https://api.growi.io/api/public/v1/tracking_events \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "event_name": "cart_viewed",
  "occurred_at": "2023-11-07T05:31:56Z",
  "visitor_uid": "<string>",
  "event_data": {},
  "subtotal": 123,
  "currency": "usd",
  "conversion_platform": "shopify",
  "order_id": "<string>",
  "order_type": "one_time",
  "payment_id": "<string>",
  "external_user_id": "<string>",
  "quantity": 123,
  "campaign_affiliate_id": "<string>",
  "subscription_start_date": 123,
  "subscription_end_date": 123,
  "product_id": "<string>"
}'
{
  "success": true
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Tracking event to be added

event_name
enum<string>
required

Name of the event

Available options:
cart_viewed,
checkout_address_info_submitted,
checkout_completed,
checkout_contact_info_submitted,
checkout_shipping_info_submitted,
checkout_started,
collection_viewed,
page_viewed,
payment_info_submitted,
product_added_to_cart,
product_removed_from_cart,
product_viewed,
search_submitted,
payment_completed,
app_installed,
app_uninstalled
occurred_at
string<date-time>

Timestamp of when the event occurred

visitor_uid
string

Unique identifier for the visitor

event_data
object

Additional data related to the event

subtotal
integer | null

Subtotal amount of the transaction in cents. For example, for $40, input 4000.

currency
enum<string> | null

Currency of the transaction

Available options:
usd,
eur,
gbp
conversion_platform
enum<string>

Which platform the conversion happened on

Available options:
shopify,
tik_tok_shop,
ios,
stripe,
whop
order_id
string | null

ID of the order

order_type
enum<string> | null

Type of the order

Available options:
one_time,
subscription
payment_id
string | null

ID of the payment

external_user_id
string | null

External user ID associated with the event

quantity
integer

Quantity involved in the event

campaign_affiliate_id
string

Tag of the campaign affiliate associated with the event. Not required when order_id is present and the order is a recurring subscription.

subscription_start_date
integer

UTC integer timestamp for the start of the subscription. Required only for subscription events.

subscription_end_date
integer

UTC integer timestamp for the end of the subscription. Required only for subscription events.

product_id
string

The product or plan ID associated with the purchase. Required only for payment events.

Response

Tracking event created successfully

success
boolean