Executing a request

Version: 9.1

All requests are executed asynchronously by the ISitecoreUTSession interface instance. The Universal Tracker SDK contains the corresponding class, but it should not be instantiated directly.

ISitecoreUTSession provides methods that process the appropriate events objects. For example:

RequestResponse
UTResponse response = await session.ReadItemAsync(request);  

If you cannot use the async keyword with your method, use the Task.WaitAll() method instead:

RequestResponse
var trackEventTask = session.TrackEventAsync(request);
Task.WaitAll(trackEventTask);
UTResponse response = trackEventTask.Result;

To track different types of events, use the following session methods:

  • TrackEventAsync

  • TrackGoalAsync

  • TrackCampaignEventAsync

  • TrackDownloadEventAsync

  • TrackPageViewEventAsync

  • TrackSearchEventAsync

  • TrackOutcomeEventAsync

  • TrackLocationEventAsync

  • TrackErrorEventAsync

  • TrackInteractionAsync

Do you have some feedback for us?

If you have suggestions for improving this article,