How to allow a user to bypass the meter based on referrer URL, such as Google or MailChimp first click free

Let's say you'd like to exclude click-throughs from your MailChimp newsletters from the meter. Or allow anyone who comes from Facebook to be able to view your content without triggering the meter. Using the leaky_paywall_filter_is_restricted filter you can check for any of those conditions before the meter and subscribe nag are triggered on an article. 

The first article viewed doesn’t count toward the meter, and then the meter starts on the next article read.

Hard restricted content can also be viewed from a user agent such as the Google bot. 

Bypass paywall based on referrer URL

In the gist below, the $bypass_value is set to the value you want to look for in either the referring site or the url. 

Bypass paywall based on User Agent

You can bypass the paywall for a specific user agent, such as Googlebot.  Please be aware that user agents can be faked by a browser.

Still need help? Contact Us Contact Us