This is a Jitsu.Classic documentation. For the lastest version, please visit docs.jitsu.com. Read about differences here.
GIF Pixel API
Jitsu has a GIF Pixel API endpoint for tracking email opens, impressions of advertisements and other cases when:
- JavaScript is restricted
- only HTTP GET request is allowed
- only embedding an image is allowed
The endpoint accepts data
query parameter with base64 encoded event data JSON and returns an empty 1Γ1 GIF image.
If you are using deprecated events API (events structure with eventn_ctx
prefix) please add compat=true
field in JSON or as a query parameter.
GET/api/v1/p.gif#
Event data might be provided via data
query parameter that is base64 encoded JSON or via query parameters where parameter name is a path to value in event.
Parameters
token
required
Query String Parameter
string
Client or Server secret token. Also might be provided in the data JSON object.
data
optional
Query String Parameter
string
Base 64 encoded string with event JSON. Might contain token field as well.
path.to.node
optional
Query String Parameter
string
Path to node where write the value. (http://URL?user.email=john@gmail.com&event_type=email_open)
Request sample with data parameter
JSON for encoding:
{
"token": "client_secret",
"user": {
"anonymous_id": "123"
}
}
Request:
HTTP GET https://t.jitsu.com/api/v1/p.gif?data=ewogICJ0b2tlbiI6ICJjbGllbnRfc2VjcmV0IiwKICAidXNlciI6IHsKICAgICJhbm9ueW1vdXNfaWQiOiAiMTIzIgogIH0KfQ==
Request sample with data parameter and paths
JSON for encoding:
{
"token": "client_secret",
"user": {
"anonymous_id": "123"
}
}
Request:
HTTP GET https://t.jitsu.com/api/v1/p.gif?event_type=email_open&utm_campaign=cpa_10000&user.context.flag=true&data=ewogICJ0b2tlbiI6ICJjbGllbnRfc2VjcmV0IiwKICAidXNlciI6IHsKICAgICJhbm9ueW1vdXNfaWQiOiAiMTIzIgogIH0KfQ==
Result JSON:
{
"token": "client_secret",
"user": {
"anonymous_id": "123",
"context": {
"flag": true
}
},
"event_type": "email_open",
"utm_campaign": "cpa_10000"
}
Response
Empty 1Γ1 GIF image with image/gif
Content-Type.
The following data will be set into income events if an event doesn't have a field:
Field | Taken from |
---|---|
url | referer header |
doc_host | parsed url |
doc_path | parsed url |
doc_search | parsed url |
user/anonymous_id | Jitsu identification cookie value. Also, Jitsu sets this cookie if it doesn't exist |
user_agent | request header |
utc_time | current time in UTC as ISO string |
src | jitsu_gif constant |