---
title: From the Heap tag loading the Contentsquare tag to CSQ Experience Platform - Web
description: Migrate a website where the Heap tag loads the Contentsquare tag to CSQ Experience Platform, coordinating the switch with Contentsquare
source_url:
  html: https://docs.contentsquare.com/en/web/migrate-to-csq-xp/from-heap-tag-loading-contentsquare/
  md: https://docs.contentsquare.com/en/web/migrate-to-csq-xp/from-heap-tag-loading-contentsquare/index.md
---

> ## Documentation index
> Fetch the complete documentation index at: https://docs.contentsquare.com/llms.txt
> Use this file to discover all available pages before exploring further.

Migrate a website where the Heap tag loads the Contentsquare tag to CSQ Experience Platform, coordinating the switch with Contentsquare.

Not sure this guide applies? [Identify your current tag setup](https://docs.contentsquare.com/en/web/migrate-to-csq-xp/#identify-your-current-tag-setup).

> **Coordinate the switch with Contentsquare**
>
> Contentsquare upgrades the Contentsquare tag already running on your website, and you must remove the Heap tag **right after**. Agree on a date and time with your Contentsquare team.
>
> * If you remove the Heap tag before Contentsquare upgrades the tag, the Heap API calls implemented on your website start failing.
> * If you keep the Heap tag after Contentsquare upgrades the tag, Experience Analytics extension data is not collected until you remove it.

## Migration steps

Contentsquare sets up your Experience Platform project and supports you through the rest of the migration.

### Update your cookie allowlist

If your IT policy restricts the cookies stored in visitors' browsers, allow the following cookies.

| Name | Duration | Description |
| - | - | - |
| [`_cs_s_ctx`](https://docs.contentsquare.com/en/web/cookies/#_cs_s_ctx) | 30 minutes | Stores the session context data |
| [`_cs_i`](https://docs.contentsquare.com/en/web/cookies/#_cs_i) | 3 days | Stores the encryption result of the user identity string |
| [`_cs_ep`](https://docs.contentsquare.com/en/web/cookies/#_cs_ep) | 13 months | Stores the visit-level custom properties as a JSON object |
| [`_hjHasCachedUserAttributes`](https://docs.contentsquare.com/en/web/cookies/#_hjhascacheduserattributes) | Session length | Specifies whether the data in the `_hjUserAttributes` local storage item is up to date |

See [Cookies](https://docs.contentsquare.com/en/web/cookies/) for the full list.

### Update your CSP allowlist

If your IT policy enforces a Content Security Policy (CSP), allow the following directives. Compare them with your existing policy.

* US

  ```http
  Content-Security-Policy: script-src 'unsafe-inline' *.contentsquare.net app.contentsquare.com 'unsafe-eval' https://heapanalytics.com; img-src https://heapanalytics.com; connect-src *.contentsquare.net *.contentsquare.com https://heapanalytics.com; style-src app.contentsquare.com https://heapanalytics.com; font-src https://heapanalytics.com
  ```

* EU

  ```http
  Content-Security-Policy: script-src 'unsafe-inline' *.contentsquare.net app.contentsquare.com 'unsafe-eval' https://heapanalytics.com https://eu.heapanalytics.com; img-src https://heapanalytics.com https://eu.heapanalytics.com; connect-src *.contentsquare.net *.contentsquare.com https://heapanalytics.com https://eu.heapanalytics.com; style-src app.contentsquare.com https://heapanalytics.com https://eu.heapanalytics.com; font-src https://heapanalytics.com https://eu.heapanalytics.com
  ```

See [Content Security Policy](https://docs.contentsquare.com/en/web/content-security-policy/) for what each directive allows.

### Contentsquare upgrades your project

At the agreed time, Contentsquare creates the Experience Platform project structure, upgrades your Contentsquare tag configuration, and confirms the tag URL for your project.

### Replace the Heap tag

Right after Contentsquare upgrades your project:

1. Remove the Heap tag installation snippet from your website templates or tag management system.
2. [Install the Contentsquare tag](https://docs.contentsquare.com/en/web/) with the tag URL that Contentsquare provided. Use the method you prefer: [using agents](https://docs.contentsquare.com/en/ai-setup/?platform=web), a tag management system such as [Google Tag Manager](https://docs.contentsquare.com/en/web/#google-tag-manager-custom-html) or [Adobe Tags](https://docs.contentsquare.com/en/web/#adobe-tags), or an [HTML snippet](https://docs.contentsquare.com/en/web/#custom-html).

## Checklist

Use this checklist to make sure the migration worked.

The Heap tag no longer loads: `window.heap` is not defined.

The Contentsquare tag loads on all required pages.

Data flows in your Product Analytics environment, and in your Experience Analytics project if you have one.

Data flows in your [Experience Platform project ↗](https://app.contentsquare.com/#/data-feed).

```json
{"@context":"https://schema.org","@type":"TechArticle","headline":"From the Heap tag loading the Contentsquare tag to CSQ Experience Platform","description":"Migrate a website where the Heap tag loads the Contentsquare tag to CSQ Experience Platform, coordinating the switch with Contentsquare","url":"https://docs.contentsquare.com/en/web/migrate-to-csq-xp/from-heap-tag-loading-contentsquare/","inLanguage":"en","dateModified":"2026-12-01T17:52:33+01:00","publisher":{"@type":"Organization","name":"Contentsquare","url":"https://www.contentsquare.com/"},"isPartOf":{"@type":"WebSite","@id":"https://docs.contentsquare.com/#website","name":"Contentsquare Technical Documentation","url":"https://docs.contentsquare.com/"}}
```