Content visibility: Closed articles instrumentation

Article visibility defines who can access content and how. An article can be:

  • Open: Available for free to all users.
  • Dynamically closed: image Closed to certain users:
    • Metered paywalls: Depending on their consumption
    • Dynamic paywalls: Depending on their propensity to subscribe
  • Hard closed: image Available only to subscribers.

Once articles’ visibility is set up, it can be used by subscription managers and editors to understand and fine tune the paywall strategy.


The logic for designating which type of visibility an article has is the following:

  • If Marfeel receives a hard closed event, it’s considered hard closed.
  • If Marfeel does not receive any hard closed event and receives an instrumentation event with a dynamically closed article, it is considered dynamically closed.
  • If Marfeel does not receive any closed event, but the article is marked up as isAccesibleForFree = false, we consider the article hard closed.

Article visibility can be specified via standard structured data or via pageVars as described below.

Closed articles

Marfeel automatically detects closed articles based on the isAccessibleForFree structure data field. This field is recommended by Google in terms of SEO and sites should use it to improve their positioning. Marfeel uses the same field.

<script type="application/ld+json">
  "@context": "",
  "@type": "NewsArticle",
  "isAccessibleForFree": false

Alternatively, although not recommended, these articles can be instrumented with the closed page var:

window.marfeel.cmd.push(['compass', function(compass) {
	compass.setPageVar('closed', 'hard-paywall');

Dynamically closed articles

Articles dynamically closed per user depending on different criteria (like user consumption, pageviews, rfv or any other metered strategy) must be reported using the closed page var:

window.marfeel.cmd.push(['compass', function(compass) {
	compass.setPageVar('closed', 'dynamic-paywall');

If an article can be dynamically closed for different reasons, then the closed page var supports different values. For example, we could report that a Pageview has been dynamically closed because of a metered signwall strategy:

window.marfeel.cmd.push(['compass', function(compass) {
	compass.setPageVar('closed', 'dynamic-signwall');
By convention dynamically closed pages should have closed page var values starting with `dynamic-`.

If an article receives hard and dynamic close data Marfeel will tag its visibility as mixed.


Open articles that appear hard-closed:

In case you have isAccessibleForFree=false because of a dynamic paywall, inform Marfeel about it by instrumenting dynamic closes. If you already have the implementation in place but still see a hard-close icon, there are two possible causes:

  1. You are sending both hard closed and dynamic closed events
  2. You have isAccesibleForFree = false on an article that has never been dynamically closed. In that case, consider removing the isAccesibleForFree flag, as it’s sending a bad signal to Google.

Compass not showing the defined visibility

Depending on how you are loading Marfeel’s SDK - you might be getting an error when loading the setPageVar tracking code, similar to this one:

(index):354 Uncaught TypeError: Cannot read properties of undefined (reading 'cmd')

You can protect it with the following code

window.marfeel = window.marfeel || { cmd: [] };
window.marfeel.cmd.push(['compass', function(compass) {
	compass.setPageVar('closed', 'hard-paywall');

Experiences targeting

On Experience Manager the closed pageVar can be leveraged as a custom var. This might be useful to exclude Experiences from closed articles.