Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Sitecore/Sitecore.UniversalTracker.MobileSDK
Sitecore UniversalTracker SDK
https://github.com/Sitecore/Sitecore.UniversalTracker.MobileSDK
Last synced: 3 months ago
JSON representation
Sitecore UniversalTracker SDK
- Host: GitHub
- URL: https://github.com/Sitecore/Sitecore.UniversalTracker.MobileSDK
- Owner: Sitecore
- Created: 2018-12-05T09:56:37.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2018-12-05T14:59:06.000Z (almost 6 years ago)
- Last Synced: 2024-04-14T22:18:01.048Z (7 months ago)
- Language: C#
- Homepage:
- Size: 7.1 MB
- Stars: 0
- Watchers: 6
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- Awesome-Sitecore - UniversalTracker SDK - .Net Standard library that provides the interactions and events writing API for client .NET applications that serves as an interface that connects the Universal Tracker service and an application to let users work with native objects rather than with HTTP requests and JSON responses. (Universal Tracker)
README
Sitecore UniversalTracker SDK
========Sitecore Universal Tracker SDK 1.0 is a .Net Standard library that provides the interactions and events writing API for client .NET applications. The Universal Tracker SDK serves as an interface that connects the Universal Tracker service and an application to let users work with native objects rather than with HTTP requests and JSON responses.
Supported events:
* event
* goal
* outcome
* pageview
* campaign
* download
* searchThe library can be used on the following platforms :
* iOS 10 and newer
* Android 4.0 and newer
* Windows Desktop (.NET 4.5)# Downloads
- [NuGet packages](https://www.nuget.org/packages/Sitecore.UniversalTracker.MobileSDK)# Links
- [Documentation](https://doc.sitecore.com/developers/91/sitecore-experience-platform/en/universal-tracker-sdk.html)
- [iOS Sample](https://github.com/Sitecore/Sitecore.UniversalTracker.MobileSDK/tree/master/Sitecore.UniversalTrackerClient/Apps/Demo/UniversalTrackerDemo)# Code Snippet
```csharp
string instanceUrl = "http://my.site.com";
string channelId = "27b4e611-a73d-4a95-b20a-811d295bdf65";
string definitionId = "01f8ffbf-d662-4a87-beee-413307055c48";var defaultInteraction = UTEntitiesBuilder.Interaction()
.ChannelId(channelId)
.Initiator(InteractionInitiator.Contact)
.Contact("jsdemo", "demo")
.Build();using (session = SitecoreUTSessionBuilder.SessionWithHost(instanceUrl)
.DefaultInteraction(defaultInteraction)
.BuildSession()
)
{
var eventRequest = UTRequestBuilder.EventWithDefinitionId(definitionId)
.Build();
var eventResponse = await session.TrackEventAsync(eventRequest);
Console.WriteLine("Track EVENT RESULT: " + eventResponse.StatusCode.ToString());var okAlertController = UIAlertController.Create("Event response code",
eventResponse.StatusCode.ToString(),
UIAlertControllerStyle.Alert);
okAlertController.AddAction(UIAlertAction.Create("OK",
UIAlertActionStyle.Default,
alert => Console.WriteLine("Ok")))PresentViewController(okAlertController, true, null);
}
```