Web Tracking script within Sugar Market Platform
One requirement for GDPR compliance is that visitors to your site must be given a clear understanding of how cookies are being used and visitors must be provided with the ability to either accept or decline cookies.
Therefore, if you are using Sugar Market’s web tracking script, you will need to configure your site to conditionally load our web tracking script based on the visitor’s interaction with the page. In other words, you’ll have to prevent the script from being loaded until something happens on the page that you can tie the loading of the script to. Some example interactions that can conditionally load the script include:
- When a user clicks a specific button somewhere on the page
- When a user checks a checkbox
- When a user checks a checkbox and clicks a button
The possibilities are endless when it comes to determining which visitor action to utilize. The decision is ultimately yours with regard to which interactions are available to your visitors.
Note: We highly recommend that you consult with your own development team on how to conditionally load this script within all pages it’s used on.
DISCLAIMER: Below is just a suggested example of dynamically loading external scripts on your page. The correct implementation of this will ultimately depend on the decision that you and your development team decide upon. Therefore, the example below should not be interpreted as the only solution.
You can then implement this method based on a user specific action in your code:
Note: If your website is hosted on a WordPress-based site, there are a few cookie consent plugins that could serve as an alternative method of implementing a dynamic script.