Security, Privacy, AI and CSR information for all Piano products now lives in one place. Explore our Compliance Center.
Audience
English French
English French

User tracking and privacy

As part of building user profiles, Piano Insight does not collect any personally identifiable information, follows all applicable data collection laws and honors industry standards. Please also see our privacy policy.

Disclaimer

The information below is just information about the type of cookies and local storage tokens that are generated. Please do not consider them as part of cx.js's public interface. There can be changes to the operation and format of these at any time without notice.

Identifiers

In order to be able to reliably track and count the number of unique users visiting your site and build user profiles, Piano makes use of cookies and local storage as ways to store information. All cookies and local storage used by Insight only store non-personally identifable information, such ad random identifiers or carrying some state, like timestamps or, for the case of segment matching, segment IDs the user identifier is related to.

A first-party site-specific cookie named cX_P is set on the domain of the site and is used to identify the user on your site across sessions. The session is tracked with _cX_S in session storage. The identifiers can be accessed both on the client side or the server side. On the client side, cX_P can be read out via the cX.getUserId() function call. On the server side, the cookies can be read via standard mechanisms such as, e.g., cX.getCookie("cX_P").

In addition, and if the client supports and allows it, two third-party cookies are set to enable the building of session and cross-session user profiles that span all sites in the Piano network. These are named "gcks" and "gckp" respectively.

A _cookie_test cookie can in some rare cases be seen. It is only set briefly, and then immediately deleted. This cookie holds a random value and is just used to find the top-level domain of the site. For example, we use this cookie to find out that "http://ibm.com " is the top-level domain of "http://www.ibm.com " and that "http://bbc.co.uk " is the top-level domain of "http://www.bbc.co.uk ".

Additional service-specific cookies

The above cookies are always set when using Piano Insight services. In addition, when using particular services or particular features of those services, some additional cookies can be set:

When using DMP segments for ad targeting with third-party systems, the current segment identifiers that the current user is a member of is cached on the client using one local storage token:

  • _cX_segmentInfo


Name

Type

Lifetime

Object

Domain

cX_S

Cookie

Deprecated. Removed automatically on page load, replaced by _cX_S in SessionStorage.

Site specific user session – single session

First

cX_P

Cookie

13 months, renewed on each visit

Site specific user session – across sessions

First

cX_G

Cookie

13 months, renewed on each visit

Global ID mapping different ids together into one ID.

First

gcks

Cookie

Session

For building session information across all sites in the Piano network

Third

gckp

Cookie

365 days

For building user profile information across all sites in the Piano network

Third

_cX_cons

LocalStorage

No expiry

For recording consent.

First

_cX_segmentInfo

LocalStorage

13 months

When using DMP segments for ad targeting with third-party systems - the list of segment identifiers

First

_cookie_test

Cookie

Temporary

Set briefly to check that cookies work, then deleted.

First

_cX_S

SessionStorage

Session

Corresponding to the first party cookie "cX_S"

First

_cX_P

LocalStorage

Deprecated. Removed automatically on page load.

Corresponding to the first party cookie "cX_P"

First

_cX_atfr

LocalStorage

-

Stores "after-the-fact" information for a page view, to be sent on the next page view. Contains information on window sizes, widget visibility, user's active time,etc.

First

_cX_lastP1Time

LocalStorage

Deprecated. Removed automatically on page load since cx.js 3.5.0.

Was used to schedule the global ID request every 7 days.

First

_cX_SA

SessionStorage

Temporary

For session annotations: About Session Annotations

First

_cX_GAttempt

SessionStorage

Session

Records that the global ID was requested in this tab, so it is requested at most once per tab.

First

_cX_lst

LocalStorage

Deprecated. Removed automatically on page load.

Records a third-party token for cross-site tracking.

Third

_cX_partner

SessionStorage

Temporary

Keeps a log of how many cookie syncs were executed for each partner, in the form of <partner>=<# of hits> for each partner.

First

_cX_expires

LocalStorage

Deprecated. Moved to _ls_ttl and removed on page load.

Intended to expire local storage. Local Storage does not expire by default. Local storage tokens match cookie expiration times.

