From the Heap tag loading the Contentsquare tag to CSQ Experience Platform
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.
Migration steps
Section titled Migration stepsContentsquare sets up your Experience Platform project and supports you through the rest of the migration.
Update your cookie allowlist
Section titled Update your cookie allowlistIf your IT policy restricts the cookies stored in visitors' browsers, allow the following cookies.
| Name | Duration | Description |
|---|---|---|
_cs_s_ctx | 30 minutes | Stores the session context data |
_cs_i | 3 days | Stores the encryption result of the user identity string |
_cs_ep | 13 months | Stores the visit-level custom properties as a JSON object |
_hjHasCachedUserAttributes | Session length | Specifies whether the data in the _hjUserAttributes local storage item is up to date |
See Cookies for the full list.
Update your CSP allowlist
Section titled Update your CSP allowlistIf your IT policy enforces a Content Security Policy (CSP), allow the following directives. Compare them with your existing policy.
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.comContent-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.comSee Content Security Policy for what each directive allows.
Contentsquare upgrades your project
Section titled Contentsquare upgrades your projectAt 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
Section titled Replace the Heap tagRight after Contentsquare upgrades your project:
- Remove the Heap tag installation snippet from your website templates or tag management system.
- Install the Contentsquare tag with the tag URL that Contentsquare provided. Use the method you prefer: using agents, a tag management system such as Google Tag Manager or Adobe Tags, or an HTML snippet.
Checklist
Section titled ChecklistUse 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 ↗.