Serverside Event

Sends a serverside tracking event to the sitesights.io backend.

POST
https://app.sitesights.io/api/event-view

If you want to know more about the ClientId Parameter, you should checkout the following this link.

Root object object required

Root object

Name string required

Event name or category

Parameters array<object> required

List of parameters. Max length: 12, You can also have zero parameters but you have to send an empty array.

array element object

array element representing one parameter with its value

Name string required

Name of the parameter

Value string required

Value of the parameter

Metrics object required

This holds all of the information about the visitor.

Browser object required

Holds information about browser.

IP string required

Valid IP Address of the visitor.

UserAgent string or empty string required

UserAgent or empty string of the visitor.

Identify object required

Identifier container

ClientId string or null

Optional string identifier to identify current visitor. This is very specific to your website, for example if a lot of your users have an account and are logged in. You could use their Unqiue Account ID here (This will be hashed beyond recognition) or if you get the permission of your visitor, you can use something like fingerprinting. For a much more detailed explaination, please go here.

Language object required

Holds information about languages

Code string required

Language Code

Close allowed values
Expand allowed values
ISO Language Codes
ISO 639-1 2 Letter Codes
Page object required

Holds information about the page

Absolute string required

Complete valid absolute URL including query part

Referrer object required

Holds information about the referrer page

Absolute string

Complete valid absolute URL including query part

Screen object required

Holds information about the screen size

Height double or float or int required

Screen height in pixels

Width double or float or int required

Screen width in pixels

Location object required

Holds information about the location

ContinentCode string or null

Continent Code

Close allowed values
Expand allowed values
AF
Africa
NA
North America
OC
Oceania
AN
Antarctica
AS
Asia
EU
Europe
SA
South America
CountryCode string or null

ISO_3166-1 Alpha-2 code

City string or null

City Name

PostalCode string or null

Postal code

Region string or null

Region Name

RegionCode string or null

Region Code

Timezone string or null

Timezone Name

Root object object

The response json

Code number

Code to determine success or error

Close allowed values
Expand allowed values
200
Success
401
Unauthorized
400
Malformed Body
429
Monthly contigent exceeded
Message string

Description of errors

Request body
{
  "Name": "test",
  "Parameters": [
    {
      "Name": "param1",
      "Value": "value2"
    }
  ],
  "Metrics": {
    "Browser": {
      "IP": "91.48.119.123",
      "UserAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/116.0"
    },
    "Identify": {
      "ClientId": null
    },
    "Language": {
      "Code": "en"
    },
    "Location": {
      "CountryCode": "AF",
      "ContinentCode": "AF",
      "City": "test",
      "Region": null,
      "RegionCode": null,
      "PostalCode": "33100",
      "Timezone": null
    },
    "Page": {
      "Absolute": "https://app.sitesights.io/analytics"
    },
    "Referrer": {
      "Absolute": null
    },
    "Screen": {
      "Width": 200,
      "Height": 200
    }
  }
}