Cancel tracking on a specific page

Version: 10.4

If you are using the Tracker API to collect information on your website but, for a specific page, you want to cancel tracking, you can mark the page as cancelled so that any changes to the interaction connected to the page are reverted.

To cancel page tracking:

  1. In the Sitecore.Analytics.ITracker.CurrentPage property or the Sitecore.Analytics.Tracking.CurrentInteraction.CurrentPage property, access the Sitecore.Analytics.Tracking.ICurrentPageContext method.

  2. Add the Cancel () method to the current page, for example:

    RequestResponse
    Sitecore.Analytics.Tracker.Current.CurrentPage.Cancel();
    
    Sitecore.Analytics.Tracker.Current.Session.Interaction.CurrentPage.Cancel();

.

Do you have some feedback for us?

If you have suggestions for improving this article,