Welcome to the Instapage Support Center

|

Blocking Loading Cookies From Tracking Scripts

Your landing page will have two types of cookies:

  • Essential cookies - mandatory Instapage cookies that are essential for pages and variations being served, and conversions being tracked;
  • Optional cookies - all other cookies that you have installed with integrations or were added to a page with custom code. Only these cookies will be blocked by this solution.

You need to make sure all of your landing pages provide your visitors with proper consent and opportunity to opt out of non-essential Cookies.

Under page settings, you have an option that will allow you to postpone the cookie delivery until a visitor accepts it. When you enable that feature for a specific page, that page will show a small cookie notification on the bottom of the browser window where the page visitor can accept or decline cookies from the page.

cookies1.png

If the visitor clicks on the Yes, I accept button, he will give his consent that all cookies that are on that particular page can be added to his browser. On click, ALL cookies will be installed and the notification will disappear.

If the visitor clicks on the I do not accept button, he will deny all the optional cookies that are on that particular page. On click, only OPTIONAL cookies will NOT be installed and the notification will disappear. Essential cookies will still be added to his browser.

If the visitor clicks on the Learn more link, he will be sent to a page on your website where your company explains which cookies are being used and why. You can see where to place this link in the instructions below.

1. In the builder, click on Settings and select Cookie Bar from the drop-down menu;

settings_button.png

cookie2_1.jpg

2. In the screen that opens, you need to enable the Cookie Bar toggle and input the link to your terms of service into the designated field;

cookie3.png

By default, this input field is empty, and if it is left empty after enabling this feature, the default value will be an empty link.

3. After you switch the toggle to ON, you will see a modal that notifies you that you need to read and confirm reading this article before you can continue.

cookie4.png

Note: The cookie bar will only be enabled if the checkbox is selected and if you confirm this by clicking the Continue button. Otherwise, the feature will return to its default OFF state.

In order to postpone the installation of other third-party cookies until the visitor accepts them, you will have to wrap the tracking scripts with the following function:

window.lazyCustomScripts = function() {}

To do this, click on Settings and select Javascript from the drop-down:

settings_button.png

settings_javascript.jpg

And paste the function together with the tracking scripts in the Head section. This is an example of how the code should look:

window.lazyCustomScripts = function() 
{ (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-XXXXX-Y', 'auto'); ga('send', 'pageview'); }
Note: This function will work only if the “cookie bar” toggle is turned ON.
Have more questions? Submit a request
Was this article helpful?
2 out of 4 found this helpful

Need Further Help?

Tell us what you need and we will be happy to assist you.

Our team of expert support staff and our community can answer your questions. Submit a ticket, or reach out on live chat!