RudderStack is a customer data pipeline tool for collecting, routing and processing data from your websites, apps, cloud tools, and data warehouse.
More information on RudderStack can be found here.
Released under the MIT License.
2.0.0
Install RudderAnalytics
using NuGet
Install-Package RudderAnalytics -Version 2.0.0
The Gzip feature is enabled by default in the .NET SDK from version 2.0.0
. Refer to Gzipping requests section for more details.
using RudderStack;
RudderAnalytics.Initialize(
WRITE_KEY,
new RudderConfig(dataPlaneUrl: DATA_PLANE_URL)
);
The Gzip feature is enabled by default in the .NET SDK from version
2.0.0
.
The .NET SDK automatically gzips requests. However, you can disable this by setting the gzip
parameter of RudderConfig
to false
while initializing the SDK, as shown:
using RudderStack;
RudderAnalytics.Initialize(
WRITE_KEY,
new RudderConfig(dataPlaneUrl: DATA_PLANE_URL, gzip: false)
);
Gzip requires rudder-server v1.4 or higher. Otherwise, your events might fail.
RudderAnalytics.Client.Track(
"userId",
"CTA Clicked",
new Dictionary<string, object> { {"plan", "premium"}, }
);
- Make a copy of sample.env in the root folder and replace DUPLICATE_WRITE_KEY and DUPLICATE_DATA_PLANE with the actual values from your dashboard.
- Husky.Net is used to run pre-commit hooks, which would format all the C# code in the staging section. In order to run these hooks you need to setup Husky.Net using the instructions here
If you come across any issues while configuring or using this integration, please feel free to start a conversation on our Slack channel. We will be happy to help you.