Onsite Events

Onsite Events are Events created when a Customer interacts with your website or online store. You can add a script to your website to capture these Events in CrossEngage automatically. For more information, please see Web Tracking.

Events

We can roughly divide Onsite events into 4 categories:

  • UserID Events

  • View Events

  • Product Events

  • Coupon Event

Note that Orders placed on your website are considered Transactions.

  • User Login

  • User Logout

  • Identified

  • Registered

Properties

All Onsite Events have two base properties: User_id and timestamp. Additionally, based on the Event, it could also have Cart, Product and Page Properties.

Property
Description
Mandatory
Example

User_id

Unique identifier

ABC12345

timestamp

Event date / time

2022-01-01

While the two base properties are common, events may or may not posses Cart, Product and page properties. If you need any help regarding events and properties, please write us a ticket.

Cart Properties

Property
Description

total

Total value of the cart

currency

Currency

products

products present in the cart

numberOfItems

total number of all items in the cart

numberOfUniqueItems

number of unique items in the cart

Page Properties

Property
Description

url

URL of the webpage

title

Title of the webpage

path

path to the visited page

referrer

The webpage from which this resource is visited

language

Language of the webpage

location

URL of the page

Product Properties

Property
Description

category

Product category

brand

Product brand

sku

Stock Keeping Unit, unique identifier of the product

name

Product name

currency

Currency of payment

price

Price per unit

quantity

Quantity

id

Examples

You can upload these events using the CrossEngage API, or via the Event Feed. Please go to Data Management to learn more.

Here is an example of the JSON used to upload an event via the API.

{
   "id": "78ad0e3e-19e6-4ec1-84a7-b2c860c05387",
   "timestamp": "2021-10-22T09:21:06Z",
   "events": [{
           "event": "Added Product",
           "properties": {
               "cart": {
                   "total": 150,
                   "currency": "EUR",
                   "numberOfItems": 3,
                   "numberOfUniqueItems": 1,
                   "products": [{
                           "id": "507f1f77bcf86cd879439023",
                           "sku": "61979589",
                           "brand": "Happy",
                           "title": "Zegna Shirt",
                           "name": "Striped Shirt",
                           "price": 50,
                           "quantity": 3,
                           "category": "Shirts",
                           "currency": "EUR"
 }]}}}]}

Here is the same example, presented as a JSON file that can be uploaded via Data Feeds:

[{
       "event": "Added Product",
       "id": "78ad0e3e-19e6-4ec1-84a7-b2c860c05387",
       "timestamp": "2021-10-22T09:21:06Z",
       "cart": {
           "total": 150,
           "currency": "EUR",
           "numberOfItems": 3,
           "numberOfUniqueItems": 1,
           "products": {
                   "id": "507f1f77bcf86cd879439023",
                   "sku": "61979589",
                   "brand": "Happy",
                   "title": "Zegna Shirt",
                   "name": "Striped Shirt",
                   "price": 50,
                   "quantity": 3,
                   "category": "Shirts",
                   "currency": "EUR"
}}}]

Last updated