We are pleased to announce the release of the first version of the Snowplow .NET Tracker. The tracker supports synchronous and asynchronous GET and POST requests and has an offline mode which stores unsent events using Message Queueing.
This introductory post will cover the following topics:
Add a using directive to the Snowplow Tracker to your project:
Create an emitter which will asynchronously send HTTP GET requests:
It is also possible to specify the protocol, method, and port that the emitter will use, as well as a bufferSize which determines the minimum number of events to queue before sending them all, and onSuccess and onFailure callbacks to be called depending on whether requests are sent successfully.
Create a subject to hold data about a specific user:
By default, instances of the Emitter class have offline tracking enabled. This means that if the device is offline when an event is sent, that event will be stored in a message queue. When a NetworkAvailabilityChanged event indicates that connectivity has been established, or when another event has been sent successfully, all events in the queue will be resent.