This example allows users into your home page,  but locks only those users blocking analytics out of the rest of our site unless they opt into allowing analytics. This is less severe than locking users out of the whole site. Because this example needs another (non-home) page to really explore the functionality, you can try viewing another page here.

When you opt in by clicking “Yes”, we start recording analytics on subsequent page views.

You can clear your Adtoniq cookie and choose again by clicking the button below.

To create an example just like this on your own website using Adtoniq, follow these steps:

  1. First, ensure that you have installed Adtoniq, registered with Adtoniq Cloud, and entered your Cloud Key in Adtoniq. For more information on installing Adtoniq, see our online documentation.
  2. Ensure that you have properly configured Adtoniq for Google Analytics. Learn more about using Adtoniq for Google Analytics.
  3. Create a new page on your website to send users to when they attempt to access your website with an ad blocker, and have not (yet) chosen to opt in to letting you use Google Analytics.
  4. In the Messaging section, enable the alert, and choose “Users blocking ads and analytics”.
  5. In the Message Options section, make sure “Select message to edit” is set to “Greeting Message”.
  6. Enter text such as “We use analytics on our website to improve our services. Would you like to opt in to using analytics?”
  7. In the Message Options section, set “Select message to edit” to “Confirm Message”.
  8. Enter text such as “Thank you for supporting our site”.
  9. In the Button Options section, enter “Yes” for confirm button text, and leave the reject button text and custom button class fields empty.
  10. Click the Save Changes button.
  11. Click on the Protection tab.
  12. In the “Site Protection Status” section, choose “Home page allowed but rest of site protected”.
  13. In the field labeled “Send adblocked users to this page”, enter the URL to page you created in step #2.
  14. Click the Save Changes button.
  15. To create a button to allow the user to clear their Adtoniq choice cookie and choose again, embed the following shortcode somewhere on your page: [adtoniq_clear_choice style='button']Clear your Adtoniq choice and choose again[/adtoniq_clear_choice]