Pixel API

Route event data to your desired destination with our Pixel API.

The RudderStack Pixel API allows you to track your customer event data from anywhere and route it to your desired destinations.

This API is very useful in scenarios where making a POST request is not possible. Some examples include tracking email addresses and page views where POST requests don’t add or append any value.

Sending a page call to RudderStack

API MethodBase Path
GET/pixel/v1/page
Required parametersTypeLocation
writeKey=${writeKey}stringquery
anonymousId=${anonymousId}stringquery
Optional parametersTypeLocation
userId=${userId}stringquery
name=${page_name}stringquery
context.library.namestringquery
context.library.versionstringquery
context.platformstringquery
context.localestringquery
context.userAgentstringquery
context.screen.widthstringquery
context.screen.heightstringquery
context.page.pathstringquery
context.page.urlstringquery
context.page.referrerstringquery
context.page.titlestringquery
properties.<*key1*>=${value}stringquery
properties.<*key2*>=${value}stringquery
ParameterTypeLocationRequired
anonymousIdstringquerytrue
userIdstringqueryfalse
namestringqueryfalse
ResponseContentType
200OKSuccess
400 Bad Requesterror stringError

Example call:

https://hosted.rudderlabs.com/pixel/v1/page?writeKey=${writeKey}&context.library.name=Rudderstack AMP SDK&context.library.version=1.0.0&context.platform=AMP&anonymousId=${anonymousId}&context.locale=${browserLanguage}&context.userAgent=${userAgent}&context.page.path=${canonicalPath}&context.page.url=${canonicalUrl}&context.page.referrer=${documentReferrer}&context.page.title=${title}&context.screen.width=${screenWidth}&context.screen.height=${screenHeight}&properties.path=${canonicalPath}&properties.url=${canonicalUrl}&properties.referrer=${documentReferrer}&properties.title=${title}&name=${pageName}
warning
For this endpoint, RudderStack expects that the basic page view properties like path, url, referrer, title be passed either with context.page.<page_basic_properties> or with properties.<page_basic_properties>.
info
The dot (.) separated query parameters are mapped by RudderStack to a familiar page payload before sending them to the destinations.
warning
Note that for this endpoint, RudderStack does not currently support overriding the integration key for sending data to selective destinations.

Sending a track call to RudderStack

API MethodBase Path
GET/pixel/v1/track
Required parametersTypeLocation
writeKey=${writeKey}stringquery
anonymousId=${anonymousId}stringquery
event=${event_name}stringquery
Optional parametersTypeLocation
userId=${userId}stringquery
name=${page_name}stringquery
context.library.namestringquery
context.library.versionstringquery
context.platformstringquery
context.localestringquery
context.userAgentstringquery
context.screen.widthstringquery
context.screen.heightstringquery
context.page.pathstringquery
context.page.urlstringquery
context.page.referrerstringquery
context.page.titlestringquery
properties.<*key1*>=${value}stringquery
properties.<*key2*>=${value}stringquery
ParameterTypeLocationRequired
anonymousIdstringquerytrue
userIdstringqueryfalse
namestringqueryfalse
ResponseContentType
200OKSuccess
400 Bad Requesterror stringError

Example call:

https://hosted.rudderlabs.com/pixel/v1/track?writeKey=${writeKey}&context.library.name=Rudderstack AMP SDK&context.library.version=1.0.0&context.platform=AMP&anonymousId=${anonymousId}&context.locale=${browserLanguage}&context.userAgent=${userAgent}&context.page.path=${canonicalPath}&context.page.url=${canonicalUrl}&context.page.referrer=${documentReferrer}&context.page.title=${title}&context.screen.width=${screenWidth}&context.screen.height=${screenHeight}&event=${eventName}&properties.key1=value1&properties.key2=value2
warning
For this endpoint, RudderStack expects the basic page view properties like path, url, referrer, and title to be passed with context.page.<page_basic_properties>. The event-related properties should be sent as properties.<*key1*>=${value}.
info
The dot (.) separated query parameters are mapped by RudderStack to a familiar track payload before being sent to destinations.
warning
Note that for this endpoint, RudderStack currently does not support overriding the integration key for sending the data to selective destination.

Questions? Contact us by email or on Slack