Activate a Piano Media Paywall

Piano is one of the largest providers of metered paywalls for digital publishers. 

This article outlines the process to be followed on the partner side to activate a Piano Media Paywall on their site with Marfeel.

The steps also reference the Piano Media documentation section for the paywall, which, for further information, can be found here.

General execution flow

The following graphic shows the Piano Paywall execution flow, from the moment the user requests the link until the Piano Paywall is executed. The actions exclusively performed when using the Marfeel version are marked in a different color. Note that, tp.experience.execute() or tp.experience.init() will be executed either by Marfeel or by the partner, depending on which version (desktop or mobile) is being used.

This tp.experience.execute() should be executed every time a Paywall could appear (i.e. every new article or section load).

Marfeel will be the only party responsible to execute the Paywall whenever a new article or section gets loaded. Then, depending on the partner's configuration and the data sent to the API, that page-view will trigger an actual Paywall block or will let the user keep reading the content. All this information will be sent to the Piano API and will be available throughout the whole user session. You can see some examples of this variable-setting process in the provided links.

How to activate a Piano Paywall for a Marfeel version

  1. Activate your Piano Media account.
  2. Access your unique Piano ID.
  3. Provide Marfeel with that ID so the Marfeel engineer can initialise the Paywall when loading the Marfeel version.
  4. If you, the partner, want to add a custom configuration to the Paywall execution (like variables for segmentation or ad block detection) which is not article-specific on your own, you should do it just before executing the Marfeel garda script. All this information will be sent to the Piano API and will be available throughout the whole user session. 

For example, if the partner wants to set the zone and the type of user for the session themselves, they could do it the following way:

<script type="text/javascript">
tp = window"tp" || [];
tp.push("setZone", "Web");
tp.push("setCustomVariable", "userState", "Subscriber");
</script>
<script type="text/javascript" src="marfeelGarda.js"></script>

In this case, the marfeelGarda.js should contain the garda code to redirect towards Marfeel.

Once the Marfeel developer has access to their Piano ID, they will be able to start developing the logic to execute the Paywall. This development will basically be based on sending tp.experience.execute() events for every page-view and possibly registering any article-specific variables in order to segment the users, as demanded by the partner.