Skip to main content

Fresh Relevance SDK setup checklist

Required and recommended steps to implement the Fresh Relevance SDK for your site.

Updated this week

Private preview

The Fresh Relevance SDK is currently in Private preview, so it may be subject to short notice changes or improvements.

1. Set up the Dotdigital Tag

In the Dotdigital Tag settings, you must:

  • Enable web behavior tracking Required

  • Enable Fresh Relevance Required

  • Require cookie consent Recommended

  • Track order insights from completed purchases Required

  • Deploy and test Required

In Fresh Relevance, you must:


2. Add the Dotdigital Tag to your website

You must paste the Dotdigital Tag code onto every page of your website, before the closing </body> tag.

The Dotdigital Tag is compatible with tag managers.

Identify visitors

When visitors click through from a Dotdigital campaign (email or SMS) they are automatically identified by the Dotdigital Tag.

Anonymous visitors must provide either an email address or mobile number in order to be tracked. This usually happens when these visitors fill out a popup or a contact form, log into their account, or complete the checkout process.

Use the ddg.identify call to update any contact details gathered and de-anonymize the visitor. Using the Identify call you can pass the email, mobile number, first, last, and full name as well as any extra data required.

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.

When page-specific events are used, Fresh Relevance 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.

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.

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.

These events and the product details passed with them are required to help power product recommendations in Fresh Relevance.

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.

Learn more in the section Abandoned browse.

Fresh Relevance 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 components 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 to prid in Fresh Relevance.

  • 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 to curr in Fresh Relevance.

  • Language (lang) - the language of the product description.

For a product sent through the Tag to map to the product synced to Fresh Relevance, 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.

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.

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.

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 Fresh Relevance

To power Fresh Relevance 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 Fresh Relevance connectors automatically sync your product catalogs for you.

Learn how to import product data into Fresh Relevance in Import product data.


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 Fresh Relevance. 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 Fresh Relevance, you’re now ready to begin personalizing your site by creating SmartBlocks and adding them to your website with our Site Editor.

Did this answer your question?