If you use a tag manager provided by a third-party organization such as Google or Adobe to load scripts on your site, you can use it with Fresh Relevance too.
Before deploying via a tag manager, ensure you have completed your initial account setup in Settings > Website settings, including entering your website details and ecommerce system. This ensures your account is configured correctly and that you have the right tracking script code for your site.
The Fresh Relevance tracking script enables website personalization, triggered messaging, and behavioural tracking. For best performance and reliability, we recommend adding the script directly to your site’s HTML, typically in the header or footer template. Some browsers can block scripts loaded via tag managers, so use a tag manager only if direct HTML integration is not possible.
There are two main components to the Fresh Relevance integration:
The Script tag
The Purchase complete tracking Image
The Script tag
The Script tag goes on every page of your site. The script code you use will be unique to your account. You can find it in your Fresh Relevance account under User Menu > Account ID. Replace [your website ID here]
in the example below with your actual account ID.
<script async src="//ls.dycdn.net/[your account ID].js"></script>
You can load this script using a tag manager or by editing your site’s HTML.
Learn more
The Purchase complete tracking image
The Purchase complete image goes on the order confirmation page of your site. This looks something like:
<img src="//d1f0tbk1v3e25u.cloudfront.net/pc/[your website ID here]/?e=[customer's email address]" id="__tms_pc" height="1" width="1" />
The Purchase complete image should not be added using a tag manager.
The image is designed to report a purchase back to us in addition to the script. Because it’s an image, it loads much faster, catching people who leave the page before the script can load, and isn't affected by anything that can cause JavaScript not to load.
Using a tag manager introduces a delay to the image being displayed, and is also affected by any JavaScript issues. In addition, it makes it more complicated to merge in the customer's email address. All of which mean the purchase might not be recorded and the visitor sent an abandon cart message in error.
Your web development team should add the Purchase complete image to the HTML of the page, or the template that generates it, and use a server-side variable to merge in the customer's email address, and, if applicable, order number.
Learn more in Add a Purchase complete tracking image to your store.
If your site uses Magento then you may be able to use our extension, which loads both the Script and Purchase complete image automatically.
Contact Support for further information.