Website Events
Website Custom Audiences require that you have the Snap Pixel installed on your website, or that you are passing back the equivalent information via the Snapchat Conversions API. This audience is event-based and constructed out of Snapchatters who have triggered the corresponding events on your website, it's updated dynamically as Snapchatters trigger events over time.
Attributes
Attribute | Description | Required | Possible Values |
---|---|---|---|
name | Audience segment name | R | 375 characters max |
retention_in_days | # of days to retain audience members | R | Up to 395 days |
prefill | Include event data recorded prior to the audience creation | R | Always set to TRUE |
ad_account_id | Ad account ID for the new audience | R | XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX |
source_type | Data source type | R | PIXEL |
pixel_id | Pixel ID associated with the ad account for the audience | R | XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX |
pixel_spec_object | Pixel spec object for the audience | R | See below example |
prefill
- Always set to “TRUE”.
pixel_spec_object
- If multiple pixel events, always include the “or” object.
- Always include the “event” object with at least one pixel event as the “eq” (equal) parameter.
- Eligible pixel events:
- APP_INSTALL
- PURCHASE
- SAVE
- START_CHECKOUT
- ADD_CART
- This is considered Adds to Basket
- VIEW_CONTENT
- ADD_BILLING
- SIGN_UP
- SEARCH
- LEVEL_COMPLETE
- APP_OPEN
- PAGE_VIEW
- SUBSCRIBE
- AD_CLICK
- AD_VIEW
- COMPLETE_TUTORIAL
- INVITE
- LOGIN
- SHARE
- RESERVE
- ACHIEVEMENT_UNLOCKED
- ADD_TO_WISHLIST
- SPENT_CREDITS
- RATE
- START_TRIAL
- LIST_VIEW
- CUSTOM_EVENT_1
- CUSTOM_EVENT_2
- CUSTOM_EVENT_3
- CUSTOM_EVENT_4
- CUSTOM_EVENT_5
Example request
In this example an audience is created out of Snapchatters that have triggered a PURCHASE or START_CHECKOUT event in the past 99 days.
curl -X POST 'https://adsapi.snapchat.com/v1/adaccounts/{ad_account_id}/segments' \
--header 'Authorization: Bearer meowmeowmeow' \
--header 'Content-Type: application/json' \
--data '{
"segments": [
{
"name": "test_pixel",
"retention_in_days": 99,
"prefill": true,
"ad_account_id": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
"source_type": "PIXEL",
"pixel_id": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
"pixel_spec_object": {
"or": {
"event": [
{
"eq": "PURCHASE"
},
{
"eq": "START_CHECKOUT"
}
]
}
}
}
]
}'
Was this page helpful?