---
updatedAt: 2026-06-25T09:17:27.000Z
agentTools:
  projectIndex: https://personalization.developer.dotdigital.com/llms.txt
---

# Install the tracking script

> 📘 Joint customers
>
> For joint customers of Dotdigital Marketing and Personalization, the Personalization script can be deployed to your site through the Dotdigital Tag.
>
> Learn more in <Anchor label="Add the Dotdigital Tag to your website" target="_blank" href="https://support.dotdigital.com/en/articles/9298184-add-the-dotdigital-tag-to-your-website">Add the Dotdigital Tag to your website</Anchor> \[Marketing Help Centre].

The Personalization tracking script must be added to all pages of your website or app to enable us to track user activity and provide the [JavaScript API](https://personalization.developer.dotdigital.com/reference/js-overview) for your use.

Add the following `script` tag to all pages of your website or app in either the `head` or `body` elements. The URL for the tracking script is personalized, so you must include your custom domain and account ID in the URL for the account you are recording data for.

`<script async src="`*Your loader script domain`/`Your account ID*`.js" />`

You need to replace:

* `Your loader script domain` with the correct domain. To find this, in *Personalization*, select the **Account** menu icon, then go to **Settings > System configuration > Custom domains** and copy the **Loader Script Domain** value.
* `Your account ID` with your account ID. To find your account ID, in *Personalization*, select the **Account** menu icon then copy the **Account ID** value.

# Script deployment options

The tracking script can be added to pages by modifying their source, typically the header or footer template that generates the pages. This is the method we advise you to use, as some browsers can block scripts deployed through tag managers.

If necessary however, you can use a tag manager to deploy the script to your site.

Instructions differ for the various tag managers you could choose, but we provide details for:

* [Google Tag Manager](https://developer.freshrelevance.com/docs/install-with-google-tag-manager)
* [Tealium Tag Manager](https://developer.freshrelevance.com/docs/install-with-tealium-tag-manager)
* [Adobe Tag Manager](https://developer.freshrelevance.com/docs/install-with-adobe-tag-manager)

## JavaScript frameworks

The tracking script doesn't require a JavaScript framework and works on any reasonably modern browser. However, if we’re customizing the script to collect data from your website, this is easier if we can use a JavaScript framework.

<Callout icon="🚧" theme="warn">
  Depending on your site and the amount of data we need to capture, there may be additional charges if we cannot use a framework for the data capture.
</Callout>

Supported JavaScript frameworks are:

* jQuery
* Prototype
* MooTools

If you don't already have one of these frameworks on your site, it's easy to install [jQuery](https://jquery.com/). You should choose a CDN-hosted version, as it's usually already in the browser cache, increasing page load performance.

> Learn more in this [third-party jQuery guidance article](https://webdesignledger.com/9-jquery-mistakes-you-shouldnt-commit/).

> 📘 Single page applications
>
> If your website is built as a single-page application, you can ask your site developers to add some JavaScript API calls to inform Personalization of important events and updates using our [JavaScript API](https://personalization.developer.dotdigital.com/reference/js-overview).

***

# Site performance

We’re very conscious of the importance of performance and have optimized our script to reflect this. The script has been minified, meaning it’s stripped of all unnecessary characters, such as spaces, to decrease the size, and is served from a content delivery network (CDN) for maximum speed.

The script also uses both the `async` and `defer` attributes, which means it isn’t loaded until after the page has finished rendering. This is so it doesn’t block the loading of any other elements and so shouldn’t affect the speed at which the rest of the page is displayed.

***

# Underlying technology

Our script scrapes data from your site pages using JavaScript, either to extract it from existing JavaScript variables or objects, or by extracting information from the markup on the page. This is then reported back to Personalization using WebSockets.

<Callout icon="📘" theme="info">
  A hidden iframe is used for those browsers that don’t support WebSockets.
</Callout>

All information is transmitted over the same protocol, for example, `http` or `https`, as the page the customer is on.

The script also inserts your chosen SmartBlocks and personalized content into your site if you are using [Client-side Personalization](https://personalization.developer.dotdigital.com/docs/clientside-personalization).

# Sub pages

* [Install with Google Tag Manager](https://personalization.developer.dotdigital.com/docs/install-with-google-tag-manager.md)
* [Install with Tealium Tag Manager](https://personalization.developer.dotdigital.com/docs/install-with-tealium-tag-manager.md)
* [Install with Adobe Tag Manager](https://personalization.developer.dotdigital.com/docs/install-with-adobe-tag-manager.md)

# Sibling pages

* [Dotdigital Personalization system overview](https://personalization.developer.dotdigital.com/docs/fresh-relevance-system-overview.md)
* [Key concepts](https://personalization.developer.dotdigital.com/docs/key-concepts.md)
* [Test your website integration](https://personalization.developer.dotdigital.com/docs/test-your-website-integration.md)
* [Ignore development and test environments](https://personalization.developer.dotdigital.com/docs/ignoring-development-and-test.md)
* [Create and edit API access tokens](https://personalization.developer.dotdigital.com/docs/create-and-edit-api-access-tokens.md)
* [Additional data capture](https://personalization.developer.dotdigital.com/docs/additional-data-capture.md)

# What’s Next

* [Test your website integration](https://personalization.developer.dotdigital.com/docs/test-your-website-integration.md)