Skip to main content

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

AttributeDescriptionRequiredPossible Values
nameAudience segment nameR375 characters max
retention_in_days# of days to retain audience membersRUp to 395 days
prefillInclude event data recorded prior to the audience creationRAlways set to TRUE
ad_account_idAd account ID for the new audienceRXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
source_typeData source typeRPIXEL
pixel_idPixel ID associated with the ad account for the audienceRXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
pixel_spec_objectPixel spec object for the audienceRSee 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?
Yes
No