PINGWorks.SitecoreExperienceEdge.EventsSDK
1.3.0
dotnet add package PINGWorks.SitecoreExperienceEdge.EventsSDK --version 1.3.0
NuGet\Install-Package PINGWorks.SitecoreExperienceEdge.EventsSDK -Version 1.3.0
<PackageReference Include="PINGWorks.SitecoreExperienceEdge.EventsSDK" Version="1.3.0" />
<PackageVersion Include="PINGWorks.SitecoreExperienceEdge.EventsSDK" Version="1.3.0" />
<PackageReference Include="PINGWorks.SitecoreExperienceEdge.EventsSDK" />
paket add PINGWorks.SitecoreExperienceEdge.EventsSDK --version 1.3.0
#r "nuget: PINGWorks.SitecoreExperienceEdge.EventsSDK, 1.3.0"
#:package PINGWorks.SitecoreExperienceEdge.EventsSDK@1.3.0
#addin nuget:?package=PINGWorks.SitecoreExperienceEdge.EventsSDK&version=1.3.0
#tool nuget:?package=PINGWorks.SitecoreExperienceEdge.EventsSDK&version=1.3.0
PINGWorks.SitecoreExperienceEdge.EventsSDK
This is a .NET SDK for working with Sitecore's Experience Edge Events API.<br /> More information about Sitecore's API is at CloudSDK Events Doc (official)
Features
- Typed, DI-friendly services for interacting with Sitecore EE Events API
- Async-first APIs with
CancellationTokensupport - NetStandard 2.1 for wide compatibility
Getting started
Prerequisites
To work with the SDK you will require an Experience Edge Context ID, which can be found in the SitecoreAI Deployment Portal in the Developer Settings page for your environment.
Install
From your project directory:
dotnet add package PINGWorks.SitecoreExperienceEdge.EventsSDK
AppSettings
Properties are available to configure the SDK through configuration binding. The snippet below shows all options along with their default values. You do not need to include values where you wish to use the defaults.
{
/* The base URL of the Events API */
"ServiceEndpoint": "https://edge-platform.sitecorecloud.io/v1/events/v1.2/",
/* Required. This is the Context ID of your SitecoreAI environment.
Put this in your User Secrets file */
"EdgeContextId": "6********************w",
/* The name of the site in the SitecoreAI Deploy portal.
Get this from SitecoreAI Deploy > Projects > Environments > Developer Settings.
Sitecore Deploy -> Projects -> Environments -> Site.Name */
"SiteName": "my_website"
}
We recommend the use of Visual Studio's User Secrets feature to store sensitive information such as EdgeContextId during development.
Register services
Register the SDK in Program.cs, e.g. when using the minimal hosting model:
// Program.cs
var builder = WebApplication.CreateBuilder(args);
// Register SDK services - set options through binding or manually
builder.Services.AddSitecoreEEEventsSdk( opt => config.GetSection( "mySettings" ).Bind( opt ) );
HttpClient defaults. This call (via
AddSitecoreEECommon) appliesAddStandardResilienceHandler()and a DEBUG-only console request/response logger to every HttpClient in your container — not just the SDK's own. See the PINGWorks.SitecoreExperienceEdge.Common README for how to customize the resilience options per-client.
Available services
Injectable interface ISitecoreEventsSdk
| Method | Description |
|---|---|
| GetAnalyticsContextIds( HttpContext ) | Create new browser and guest identity tokens in the Sitecore Events API. |
| PageView( PageViewEventRequest, string, string ) | Record a page view event. |
| Identity( IdentityEventRequest, string, string ) | Associate an identity with the current visitor. |
| Form( FormEventRequest, string, string ) | Record form events. |
| Custom( CustomEventRequest, string, string ) | Send a custom event. |
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. 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. |
| .NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.1 is compatible. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.1
- Microsoft.AspNetCore.Http.Abstractions (>= 2.3.9)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.5)
- Microsoft.Extensions.Http (>= 10.0.5)
- Microsoft.Extensions.Http.Resilience (>= 10.4.0)
- PINGWorks.SitecoreExperienceEdge.Common (>= 1.3.0)
- System.Net.Http.Json (>= 10.0.5)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
v1.3.0
✔️ Add CancellationToken support
v1.2.0
Updated dependency on Common library to 1.2.1
v1.1.0
Initial public release