Events from .Net
Target version of the windows application using the tracker should be 4.6 or above.
Step 1: Installing the tracker
Download Snowplow.Datacoral.Tracker.dll from below s3 location and add it as a references to your solution.
Step 2: Using the tracker
Importing the library
Add the following using lines to the top of your .cs scripts to access the Tracker:
Creating a tracker
To use the Tracker in your code simply instantiate the Tracker interface with the following snippet. Datacoral will provide the Collector endpoint URL and the different supported environments along with their corresponding api keys.
This starts a global singleton Tracker which can be accessed anywhere via the Tracker.Tracker.Instance.{{ method }} chain. Once this is run everything should be in place for asynchronous event tracking.
Example of tracking structured events:
Tracking unstructured events
Use Track(SelfDescribing)
to track a custom event which consists of a name and an unstructured set of properties
Example event json to track:
The event name will be reflected in the event_name column in redshift and the data field above will be reflected in the ue_data
JSON column.
Custom Contexts
Custom contexts can be used to augment any standard event type, including unstructured events, with additional data. Each custom context follows the same structure as unstructured event. Even if only one custom context is being attached to an event, it still needs to be wrapped in an array.
Example:
Contexts will be loaded to separate columns in Redshift table as JSON string. You should specify a name ('experiment' in the above examples), and make sure columns with ctx_ prefix ('ctx_experiment') exist in Redshift table.
For more information refer to https://github.com/snowplow/snowplow/wiki/.net-tracker.