Configure external system to work with the Sitefinity tracking cookie

Overview

Tracking consent user choice is saved in a cookie named sf-tracking-consent on the client’s browser. The cookie is set to true when the user consents to tracking their behavior, and to false when the user declines. This cookie is used by both Sitefinity CMS and Sitefinity Insight.

When integrating a third-party content tracking solution, you must ensure that the third-party solution handles this cookie and sets it to reflect the user consent correctly. That is, your third-party solution must turn off itself when the cookie is set to false.

In this article, you learn how to configure the external system to be in sync with the state of the sf-tracking-consent cookie.

Code sample

This code sample demonstrates to use the built-in Sitefinity consent tracking together with a third-party system.

You wrap the call to the external JavaScript code with custom code in the following way:

Increase your Sitefinity skills by signing up for our free trainings. Get Sitefinity-certified at Progress Education Community to boost your credentials.

Web Security for Sitefinity Administrators

The free standalone Web Security lesson teaches administrators how to protect your websites and Sitefinity instance from external threats. Learn to configure HTTPS, SSL, allow lists for trusted sites, and cookie security, among others.

Foundations of Sitefinity ASP.NET Core Development

The free on-demand video course teaches developers how to use Sitefinity .NET Core and leverage its decoupled architecture and new way of coding against the platform.

Was this article helpful?