Track mobile screenviews
Sends a screen view event for mobile devices. Screen events help you understand the screens that people use in your app. You should send a screen call whenever a user requests a page of your app.
- enumX
- Strict - Mode const:1When set to
1, enables strict validation that returns proper HTTP error codes (400/401) for validation failures. When not set or set to any other value, the API operates in permissive mode, logging errors but returning HTTP 200. Learn morevalues- 1
- userType: string
Id requiredThe unique identifier for a person. This value should be unique across systems, so you recognize the same person in your sources and destinations.
- contextType: object · Mobile
A dictionary of context about a source call/event, like the user’s IP address or locale. Context is automatically collected by our source libraries.
- integrationsType: object
Contains a list of booleans indicating the integrations that are enabled (true) or disabled (false). By default, all integrations are enabled (returning an empty object). Set
"All": falseto reverse this behavior. - messageType: string
Id A unique identifier for a Data Pipelines call, ensuring that each individual event is unique. This is set by Customer.io
- nameType: string
The name of the screen the person visited.
- originalType: stringFormat: date-time
Timestamp In general, you can use
timestamprather than this field if you want to back-date events. This is the timestamp on the client device you invoke a call or the timestamp value you manually passed in a server-side library call. - propertiesType: object
Additional properties for your screen.
- sentType: stringFormat: date-time
At The ISO-8601 timestamp when a library sends an event to Data Pipelines.
- timestampType: stringFormat: date-time
The ISO-8601 timestamp when the event originally took place. This is mostly useful when you backfill past events. If you're not backfilling data, you can leave this field empty and we'll use the current time or server time.
- 200
A successful request returns an empty object response.
curl https://cdp.customer.io/v1/screen \
--request POST \
--header 'X-Strict-Mode: 1' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic username:password' \
--data '{
"anonymousId": "507f191e810c19729de860ea",
"context": {
"ip": "8.8.8.8"
},
"integrations": {
"All": true,
"Salesforce": false
},
"messageId": "022bb90c-bbac-11e4-8dfc-aa07a5b093db",
"name": "feed",
"properties": {
"subscriptions": [
"baseball",
"basketball"
]
},
"receivedAt": "2015-02-23T22:28:55.387Z",
"sentAt": "2015-02-23T22:28:55.111Z",
"timestamp": "2015-02-23T22:28:55.111Z",
"type": "screen",
"userId": "97980cfea0067",
"version": 1.1
}'
A successful request returns an empty object response.