The clickstream schema is used to capture visitor behavior on a page or UI, one of the most common use cases.
Event contract
{
"id": "9cad95b7-b2bd-49e9-b5e3-d61b2da4f8ff",
"is_public": true,
"key_field": "producerSessionId",
"metadata": {
"create_time": "2021-11-15T09:48:39Z",
"description": "The clickstream schema is used to capture visitor behavior on a page or UI, one of the most common use cases.",
"domains": [
"recommendations",
"personalization",
"(web) analytics",
"e-commerce",
"product analytics"
],
"icon_uri": "https://storage.googleapis.com/strm-media/strm-favicon.svg",
"industries": [
"all industries"
],
"title": "STRM clickstream"
},
"pii_fields": {
"customer/id": 0,
"producerSessionId": 1
},
"ref": {
"handle": "strmprivacy",
"name": "clickstream",
"version": "1.0.0"
},
"schema_ref": {
"handle": "strmprivacy",
"name": "clickstream",
"version": "1.0.0"
},
"state": "ACTIVE",
"validations": [
{
"field": "customer/id",
"type": "regex",
"value": "^.+$"
},
{
"field": "url",
"type": "regex",
"value": "^(https?|ftp|file)://[-a-zA-Z0-9+&@#/%?=~_|!:,.;]*[-a-zA-Z0-9+&@#/%=~_|]"
}
]
}
Serialization schema
{
"name": "ClickstreamEvent",
"type": "record",
"namespace": "io.strmprivacy.schemas.clickstream",
"strmSchemaId": "clickstream",
"fields": [
{
"name": "strmMeta",
"type": {
"type": "record",
"name": "StrmMeta",
"fields": [
{
"name": "eventContractRef",
"type": "string"
},
{
"name": "nonce",
"type": [
"null",
"int"
],
"default": null
},
{
"name": "timestamp",
"type": [
"null",
"long"
],
"default": null
},
{
"name": "keyLink",
"type": [
"null",
"string"
],
"default": null
},
{
"name": "billingId",
"type": [
"null",
"string"
],
"default": null
},
{
"name": "consentLevels",
"type": {
"type": "array",
"items": "int"
}
}
]
},
"doc": "TODO strmMeta will be nullable eventually, but Gateway functionality needs to be verified first!"
},
{
"name": "producerSessionId",
"type": "string"
},
{
"name": "url",
"type": "string"
},
{
"name": "eventType",
"type": "string"
},
{
"name": "referrer",
"type": "string"
},
{
"name": "userAgent",
"type": "string"
},
{
"name": "conversion",
"type": "int"
},
{
"name": "customer",
"type": {
"name": "Customer",
"type": "record",
"fields": [
{
"name": "id",
"type": "string"
}
]
}
},
{
"name": "abTests",
"type": {
"type": "array",
"items": "string"
}
}
]
}