First

_ls_ttl

LocalStorage

Removed when empty

Stores expiry times for the other cx.js local storage items.

First

Opting Out

For GDPR purposes, please consider using our solution for cx.js: GDPR and cx.js.

Creating Opt-out page

For the users to be able to opt-out from being tracked by Piano Insight on your website, there should be an opt-out page created on your site.

The page should have an opt-out button (or a link), clicking on which will write "cx_optOut=true" in the local storage. The sample code below is a bare-minimum implementation of an opt-out (and opt-in) page:

<html>
  <head>
  </head>
  <body>
    <script type="text/javascript">
      function hasLocalStorage() {
        try { return typeof window.localStorage === 'object' && typeof window.localStorage.getItem === 'function'; } catch (e) { return false; }
      }
      function getOptOutStatus(key) {
        var status = false;
        if (hasLocalStorage()) {
          var optedOut = window.localStorage.getItem(key);
          if (optedOut && optedOut === 'true') {
            status = true;
          }
        }
        return status;
      }
      var currentStatusLabel = "Your current status is: ";
      var currentStatusOpted = "Opted ";
      var currentStatusOptedIn = "in";
      var currentStatusOptedOut = "out";
      var currentStatusOpt = "Opt ";
      var currentStatusOptIn = "in";
      var currentStatusOptOut = "out";
      var cxOptOutKey = 'cx_optOut';
      // Read the opt-out status from the local storage
      var optOutStatus = getOptOutStatus(cxOptOutKey);
      // Update UI to reflect current state
      document.write(currentStatusLabel + currentStatusOpted + (optOutStatus ? currentStatusOptedOut : currentStatusOptedIn) + '<br />\n');
      document.write('<button onclick="onButtonClick();">' + currentStatusOpt + (optOutStatus ? currentStatusOptIn : currentStatusOptOut) + '<br /></button>\n');
      function onButtonClick() {
        if (hasLocalStorage()) {
          if (!optOutStatus)
            localStorage.setItem(cxOptOutKey, 'true');
          else
            localStorage.removeItem(cxOptOutKey);
        }
        location.reload();
      }
    </script>
  </body>
</html>


Modification to the Insight script

The Insight script implementation on your site will need slight modifications for the opt-out status in the local storage to take effect.

Asynchronous version
<script type="text/javascript">
  function hasLocalStorage() {
    try { return typeof window.localStorage === 'object' && typeof window.localStorage.getItem === 'function'; } catch (e) { return false; }
  }
  function cx_getOptOutStatus(key) {
    var status = false;
    if (hasLocalStorage()) {
      var optedOut = window.localStorage.getItem(key);
      if (optedOut && optedOut === 'true') {
        status = true;
      }
    }
    return status;
  }

  var cX = cX || { options : { consent: cx_getOptOutStatus('cx_optOut') } };
  cX.callQueue = cX.callQueue || [];
  cX.callQueue.push(["setSiteId", '<siteId>']);
  cX.callQueue.push(["sendPageViewEvent"]);
</script>
<script type="text/javascript">
  (function(d,s,e,t){e=d.createElement(s);e.type='text/java'+s;e.async='async';
  e.src='http'+('https:'===location.protocol?'s://s':'://')+'cdn.cxense.com/cx.js';
  t=d.getElementsByTagName(s)[0];t.parentNode.insertBefore(e,t);})(document,'script');
</script>
Synchronous version
<script src="https://cdn.cxense.com/cx.js"></script>
<script type="text/javascript">
  function hasLocalStorage() {
    try { return typeof window.localStorage === 'object' && typeof window.localStorage.getItem === 'function'; } catch (e) { return false; }
  }
  function cx_getOptOutStatus(key) {
    var status = false;
    if (hasLocalStorage()) {
      var optedOut = window.localStorage.getItem(key);
      if (optedOut && optedOut === 'true') {
        status = true;
      }
    }
    return status;
  }

  if (cx_getOptOutStatus('cx_optOut'))) { cX.requireConsent(); cX.clearIds(); }
  cX.setSiteId('<siteId>');
  cX.sendPageViewEvent();
</script>


Last updated: