Firstparty exposes a number of items that are the core Data Objects used to keep track of what's happening across your business.
Events describe activities happening within your business. Events are always associated with a Profile, and sometimes
collected as a Session.
Learn More About Events
Sessions keep track of a Profile's Events within a logical period of time - usually when browsing a website or
accomplishing some tasks in an application.
Learn More About Sessions
Profiles represent the individual humans that perform Event-generating activities collected in Firstparty.
Learn More About Profiles
All Firstparty Data Objects expose a customizable properties object on the Object. Object Properties are extremely
flexible, and you may set any data you'd like on the properties key of any Object.
You may specify a
propertiesobject when sending an Event to be collected by Firstparty. Different Source types will require different methods of settingproperties.As Firstparty collects Events, any Rules defined in your Workspace will be evaluated and executed when appropriate. Rules may be used to manipulate the
propertiesof any Event, Session, or Profile.
In addition to the properties key, Data Objects may expose a number of additional fields:
| Item Key | Description |
|---|---|
context | Describes the context of the collected Event or Session. (More Below) |
created_at | ISO 8601 timestamp of when the Item was created |
updated_at | ISO 8601 timestamp of when the Item was last updated |
Events and Sessions may include an optional Context object, helps describe the environment the Event was collected in a standardized format. Context includes data such as Browser details, Device details, Operating System, Screen Size, Time Zone, Geography, etc.
Firstparty.js automatically populates several Context fields for every collected Event. When sending an event to Firstparty using the HTTP API the Context is optional but should be considered a good practice to include.
Firstparty will use the IP address an Event's payload was sent from and attempt to fill the context.location object
if it is empty.
Here is a sample of a complete Context object in JSON:
{
"context": {
"app": {
"name": "Support",
"version": "2.1",
"build": "14809",
"namespace": "com.domain.support"
},
"campaign": {
"name": "Campaign Name",
"source": "social",
"medium": "twitter",
"term": "keyword",
"content": "image link"
},
"device": {
"id": "guid-guid-guid-guid",
"advertising_id": "guid-guid-guid-guid",
"ad_tracking_enabled": true,
"manufacturer": "Apple",
"model": "iPhone 13,1",
"name": "Iphone",
"type": "ios",
"token": "guid-guid-guid-guid"
},
"ip": "123.123.123.123",
"locale": "en-US",
"location": {
"city": "Scottsdale",
"country": "USA",
"continent": "North America",
"postal": "",
"subdivision": "",
"latitude": "33.494978",
"longitude": "-111.926127",
"is_european_union": false
},
"network": {
"bluetooth": true,
"carrier": "T-Mobile",
"cellular": true,
"wifi": false
},
"os": {
"name": "iPhone OS",
"version": "13.0.1"
},
"browser": {
"name": "Safari",
"version": "15.1"
},
"page": {
"path": "/support/chat",
"referrer": "/support",
"search": "corporis",
"title": "Support Chat",
"url": "https://app.domain.com/support/chat"
},
"screen": {
"height": "1750",
"width": "1150"
},
"timezone": "America/Phoenix",
"useragent": "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko)",
"bot": {
"name": "",
"is_bot": false
}
}
}