Skip to main content

The Fresh Relevance script and your website performance

Understand how our script affects the speed of your website and things you can do to improve it.

Updated over 2 weeks ago

The Fresh Relevance script

In order for us to integrate with a website, we require you to include a JavaScript file that tracks which pages and products your customers are visiting so we can use this information in your triggered campaigns. This script is loaded each time a page is viewed on your site.

Conscious of site performance, our script has been designed to be fast. All unnecessary characters, such as spaces, have been removed to decrease the size.

Our script also uses both the async and defer attributes, which means it isn't loaded until after a page has finished rendering. This is so it doesn't block any other elements loading and shouldn't affect the speed to display the rest of the page.

Learn more about script attributes.

We also set a cache timeout on the script so visitors avoid having to download it on every page they visit. This time period must be kept relatively short in case of script updates.

Script URL missing a protocol

We specify a protocol-relative URL in our script path with no http: or https: in front.

This means the script is called using the protocol it inherits from the page, either http or https.

This helps match the script to the page and removes issues like security warnings. These types of URL are supported in every browser because they're part of the W3C specification, so shouldn't pose a problem.

There are reports of these URLs causing errors to be logged by visits from some spiders or bots, for search engines and similar, which aren't coded correctly. These should not affect the site or script performance.

Site info bar

To see what data the Fresh Relevance script is collecting from any page on your site, expand the User menu and select Open Site Info Bar.

This displays a bar at the bottom of the page with the information our script is collecting.

If you're visiting the page with the Site info bar on, this forces a formatted version to be displayed. The file is loaded from a Content Delivery Network (CDN) for maximum speed.

Developer tools

If you’re using either Chrome or Firefox browsers, you can also open the developer tools (press F12) and select the Console tab.

This should contain an Object with all of the information the script is capturing, typically within p or cart dictionaries).


See also

Did this answer your question?