¬ę Back to help center

Sending events using Webhooks

This guide explains how to send events to Contiamo using webhooks.

Contents

Sending events using Webhooks

1. Introduction

After installing an event tracker, you can start sending events to Contiamo immediately. You will find customized Webhook URLs in the Integration tab of your event tracker:

Event tracker integration

2. Webhook endpoint

Property Value
Base URL https://track.contiamo.com/v3/[ user | session | event ]
Protocol HTTPS
Method GET
Payload Url parameters

Authentication

Option Description
Token in URL params &_token=YOURTOKEN&...

3. Recap: Understanding Events, Users and Sessions

The Contiamo tracker allows you to store information on three different levels. Events belong to Sessions which in turn belong to Users:

Event tracker entities

4. Users

GET https://track.contiamo.com/v3/user

A user is a known or unidentified visitor, user or customer who performed actions (created events). Any properties can be attached to a user. The existing user record will be updated if an existing _uid is used.

Property Type Comments
_uid string Unique user identifier. This is a distinct identifier allowing us to identify a user and store events and sessions connected to this user. You will have to choose the type of this unique identifier yourself. Most people use their internal user / customer id, email address or hashes based on one of these properties.
other properties (optional) any type Properties, describing the user. The properties might contain information like gender, email or age.

Example

https://track.contiamo.com/v3/user?_uid=sarah@contiamo.com&first_name=Sara&city=New%20York&_token=YOURTOKEN

or

$ curl -X GET \
  -H 'Authorization: Contiamo YOURTOKEN' \
  -G 'https://track.contiamo.com/v3/user' \
  --data-urlencode '_uid=sarah@contiamo.com' \
  --data-urlencode 'first_name=Sarah' \
  --data-urlencode 'city=New York'

5. Sessions

GET https://track.contiamo.com/v3/session

A session is a period of continous user activity. Any properties can be attached to a session. The existing session record will be updated if an existing _sid is used.

Property Type Comments
_uid (optional) string Unique user identifier. Without a user identifier, the session will be an anonymous session.
_sid string Unique session identifier. This is a distinct identifier allowing us to identify a session. In our javascript tracker the unique session id is generated automatically. When using our HTTP endpoint directly or one of our libraries, you'll have to provide a unique value yourself (for example a random uuid).
other properties (optional) any type Properties, describing the session. The properties might contain information like traffic source, device used or origin country.

Example

https://track.contiamo.com/v3/session?_uid=sarah@contiamo.com&_sid=550e8400-e29b-11d4-a716-446655440000&device=tablet&_token=YOURTOKEN

or

$ curl -X GET \
  -H 'Authorization: Contiamo YOURTOKEN' \
  -G 'https://track.contiamo.com/v3/session' \
  --data-urlencode '_uid=sarah@contiamo.com' \
  --data-urlencode '_sid=550e8400-e29b-11d4-a716-446655440000' \
  --data-urlencode 'device=tablet'

6. Events

GET https://track.contiamo.com/v3/event

Every kind of action performed by a user can be modelled and tracked as an event. Events cannot be updated after they have been created. An event consists of:

Property Type Comments
_uid (optional) string Unique user identifier. Without a user identifier, the event will be an anonymous event.
_sid (optional) string Unique session identifier.
_event string e.g. visit, signup, order - uniquely identifying the type of action the user performed.
other properties (optional) any type Additional properties, describing the event. These properties can be numeric (such as order value and price) or text (such as payment method and product color).

Example

https://track.contiamo.com/v3/session?_uid=sarah@contiamo.com&_sid=550e8400-e29b-11d4-a716-446655440000&_event=order&value=39.99payment_method=Credit%20Card&_token=YOURTOKEN

or

$ curl -X GET \
  -H 'Authorization: Contiamo YOURTOKEN' \
  -G 'https://track.contiamo.com/v3/event' \
  --data-urlencode '_uid=sarah@contiamo.com' \
  --data-urlencode '_sid=550e8400-e29b-11d4-a716-446655440000' \
  --data-urlencode '_event=order' \
  --data-urlencode 'value=39.99' \
  --data-urlencode 'payment_method=Credit Card'