Skip to content

Event tracking

The event-tracking endpoint can be used to track events using the event spec from anywhere. This includes, but is not limited to:

  • Server-to-server
  • Browser
  • Embedded device
  • IoT device

The event tracker provides an endpoint and configuration variables to offer you a flexible interface for tracking events.

Paths

The event-tracking endpoint provides the following path for you to use:

Path Variables Variable Info Description
/collect/{aid}/{tid}/event N/A N/A The default endpoint, simple empty response

Usage

The event-tracking endpoint supports a variety of variables that can be used to add depth and clarity to the events at hand.

Do note that the "required" variables below are required for tracking. If not provided, the event will not be tracked.

Path Parameters

The table below shows all parameters that can be set in the endpoint's path:

Variable Value Required? Description Example
aid number/uuid yes the account ID the event is for 1
tid number/uuid yes the tracker ID the event is for 1

Body Parameters

The table below shows all parameters that can be set in the endpoint's body as JSON:

Variable Value Required? Description Example
action string yes the action performed view
object string yes the object the action is performed on form
vendor string yes a vendor registered with Orbee's Platform Vendor A
product string yes the vendor's product firing the event Product 1
instance_id string yes see instance ID below abc123
* * no see the Event Specification for additional supported fields N/A

Best Practices

Implications of using the event tracker come with some rules to abide by. The list below covers most pain-points there are when using the event tracker.

Check IDs against the Platform

It can be easy to get your IDs wrong in the URL. Be sure to check the IDs against Orbee's to make sure they match. The aid and tid parameters need to match exactly to what's in Orbee's Marketing Platform.


How it works

The event-tracking endpoint is a robust tracking engine that works on tracking events in real-time and matching them with equivalent events from the Web SDK.

1. Event ID

The first thing the endpoint does is generate an event ID. This ID is stored with the event.

2. Input Validation + Formatting

Given the body of the request, the information is collected and curated into an event format supported internally.

3. Tracking

Before the endpoint returns a response, it tracks the event by queueing up the event in our backend. This is done asynchronously while generating and returning the response.

Instance ID

The instance ID in the event is a special field. Any event-specification event from the Web SDK can include an instance ID to match with using this endpoint.

For example, you might collect leads separately through a text-chat application. You can set your chat ID as the instance ID on your website when the chat is started. Once the chat completes and the lead is gathered, your back end can fire an event to this endpoint with the same instance ID to connect that lead to the equivalent shopper from your website.

In the case where the lead is entirely separate (e.g. a call into the dealership), you still need to fire the event with the instance ID. Orbee's analytics engine will use other aspects of the event to connect the event to a shopper on your website. In the meantime, you can still provide additional information through other events using that same instance ID -- allowing you to robustly enrich your shopper's data in a variety of ways.


Last update: 2023-04-13