Step 1: Add dependencies in package.json
In your package.json, include the following in dependencies
Step 2: Sample nodeJS Instrumentation
You will receive the following information about your events slice:
- Event Slice Endpoint
- API Keys for different environments
Substituting the appropriate environment parameters in the examples below.
URL_ENDPOINT : The URL of your Datacoral Events API gateway. Ex. events.dccustomer.datacoral.io
API_KEY : The Datacoral API key to authorize the events invocations. Ex. 1js9q5Gqmk2VDv2omx2WI3yUGV0K7b464fWUJXDX
ENVIRONMENT : Set the environment as
prod, based on the emitter of the events
NAMESPACE : The name of this Tracker instance to include with events sent to the collector. The namespace argument attached to every event fired by the new tracker. This allows you to later identify which tracker fired which event if you have multiple trackers running. Ex. landing_pages
APP_ID : Name of application to include with events sent to the collector. The application ID is used to distinguish different applications that are being tracked by the same Snowplow stack. Ex. "finance" or "hr"