3

Here's the basic scenario I'm looking at: Someone comes to the website (which features various journal and news articles), and can look at a certain number of articles "for free" for a particular length of time (say 30 days). However, once they hit that number of articles within the length of time, the site displays a registration form instead of any articles.

Obviously, if someone is a registered member of the site and logged in to their account, they have unrestricted access and can read as many articles as they want.

It's a readership/subscription model similar to the one employed by http://dish.andrewsullivan.com/, FWIW.

I can envision how this all works -- it's a pretty straightforward membership/registration set-up -- except for the part about tracking/counting the number of articles that someone who isn't logged in has read, and then doing something once they hit a pre-defined limit.

Any ideas?

1

The article view can be tracked with the IP address of the not logged in user. With the every view of the article, you can record the IP address, view count for article and article id (entry id).

So each time, the non-logged in user is going to view an article, a simple query can be run to check if that IP address exceeded the limit if yes just use the {redirect="registration_page"}.

| improve this answer | |
  • The problem with by IP address is that you can't control that there is only one user per ip_address. So User A from Coffee Shop, may hit 2 articles, User B another 3, then everyone in the Coffee Shop is blocked for the next 29 days. Same is true from a home address with NAT or DHCP in place, etc. An ip_address can be limited to a structure (mostly), but not specific people. You probably want cookies or something else. – nonprofit_tech Apr 11 '13 at 5:18
  • But I don't think cookies or something else browser (client side) specific data wouldn't be useful to track a user. In these cases, user can use different browsers at same PC and these data can be deleted anytime. – Bhashkar Yadav Apr 11 '13 at 5:26
  • Almost all the client side applications have work-arounds. This is true for 99% of the metered paywall solutions. Personally, I love the javascript-based solutions, since I just turn off javascript when browsing the site. TinyPass, tinypass.com, has talk of a server side solution, and definitely, you could use IP Address. It depends on how broad of an audience you might end up pissing off. I hate when I visit a site and it tells me I've been there 10x this month, when my browser history says, not at all this year. But no solution is full proof, you decide where the error lies. – nonprofit_tech Apr 11 '13 at 5:34
  • Yes, in this case no solution is 100% full proof as the system has to track a visitor not a site member. According to my view, IP tracking would be better solution than other and my opinion is: never rely on client side script :) . – Bhashkar Yadav Apr 11 '13 at 5:41
  • Could work, unless your primary targets are people who would read during their work day. Then based on ip_address, offices, coffee shops, airports, or anywhere that uses DHCP with NAT addressing (effectively sending a single router ip_address (this is most everything)) would effectively block entire offices, restaurants, coffee shops, airports, etc. after 1 person has read 5 articles. – nonprofit_tech Apr 11 '13 at 5:58
0

I would not do this by IP address. Write a custom extension to create a cookie for logged out user once visiting the website.

That cookie could have an expiration date of 0. If the expiration is set to zero the cookie will only last as long as the browser is open. This can be set in longer intervals i.e. 2 hours.

Every article viewed would update the cookie.

Wrap content with a custom method that first checks if the user is logged out, then check for cookie value of how many times an article has been viewed. If user is logged in, disregard anything related to a cookie.

There is no way to full proof client side access if the user is not logged in. What user, unless a knowledgeable one that knows how cookies work would make the decision to use a different browser when most users operate with one? Probably a small percentage.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.