Native, responsive, in-article AdSense ad:
This example protects content on the top of this page as an incentive to opt in to enabling advertising. If you block ads and don’t opt in to seeing them, instead of seeing this cool video, you’ll get a messaging telling you that you could see the video if you opt in to seeing ads.
But you can also choose to opt out of seeing ads. If you opt out, you won’t get to see the video. So you have two choices:
- Opt in to seeing ads and you’ll see the premium content, or;
- Opt out of seeing ads, and you won’t see the premium content.
Your choice is recorded as a cookie, and remembered on subsequent page views. You can clear your cookie and choose again by clicking the button below.
We use two Adtoniq shortcodes on the top of this page, one for blocked users and one for non-blocked users (or blocked users who have opted in to allowing analytics).
To create an example just like this on your own website using Adtoniq, follow these steps:
- 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.
- Identify a page that has premium content on it that you would like to protect, or create a new one if you don’t yet have one. Edit it in WordPress.
- Surround your premium content with the [adtoniq_message_nonblocked] shortcode. Read more about this shortcode.
- Above or below your protected content (or elsewhere), create additional content that will only be displayed to users blocking ads. This should explain that they can see your protected content if they opt in to allowing you to use analytics. Surround this explanation with the [adtoniq_message_adblocked] shortcode.
- In the Messaging section, enable the alert, and choose “Users blocking ads”.
- In the Message Options section, make sure “Select message to edit” is set to “Greeting Message”.
- Enter text such as “We’d like to show you some cool videos, but you’re blocking our ads. Click Yes to see our videos and support our site.”
- In the Message Options section, set “Select message to edit” to “Confirm Message”.
- Enter text such as “Thanks for supporting us. You now have access to all our videos!”.
- In the Message Options section, set “Select message to edit” to “Reject Message”.
- Enter text such as “We’re sorry to hear that. That’s cool though, you can still browse the rest of our site and we won’t show you ads.”
- In the Button Options section, enter “Yes” for confirm button text, and leave the reject button text and custom button class fields empty.
- In the Button Options section, enter “No” for reject button text.
- Click the Save Changes button.
- 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]