Event Slice Overview
This section of the documentation is useful if you have the Datacoral Collect Events Slice already added to your Datacoral Installation. If you want one please contact support@datacoral.co for now. We are working on allowing you to add your own Collect Events Slice using the CLI.
Our default Collect Events Slice is compatible with the Snowplow Tracker Protocol.
We also have a few other events slices. Please contact us if you want to learn more.
Snowplow provides tracker or instrumentation libraries in several languages. We have incorporated those libraries and enhanced them to support
- pointing to your own Events HTTP Endpoint,
- generating API Keys,
- multiple environments like dev/stage/prod so that events can be segregated based on the environments, and
- for browser js instrumentation, specifying CORS Origins
Below are the steps to go through to setup instrumentation using Datacoral Collect Events Slice.
Step 1: Specify the Environments
Before Datacoral can install the Collect Events Slice for you, you will have to specify the following:
- Environments: Typically, you want to have
dev
,stage
, andprod
environments. Some companies also have auat
environment. - If you plan to use Browser JS Instrumentation, specify the CORS Origins corresponding to each environment. So, you would need to provide a mapping table that looks like this:
Step 2: Add the Collect Events Slice
Once you provide the above configuration, Datacoral will deploy the Collect Events Slice for you and give you the following:
Events endpoint: Typically this looks like
events.company.datacoral.io
Table of API Keys for different environments:
Environment | API Key |
---|---|
dev | jkBq6yLbwR5apjeYLo8tP9slV4OJNxeX7FId5grM |
stage | asdaf6yLbwR5apjeYLo8tP9slV4OJNxeX7FId5grM |
prod | iuuasdoaaskio87ho1hu18hli13498h8y1h4o8hoy |
Step 3: Access git repositories
Other than for Browser Instrumentation and Pixel Tracking where you can directly point to the libraries that are served directly from datacoral, you would have to depend on the Datacoral Instrumentation Libraries in different languages from our git repositories. When you install Datacoral, your AWS account will have access to the S3 bucket with the pem file.
A: Download the SSH key for the tracker library repo from S3
Your AWS account should already have access to the S3 bucket that has the SSH Key needed. Please contact support@datacoral.co if you don't have permissions.
B: Add the ssh-key to your agent
Step 4: Add instrumentation to your app
See the rest of the documentation section for examples of adding instrumentation calls to your application in different languages.
Step 5: Query event data in Redshift
In redshift, the events land into time series tables. Depending on the env chosen in the code, the data ends up in a different schema events_<env>
where env
is one of the environments specified while configuring the Collect Events Slice. For custom
events, you should be able to fetch the specific columns by running the following query: