I’ve spent some time looking for a metered paywall solution for Ghost. All the ones I looked at wanted to handle everything: paywall, membership, emails, and so on. And most of them were way expensive.
The goal is a script that checks to see if the browser in use has read three stories on the site in the past 30 days, and if so, prevent reading further and throw up a dialog of explanation, with some sort of CTA linked to the subscribe page. The script would go in post.hbs, and be triggered whenever someone opened an article. Here’s the pseudocode:
DIM cookie_date as date DIM cookie_read_count as integer DIM dialog.text as text dialog.text = "Thanks for reading stories on our site! We allow non-members to read three stories a month, and it appears you have reached that limit. To get FULL access to all stories, sign up for a FREE membership." IF logged_in EXIT ENDIF IF cookie-exist = FALSE CREATE cookie SET cookie_date = TODAY SET cookie_read_count = 1 EXIT ELSE IF cookie_date < (TODAY-30) SET cookie_date = TODAY SET cookie_read_count = 1 EXIT ELSE SELECT CASE CASE cookie_read_count = 1 SET cookie_read_count = 2 EXIT CASE cookie_read_count = 2 SET cookie_read_count = 3 EXIT CASE cookie_read_count = 3 Blank/Shade remaining content Display dialog Display CTA ENDCASE ENDIF ENDIF
Any takers or ideas?