Skip to main content

Verify Set Up

This page details ways to verify that your setup is working correctly and is intended to help you to improve ad performance using the test event endpoints and tools.

Test Event Tools

The Conversions API provides Test Event Tool endpoints that allow advertisers to send test events and validate them. Advertisers can verify that their events were constructed properly and have successfully reached our servers in near real-time without sending actual production events.

All of the Test Event Tool endpoints support OAuth access tokens for authorization. They can also accept the long-lived access token as long as the given pixel or app is owned by the organization that generated the long-lived token In addition to viewing your test event data using these API endpoints, you can also view your test events in the Events Manager. For more information, please refer to the Validating with Event Testing article on our Business Help Center.

Sending a Test Event

TypePOST
Path/v3/<asset_id>/events/validate
Paramsaccess_token
URLhttps://tr.snapchat.com/v3/<asset_id>/events/validate?access_token=<access_token>
NotesAsset_id = Valid pixel_id or snap_app_id Access_token = Must be a valid Capi token associated with the asset_id, Usually created in the Ads Manager business page.

Handles and validates the parameters passed by the request.

Required fields:

  • event_name / event_type
  • event_time / timestamp
  • action_source / event_converstion_type
  • event_source_url / page_url

Response fields

FieldsStatusStatus code
Any required fieldsINVALID400
Missing price and/or currency in Purchase eventsINVALID400
Invalid hashed IP AddressINVALID400
Timestamp invalid or out of rangeINVALID400
Unhashed PIIINVALID400
Insufficient PIIINVALID400

Request


curl
--location
--request POST 'https://tr.snapchat.com/v3/1ec32188-754e-4be2-8e55-c949a984a39f/events/validate?access_token=<ACCESS_TOKEN_REDACTED>'
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer redacted' \
--data '{
"data": [
{
"integration": "segment",
"event_name": "PAGE_VIEW",
"event_source_url": "https://anyfin.com/de_DE/apply/refinance?app=KalpNumberOfKids",
"event_time": 1709134932806,
"user_data": {
"em": [ "05ede0733f4de4dd98241801b537106f7deaa07f9f3ee67b509c20fb236868b6"]
},
"action_source": "website"
}
]
}

Response

Response
Status: 400 Bad Request
{
"status": "INVALID",
"test_event": true,
"reason": "At least one of the events is invalid.",
"event_logs": [
{
"event": 1,
"status": "INVALID",
"errors": {
"codes": [
"517"
],
"error_msgs": [
"The parameter 'advertiser_tracking_enabled' is required for the event with the action source 'app' (each set to either 0 or 1). Apps should expose an opportunity for users to opt-out of ad tracking, resulting in the setting of the 'advertiser_tracking_enabled' parameter."
]
}
}
]
}

Retrieve test event metadata

Retrieves a paginated metadata associated with test events sent within the past 24 hours in the form of a JSON response for this specific asset_id.

TypeGET
Pathv3/<asset_id>/events/validate/logs
Paramsaccess_token
URLhttps://tr.snapchat.com/v3/<asset_id>/events/validate/logs?access_token=<access_token>
NotesAsset_id = Valid pixel_id or snap_app_id Access_token = Must be a valid Capi token associated with the asset_id, Usually created in the Ads Manager business page.

Request

curl
--location
--request GET 'https://tr.snapchat.com/v3/1ec32188-754e-4be2-8e55-c949a984a39f/events/validate/logs?access_token=<ACCESS_TOKEN_REDACTED>'

Response

{
"status": "SUCCESS",
"reason": "Logs retrieved successfully.",
"logs": [
{
"event_name": "PAGE_VIEW",
"event_time": "1709246086907",
"action_source": "WEB",
"status": "INVALID",
"error_records": [
"The parameter 'advertiser_tracking_enabled' is required for the event with the action source 'app' (each set to either 0 or 1). Apps should expose an opportunity for users to opt-out of ad tracking, resulting in the setting of the 'advertiser_tracking_enabled' parameter."
],
"asset_id": "1ec32188-754e-4be2-8e55-c949a984a39f",
"raw_event_name": "PAGE_VIEW"
},
{
"event_name": "PAGE_VIEW",
"event_time": "1709245857895",
"action_source": "WEB",
"status": "INVALID",
"error_records": [
"The parameter 'advertiser_tracking_enabled' is required for the event with the action source 'app' (each set to either 0 or 1). Apps should expose an opportunity for users to opt-out of ad tracking, resulting in the setting of the 'advertiser_tracking_enabled' parameter."
],
"asset_id": "1ec32188-754e-4be2-8e55-c949a984a39f",
"raw_event_name": "PAGE_VIEW"
}
]
}

Check Stats

To retrieve basic stats such as the number of events received in the last hour and the latest timestamp for the latest event.

TypeGET
Pathv3/<asset_id>/events/validate/stats
Paramsaccess_token=<access_token>
URLhttps://tr.snapchat.com/v3/<asset_id>/events/validate/stats?access_token=<access_token>
NotesAsset_id = Valid pixel_id or snap_app_id Access_token = Must be a valid Capi token associated with the asset_id, Usually created in the Ads Manager business page.

Request

curl
--location
--request GET 'http://tr-shadow.snapchat.com/v3/1ec32188-754e-4be2-8e55-c949a984a39f/events/validate/stats?access_token=<ACCESS_TOKEN_REDACTED>'

Response

Status: 200 OK
{
"status": "SUCCESS",
"reason": "Stats retrieved successfully.",
"stats": {
"test": {
"latest_event_ts": 1709247922284,
"event_count_past_hour": 1
}
}
}

Request Check Tool

Use this tool to validate your CAPI v3 request data object

Before sending events via CAPI, check that your payload data is set up properly. Including your Pixel ID and Auth Token will send a validation check.

Read through Using the API and view our available Parameters

Was this page helpful?
Yes
No

AI-Powered Search