Skip to content

Ads Pixel Events

Updated: Jan 2, 2024

Reading

You can't perform this operation on this endpoint.

Creating

/{ads_pixel_id}/events

You can make a POST request to events edge from the following paths:

When posting to this edge, no Graph object will be created.

Example

Select language

HTTPPHP SDKJavaScript SDKAndroid SDKiOS SDKcURL


POST /v25.0/<PIXEL_ID>/events HTTP/1.1
Host: graph.facebook.com

data=%5B%7B%22event_name%22%3A%22PageView%22%2C%22event_time%22%3A1778607673%2C%22user_data%22%3A%7B%22fbc%22%3A%22fb.1.1554763741205.AbCdEfGhIjKlMnOpQrStUvWxYz1234567890%22%2C%22fbp%22%3A%22fb.1.1558571054389.1098115397%22%2C%22em%22%3A%22309a0a5c3e211326ae75ca18196d301a9bdbd1a882a4d2569511033da23f0abd%22%7D%7D%5D

Try it in Graph API Explorer

If you want to learn how to use the Graph API, read our Using Graph API guide

Parameters

ParameterDescription
data list<JSON-encoded string>data required
platforms array<JSON object>platforms --- name string name required type string type required version string version Show child parameters
progress Objectupload progress for offline events --- start_inclusive int64 end_exclusive int64 Show child parameters
test_event_code stringCode that is used to identify server test events

Return Type

Struct  {
events_received: integer,
messages:  List  [string],
fbtrace_id: string,
} Or  Struct  {
applink_class: string,
applink_url: string,
applink_args: string,
is_fb: bool,
is_paid: bool,
account_id: ad account id,
ad_id: numeric string,
ad_objective_name: string,
adgroup_id: numeric string,
adgroup_name: string,
campaign_id: numeric string,
campaign_name: string,
campaign_group_id: numeric string,
campaign_group_name: string,
click_time: timestamp,
is_mobile_data_terms_signed: bool,
is_external: bool,
is_instagram: bool,
is_view_through: bool,
is_modeled: bool,
is_same_ip: bool,
device_model: string,
os_version: string,
view_time: timestamp,
is_playable_ad: bool,
is_aaa_campaign: bool,
creative_id: numeric string,
engagement_type: enum,
trace_id: string,
fbclid: string,
event_id: string,
vertical: string,
sub_vertical: string,
advertiser_region: string,
additional_touchpoints:  List  [ Struct  {
ad_id: numeric string,
adgroup_id: numeric string,
adgroup_name: string,
campaign_id: numeric string,
campaign_name: string,
campaign_group_id: numeric string,
campaign_group_name: string,
account_id: ad account id,
is_view_through: bool,
click_time: timestamp,
view_time: timestamp,
engagement_type: enum,
is_external: bool,
is_instagram: bool,
publisher_platform: string,
is_aaa_campaign: bool,
creative_id: numeric string,
vertical: string,
sub_vertical: string,
advertiser_region: string,
}],
video_completion_percent: float,
dwell_ms: unsigned int32,
publisher_platform: string,
platform_position: string,
auditing_token: string,
hashed_ad_network_publisher_app_id: string,
} Or  Struct  {
success: bool,
} Or  Struct  {
claims:  List  [ Struct  {
is_fb: bool,
ad_objective_name: string,
ad_id: numeric string,
adgroup_id: numeric string,
adgroup_name: string,
campaign_id: numeric string,
campaign_name: string,
campaign_group_id: numeric string,
campaign_group_name: string,
account_id: ad account id,
touchpoint_type: string,
touchpoint_ts: timestamp,
auditing_token: string,
exp_id: integer,
publisher_platform: string,
publisher_placement: string,
device_platform: string,
device_model: string,
event_id: string,
event_name: string,
advertiser_direct_amm_metadata:  Map  {
string: string},
claim_storage_type: string,
is_modeled: bool,
}],
}

Error Codes

Error CodeDescription
200Permissions error
100Invalid parameter
190Invalid OAuth 2.0 Access Token

Updating

You can't perform this operation on this endpoint.

Deleting

You can't perform this operation on this endpoint.

Unofficial mirror for reference/search purposes. All content originates from developers.facebook.com — see the source link at the top of each page. Machine-readable indexes: llms.txt · llms-full.txt · About