To initialize the C# SDK in your application, create a new Analytics instance:
using Hightouch.Events;
using Hightouch.Events.Serialization;
var configuration = new Configuration("WRITE_KEY",
apiHost: "https://us-east-1.hightouch-events.com",
flushAt: 1);
var analytics = new Analytics(configuration);
The C# SDK buffers events locally, either in-memory or on disk, before sending them to Hightouch's servers.
This minimizes the number of requests made by the SDK and makes the tracking non-blocking.
To force the local buffer to be sent to Hightouch immediately call the Flush()
method. Flush() should be called when shutting down your app to make sure no events are lost.
Example usage:
analytics.Flush()
Ready to get started?
Jump right in or a book a demo. Your first destination is always free.