Usage Insights client-side storage cookies

  • Release version: Zurich
  • Updated July 31, 2025
  • 2 minutes to read
  • Summarize
    Summarized using AI
    This content was generated using new OpenAI-powered functionality. Results are provided on an as is basis and are not guaranteed to be accurate or complete.

    Summary of Usage Insights client-side storage cookies

    Usage Insights tracks client-side user activity in ServiceNow using the SNAnalytics JavaScript SDK embedded in Platform Analytics, Core UI, and Service Portal. This SDK leverages both session storage and local storage in the browser to collect and manage analytics data essential for tracking user engagement and behavior.

    Show full answer Show less

    Key Features

    • Storage Key Structure: All stored keys follow the format sn:{APIKEY}:{KEY NAME}, where each portal has a unique API key.
    • Session Storage: Used for temporary data during the lifespan of a browser tab. Key session storage elements include:
      • srt: Timestamp of the last successful server communication.
      • data: Queue of temporary analytics data points awaiting backend transmission.
      • page: Name of the current page tracked.
      • tab: Unique identifier for the current browser tab.
    • Local Storage: Maintains persistent data such as tracking consent, hashed user identification, and browser identifiers. Local storage keys include:
      • browser: Unique identifier for the browser instance.
      • client: Server-assigned ID linked to the browser.
      • user: Hashed user ID provided by the customer.
      • consent: Boolean indicating user tracking consent.
      • config: Stores non-sensitive app configuration to maintain consistent behavior across sessions, persisting even after logout.
    • Data Management: Local storage data can be cleared by users via browser settings, which removes all stored cookies and site data.
    • Data Storage and Security: Analytics data is encrypted at rest and stored regionally in ServiceNow’s multitenant repositories (AMS in Canada, EMEA in Germany, APAC in Japan). Data is anonymized before storage and retained for two years before deletion. Backup storage is regionally managed starting from the Zurich release.

    Practical Implications for ServiceNow Customers

    This client-side storage strategy enables reliable tracking of user interactions while respecting user consent preferences. Customers can expect transient session data to be cleared automatically when tabs close, while persistent consent and user identifiers remain until manually cleared or consent is revoked. The structure ensures data is securely stored and managed in compliance with regional data policies, supporting analytics accuracy and privacy.

    To track client-side user activity, Usage Insights uses the SNAnalytics JavaScript SDK that is embedded in Platform Analytics, Core UI, and the Service Portal.

    The SNAnalytics SDK uses a combination of session storage and local storage variables to track the information required to facilitate the analytics tracking.

    For more information on session storage and local storage, refer to the JavaScript.Info documentation.

    For more information on SNAnalytics SDK, see SNAnalytics - Client  and SNAnalytics – in the Developer community.

    Key structure

    All locally stored keys are stored using the following structure: sn:{API_KEY}:{KEY NAME}

    Each tracked portal has a unique API_KEY that is stored on the instance. For example, for the portal with an API key abcd and a key name tab, the local key value would be: sn:abc:tab

    Session storage

    Session storage is used to maintain the flow of information between web page refreshes and user navigations. Information in session storage is transient and kept available only during the lifespan of the current tab. When a tab is closed, the session storage information is removed.

    The table lists the keys and values stored on session storage.
    Key Description
    srt Server Response Time. The last time SNAnalytics successfully communicated with the Usage Insights server.
    data Queue of temporary stored analytics data points, which is periodically flushed to the backend.
    page The name of the current page, automatically captured by the Usage Insights server.
    tab Randomly generated unique identifier for the current tab.

    Local storage

    Local storage is used to maintain tracking consent information, hashed identification of the user (which is cleared when consent is revoked), and randomly generated identifiers for the browser. Local storage variables are persistent locally and are deleted when you clear your browsing data.

    The table lists the keys and values stored on local storage.
    Key Description
    browser Randomly generated unique identifier for the current browser.
    client The server assigned ID mapped to the browser key value.
    user Hashed user id, supplied by the customer.
    consent A Boolean (yes/no) value that indicates whether the user consents to be tracked.
    config A persistent key that remains in local storage after you log out of on an instance. Stores non-sensitive application-level configuration settings used to support consistent app behavior across sessions.

    Deleting local storage

    To delete local storage variables, you must clear the browsing data from your browser. For example, in the Chrome browser, select History > Show Full History > Clear browsing data. In the Clear browsing data window, select Cookies and other site data and then select Clear data.
    Settings to clear local storage cookies.

    Data storage

    Data is encrypted at rest. It’s stored in a central ServiceNow® multitenant repository closest to you, in either AMS (Canada), EMEA (Germany), or APAC (Japan).

    Data is anonymized before it’s sent to storage, and deleted at the database level after a retention period of two years.

    For the Zurich release and onwards, backups are stored regionally on the new architecture only and don’t use the additional backup copy stored in a central repository in Canada.