.NET

.NET

This library lets you record analytics data from your ASP.NET, C#, F#, and Visual Basic code. Just pop this library into your web server controller code and it will take care of hitting our servers so that we can route your data to an analytics service of your choice.

Getting Started with .NET

Step 1

To start, you must install our client-side library, analytics.js, to your ASP.NET master page. Follow the steps outlined in our analytics.js doc and place your snippet directly in your ASP.NET Site.master. This will allow you to use page calls.

Step 2

Next, you’ll want to install our .net library to start using the identify and track calls. We recommend using NuGet to do this.

Install-Package Analytics

You can also doing this by navigating through Visual Studio: `Toola–>Library Package Manager–>Package Manager Console’

Now you need to initialize the .NET library so that it knows where to send data. Do this with your Source ID, which can be found in your Astronomer UI once you’ve created a server-side source. Then you can use the Analytics singleton in any controller you want: