Developers » Events reference » Events pattern
Events pattern
This guide is only available for Analytics Suite Delta analysis
Send events
Events are sent through GET or POST requests, in the query parameter events
. This parameter takes an array of objects, each object being an event.
Example:
https://YOURSSLCOLLECTDOMAIN/pixel?s=YOURSITEID&events=[{<eventObject>}]
Event object pattern
An event object is following this pattern:
Property | Type | Description |
---|---|---|
name | string | Event name |
data | object | Event data model properties |
Event example
{ "name": "av.heartbeat", "data": { "av_content_id": "bc35", "av_session_id": "799d9f3b-7307-4113-a260-2e1371e35fe6", "av_content": "Broadchurch 3.5", ... } }
Reference
events
query parameter (array)
Events are sent in the query parameter events
, containing an URI encoded array of objects, each one representing an event:
[ EventObject (object), EventObject (object), EventObject (object) ]
EventObject (object)
Event object must follow this pattern:
{ "name": EventName (string), "data": EventData (object) }
EventName (string)
Event name must follow these rules:
- lowercase (our processing will automatically lowercase it)
- authorized characters:
a→z
0→9
.
_
-
- no space
Example: page.display
EventData (object)
Event data is an object following this pattern:
{ PropKey (string): PropValue (any), PropKey (string): PropValue (any) }
PropKey (string)
Property key must follow these rules:
- lowercase (our processing will automatically lowercase it)
- authorized characters:
a→z
0→9
_
- no space
- begin with
a→z
- can’t begin with:
m_
orvisit_
- can’t be:
events
- JSON object will be flattened with
_
in your data model (e.g:{'page': {'name':'foo'}}
={'page_name':'foo'}
$
will be considered as the root of the parent (e.g:{'page': {'$':'foo'}}
={'page':'foo'}
)
Property type
In order to type the property, you can use a prefix:
s:
→ stringf:
→ floatn:
→ integerb:
→ booleand:
→ datea:X:
→ array of X type (e.g:a:s:
means array of strings)
Properties ending with _date
, _utc
, _timestamp
and _ts
are automatically casted as dates if the format:
- is Timestamp in seconds
- complies with the RFC 3339 standard
YYYY-MM-DDTHH:mm:ssZ
If you use
events
methods, if the type prefix is not set, the JSON type will be assigned to the property:
- string
- float (any number will be considered as a float)
- boolean
- object (JSON object)
PropValue (any)
Property value can be of any JSON valid type.
Last update: 28/08/2020