Skip to main content

Add the Dotdigital Tag to your website

Seamlessly integrate Dotdigital scripts with your site.

Laura Russell avatar
Written by Laura Russell
Updated this week

The Dotdigital Tag streamlines the process of connecting your website activity and data to our platforms.

You can use a single implementation of the Dotdigital Tag to track:

  • Website views

  • User identification

  • Products browsed

  • Cart updates

  • Purchase completions

  • Custom events, as defined by you
    Custom signals in Dotdigital are only available on our CXDP package.

You can also use the Tag to enable Dotdigital Chat.

Learn more about Chat.

For joint customers of Dotdigital and Fresh Relevance, you can also use the Dotdigital Tag to make your tracking data available across both platforms.


Set up the Dotdigital Tag

1. Connect your website

  1. In Dotdigital, go to Connect, then select Connect your website.

  2. Enter a name for the connection, and in the Domains field, enter each domain that you want to track on a new line. Don’t include https:// or www..

  3. Select Save.

Tracking subdomains

Subdomains of a specified parent domain are automatically tracked and don't need to be separately specified; a single session can include activity on the parent and sub-domains.

For example, if you add example.com, the tag automatically tracks blog.example.com and shop.example.com.

If you want to track activity for a specific subdomain only, list it without the parent domain.

For example, if you only want to track blog.example.com and not the entire example.com domain, you can list blog.example.com directly.


2. Configure connection settings

Dotdigital Tag connection settings

  1. Set Enable Web behaviour tracking to YES to track events such as page visits and products browsed.

  2. Enable Abandoned cart if you require this feature.
    This feature may require some additional customisation of the script. If you need help to enable abandoned cart for your site, contact Support.

  3. Set Enable Chat to Yes to embed the Chat widget on your site.
    This feature allows you to offer one-to-one customer support through a two-way chat on your site. Learn more in Get started with Chat.

  4. If you want to make tracked data available in Fresh Relevance, set Enable Fresh Relevance to Yes.
    If you’re interested in beginning to use Fresh Relevance functionality, contact your Customer Success representative.

Abandoned cart

Before you start

  • You must have enabled abandoned cart tracking on your website.

  • You must have created and enabled your abandoned cart program to select it here.
    Learn more in Create an abandoned cart program.

  • The settings below apply only if the cartInsight script doesn’t include ProgramID and CartDelay. If those values are present, they take priority, and the abandoned cart settings are ignored.

  1. Expand the Enrol abandoned carts to drop-down menu and select your abandoned cart program.

  2. Expand the Enrol abandoned carts after drop-down menu and select the delay period.
    This is the length of time between the cart being abandoned and the contact being enrolled on the program.

Testing and live delay recommendation

If you choose No delay, we try to enrol the contact as soon as an active cart is received. This can be useful when testing the abandoned cart automation. However, in an active program, we recommend adding a minimum delay of 30 minutes.

Abandoned browse

Before you start

  • You must have created and enabled your abandoned browse program to select it here.

  • A session is considered abandoned or expired after 35 minutes of inactivity. If you don’t select any delay, the system enrols the contact 35 minutes after the last page load. It's important to keep this in mind when testing the automation.

The abandoned browse trigger lets you enrol contacts directly after they visit your website. It works for regular page visits, as well as product detail pages.

If you want to focus only on contacts who visited product details pages, you can create a segment to identify those contacts where the pages browsed include data for the field product_name, and then add a decision node to your abandoned browse program to exit contacts not in the segment.

  1. Expand the Enrol abandoned sessions to drop-down menu and select your abandoned browse program.

  2. Expand the Enrol abandoned sessions after drop-down menu and select the delay period.
    This is the length of time between the browsing session being abandoned and the contact being enrolled on the program.

Advanced settings

  1. Set Require cookie consent to Yes to ensure cookies are only stored on a visitor’s browser after consent is given.

    You can use the following methods to integrate this feature with your existing cookie management system:

    • To deny consent: dmPt('setCookiesConsent', false);

    • To grant consent: dmPt('setCookiesConsent', true);

  2. Set Enable guest carts to Yes to create a contact in Dotdigital for visitors who abandon a cart but are not yet contacts in your account.


    You must ensure you have collected the necessary consent before sending any marketing communications to these contacts.

  3. Set Track order insights from purchaseComplete events to Yes to create an order Insight record for each purchaseComplete event tracked by the Tag.
    This is only recommended if you aren’t already syncing your order data to Dotdigital through another method.

  4. Select Save to confirm your configuration.

Regulatory settings for guest carts

We strongly recommend leaving your Regulatory settings on Enforce double opt-in for signups from signup forms and some API methods only (default). If you enforce double opt-in for all signups, then we don't recommend using abandoned cart emails for guests, as the process won't work correctly.


3.1 Paste the code on your website

  1. Select VIEW CODE to see the Tag that has been generated for your account.

  2. Select COPY TO CLIPBOARD.

  3. Paste your Connection code onto each page of your website, before the closing </body> tag.

3.2 Test the installation of the tag

  1. Select TEST to check the installation of the Dotdigital Tag, and enter a URL to test.

  2. Select TEST again to check that the Tag is correctly installed on the specified page.

If there are any issues with the installation, you see a message with information about the error and the steps to take to fix it.

After you have saved your connection and added the Dotdigital Tag script to your website, it may take some time before you start seeing traffic data in WebInsights.

You can expect to see data populate within about an hour, depending on the amount of web traffic your site receives. This built-in delay ensures that the data is accurately captured and processed.

If you don’t see any data after a few hours, check that the script has been correctly added to your website and that it’s not being blocked or affected by any other scripts running on your site.

For further assistance, contact our Support team.


Edit the tag

To make any changes to the configuration of the Dotdigital Tag:

  1. Go to Connect > Connect your website.

  2. Select the Edit icon for the tag you want to make changes to.

  3. Make the desired changes, then select SAVE.

These changes are automatically pushed to the published tag on the domains specified.


Implement custom values

You can enhance your data collection by including more than the default information. This allows you to gather additional details that can be used in segments or automations. To achieve this, you can submit custom page values with each page request.

Did this answer your question?