Private preview
The Dotdigital Tag for Personalization is currently in Private preview, so it may be subject to short notice changes or improvements.
Before you start
This article provides a step-by-step implementation checklist, with links to developer documentation to support your developers in adding the Tag to your site.
We recommend you review our Dotdigital Tag API: when, where and why article for an explanation of the purpose of each call, and more detail about why, when, and where they should be used.
1. Set up the Dotdigital Tag
In Marketing, in the Dotdigital Tag settings, you must:
Enable web behavior tracking
Enable Personalization
Require cookie consent
Track order insights from completed purchases if you don't have orders syncing to Marketing from another source. Otherwise leave this setting disabled.
Disable Automatic page tracking
This setting should automatically be disabled when Personalization is enabled on the Tag.Deploy and test
In Personalization, you must:
Set up your Site Details, and for Website eCommerce System, select DDTag.
Learn more in Basic account configuration.
2. Add the Dotdigital Tag to your website
You must paste the Dotdigital Tag code, including the Initialization snippet, onto every page of your website, before the closing </head> tag.
The Dotdigital Tag is compatible with tag managers.
2.1 Set site configuration
When a visitor first reaches your site and begins a browsing session, there are some details you should define for the session so that you don’t need to reference them in every subsequent tracked event. Use the ddg.configuration call to do this.
2.2 Identify visitors
When visitors click through from a Dotdigital Marketing campaign (email or SMS) they are automatically identified by the Dotdigital Tag. For anonymous visitors who haven't clicked through from a campaign, you must provide either an email address or mobile number in order for them to be tracked.
Use the ddg.identify call to update any contact details gathered and de-anonymize the visitor.
2.3 Track page views
You must track page views each time a page loads. There are different types of events you should call for specific pages.
Product pages
⚠️ Product pages must be tracked differently from other site pages. For product pages, follow the instructions in the section Track product views.
Do not duplicate events
If you’re using one of the page-specific calls, you must not fire a ddg.track call on the same page.
When page-specific events are used, Personalization can automatically tell which pages have been visited. This information is used to help place content on specific pages of your site using our Site editor.
Call | Purpose |
ddg.homepage | Tracks home page visits |
ddg.cart | Tracks cart page visits |
ddg.login | Tracks login page visits |
ddg.loginComplete | Tracks successful logins |
ddg.register | Tracks account creation or other registration page visits |
ddg.registerComplete | Tracks successful registrations |
ddg.accountEdit | Tracks when visitor is on their account edit page. |
ddg.newsletterEdit | Tracks when the visitor updates their newsletter subscription. |
For other types of web page which aren’t included above, you can fire the ddg.track event and include information about the page in the data you send.
2.4 Track product views
When a user visits a product page or a page with multiple products listed, call either ddg.productBrowse or ddg.productList to pass the product details.
You must not also call ddg.track on these pages. Instead, pass the tracked values as part of the productBrowse and productList events.
Pages | Description | Event |
Product | Page for an individual product, used to pass detailed product information. | ddg.productBrowse |
Category, Sub-category, Search Results | Any page with multiple products listed, passing details for each product. | ddg.productList |
These events can be used to trigger abandoned browse messages if no purchase complete event is later tracked.
Personalization maps any product details received in these calls with the product details provided through back-end syncs to fill out product information and build recommendations.
Four attributes are used to match products passed through the Tag with products imported through back-end syncs:
Product ID (
productId) - the ID of the product in your system.
Mapped topridin Personalization.
Site brand (
sbr) - the site brand for the product.
Only required if you have multiple site brands defined.
Currency (
currency) - the currency used against this product.
Mapped tocurrin Personalization.
Language (
lang) - the language of the product description.
For a product sent through the Tag to map to the product synced to Personalization, all four components must be the same. If one component is missed, a separate product record is generated.
3. Track cart updates
To trigger abandoned cart messages and track the cart contents, cart updates must be tracked with the ddg.cartUpdate call.
You must use a consistent cartId for the same sessions or carts. This ensures that no duplicate messaging is fired for the same cart.
3.1 Track checkout events
Use the ddg.checkout event to track when visitors have progressed to the checkout stage, before they have completed their purchase, so checkout intent can be tracked.
3.2 Track completed purchases
Track completed purchases with the ddg.purchaseComplete event.
This event:
ensures that abandoned cart or abandoned browse messages are not sent to visitors that have completed their purchase.
powers product recommendations based on purchasing behavior.
As this can be used for automation purposes, you must not call this event until the order is completed.
3.3 Track custom events
You can track any events not included in our predefined events using the ddg.event call.
Custom events might include:
Newsletter signups
Form submissions
Site searches
PDF downloads
Video interactions
Quote requests
Appointment bookings
Reviews submitted
Products added to a wishlist
Learn more about possible custom event types in Example custom events.
4. Pass product Data to Personalization
To power Personalization's product recommendations, we need the relevant data for your products. This data can be passed through the productBrowse or productList events, but we recommend you pass this data separately, through back-end processes.
For Shopify and BigCommerce customers, the Personalization connectors automatically sync your product catalogs for you.
5. Test
This is the most important part. You must test the processes and make sure that all of the events required are being sent to Personalization. This helps to ensure that your triggers fire appropriately and that we can generate relevant recommendations.
Learn more about testing in the section Test a trigger program.
If you find any issues during testing, or you need further help, contact our Support team.
6. Personalize
Once visitor behavior data and product information have been passed to Personalization, you’re now ready to begin personalizing your site by creating SmartBlocks and adding them to your website with our Site Editor.
