EvntalySDK 1.0.5

dotnet add package EvntalySDK --version 1.0.5
                    
NuGet\Install-Package EvntalySDK -Version 1.0.5
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="EvntalySDK" Version="1.0.5" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="EvntalySDK" Version="1.0.5" />
                    
Directory.Packages.props
<PackageReference Include="EvntalySDK" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add EvntalySDK --version 1.0.5
                    
#r "nuget: EvntalySDK, 1.0.5"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package EvntalySDK@1.0.5
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=EvntalySDK&version=1.0.5
                    
Install as a Cake Addin
#tool nuget:?package=EvntalySDK&version=1.0.5
                    
Install as a Cake Tool

evntaly-csharp

EvntalySDK is a .NET client for interacting with the Evntaly event tracking platform. It provides methods to initialize tracking, log events, identify users, and check API usage limits.

Features

  • Initialize the SDK with a developer secret and project token.
  • Track events with metadata and tags.
  • Identify users for personalization and analytics.
  • Enable or disable tracking globally.

Installation

To install the SDK using NuGet:

 dotnet add package EvntalySDK

Usage

Initialization

Initialize the SDK with your developer secret and project token:

using System;
using EvntalySDK;

class Program
{
    static void Main()
    {
        var evntaly = new SDK("YOUR_DEVELOPER_SECRET", "YOUR_PROJECT_TOKEN");
        Console.WriteLine("Evntaly SDK initialized!");
    }
}

Tracking Events

To track an event:

var eventData = new Event
{
    Title = "Payment Received",
    Description = "User completed a purchase",
    Message = "Order #12345",
    Data = new EventData
    {
        UserId = "67890",
        Timestamp = "2025-01-08T09:30:00Z",
        Referrer = "social_media",
        EmailVerified = true,
    },
    Tags = new string[] {"purchase", "payment", "ecommerce"},
    Notify = true,
    Icon = "💰",
    ApplyRuleOnly = false,
    User = new EventUser { ID = "12345" },
    Type = "Transaction",
    SessionID = "20750ebc-dabf-4fd4-9498-443bf30d6095_bsd",
    Feature = "Checkout",
    Topic = "@Sales"
};

await evntaly.TrackEventAsync(eventData);

Identifying Users

To identify a user:

var userData = new UserProfile
{
    ID = "12345",
    Email = "user@example.com",
    FullName = "John Doe",
    Organization = "ExampleCorp",
    Data = new UserProfileData
    {
        Id = "JohnD",
        Email = "user@example.com",
        Location = "USA",
        Salary = 75000,
        Timezone = "America/New_York",
        SubscriptionPlan = "Premium",
        LastLogin = "2025-02-24T15:30:00Z"
    }
};

await evntaly.IdentifyUserAsync(userData);

Enabling/Disabling Tracking

Control event tracking globally:

evntaly.DisableTracking();  // Disables tracking
evntaly.EnableTracking();   // Enables tracking

License

This project is licensed under the MIT License.


Note: Replace "YOUR_DEVELOPER_SECRET" and "YOUR_PROJECT_TOKEN" with actual credentials.

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net9.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.5 87 3/15/2025
1.0.4 118 2/25/2025
1.0.3 112 2/25/2025
1.0.2 107 2/25/2025
1.0.1 115 2/25/2025
1.0.0 115 2/25/2025