Before you start
Things you need to know:
Fresh Relevance content is blocked if the customer is viewing your website on an Apple Mobile device with IOS 17 and the Advanced Tracking and Fingerprinting Protection setting is turned on.
Setup
To set up your script with Google Tag Manager:
In your Google Tag Manager account, create a new Custom HTML tag.
Learn how to create a custom HTML tags in the Google Tag Manager article Custom tags.
Add the following script to the HTML text box:
<script async src="//[domain]/[website_id].js"></script>
You need to replace:
[domain]
with the correct domain. To find this, expand the User menu, then go to Settings > System configuration > Custom domains.[website_id]
with your website ID. To get your website ID from your Fresh Relevance account, expand the Configuration drop-down menu and copy the Account ID.
Set the Firing Triggers to All Pages.
โAdd a name to your tag.
Select Save.
You should be redirected to your GTM account page. The tag is listed under Workspace Changes. You can now preview the change on your site by:
Selecting Preview link at the top of the page
or set it to live by selecting Submit at the top of the page.
Confirm the script is installed correctly
The simplest way to tell that the script is working is to just browse a few pages on your website, wait a minute, then in Fresh Relevance, expand the User menu and go to Settings > Website Settings > Test Website Integration and confirm that events are being received from your site.
Learn more in Test your website integration.
If it doesn't work, double check that you have published the new version of the tag using Google Tag Manager.
Check Google Tag Manager is delivering the script correctly
Due to the way Google Tag Manager works, you won't see our script in the browser page when you view the source. To see if it's working correctly, you need to use the developer tools (or equivalent) in your web browser:
Open the browser on your website, and press the F12 key to display the developer tools.
Open the Network tab and then refresh the page.
Amongst the other network requests for your site, you should see the following requests.
The code starting t8 will be replaced by the Website ID of your account.
You can check further by temporarily adding the following script in the tag window in Google Tag Manager:
<script>
console.log('Loader script has been run');
</script>
When you refresh your page, if you switch to the console tab in the developer tools, you should see the text Loader script has been run.
If you don't see this, double-check your Google Tag Manager setup.
If you do see the text, but Fresh Relevance isn't working correctly, contact your Account Manager or our Support team.