Cookie Consent

Sherpa users analytics tools like Google Analytics and Amplitude to provide usage reports and improve the product. Without these tools, sherpa is not able to understand how solutions are being used, how to improve them and provide actionable insights to enterprise partners. These tools identify unique users applying different techniques, including storing cookies and other information on user’s device.

The consent feature allows you to control how these tools perform on sherpa’s applications.

Default Behaviour

When you use the embedded elements, sherpa’s analytics tools automatically use cookies and other technologies to track users.

Changing Default Behaviour

You can change the default state by getting embedded elements to conform to your users’s current consent preferences when you mount the embedded elements.

For example, if your user’s preference is to only allow essential cookies, you can pass those preference to sherpa and our applications will do the same.

index.html
const elementConfig = {
  ...,
  cookieConsentPreferences: ["functionality_storage", "security_storage"]
}

$sherpa.V2.createElement("trip", elementConfig).mount("#sherpa-trip-element")

Updating Consent

If your user updates the consent preferences during their session, you can reload the sherpa element with appropriate settings or use an update method to pass the latest preferences. When using an update method, the events that happened prior to the update will not be re-sent.

When your users turn off the “analytics_storage” preference, then our Google Analytics and Amplitude opt-in for a cookie-less reporting mode.

index.html
$sherpa.V2.setCookiePreferences({
  consentsGiven: [
    'ad_storage',
    'analytics_storage',
    'functionality_storage',
    'personalization_storage',
    'security_storage',
  ],
});

In specifying a cookie policy, Sherpa uses cookie consent categories as defined by Google Tag Manager.

Consent Type NameDescription
ad_storageEnables storage (such as cookies) related to advertising
analytics_storageEnables storage (such as cookies) related to analytics e.g. visit duration
functionality_storageEnables storage that supports the functionality of the website or app e.g. language settings
personalization_storageEnables storage related to personalization e.g. video recommendations
security_storageEnables storage related to security such as authentication functionality, fraud prevention, and other user protection

The following example would set a policy that allows any cookies on Embedded Elements or the Application Widget:

index.html
  const elementConfig = {
  ...,
  cookieConsentPreferences:  ["ad_storage", "analytics_storage", "functionality_storage", "personalization_storage", "security_storage"]
}

$sherpa.V2.createElement("trip", elementConfig).mount("#sherpa-trip-element")

The following example would set a minimal policy that allows only those cookies needed for the sherpa° Embedded Elements or Application Widget to function:

index.html
const elementConfig = {
  ...,
  cookieConsentPreferences: ["functionality_storage", "security_storage"]
}

$sherpa.V2.createElement("trip", elementConfig).mount("#sherpa-trip-element")

The functionality_storage and security_storage cookie consent types must always be included in any policy. If they are left out, the resultant policy will still allow those cookie types.