Security, Privacy, AI and CSR information for all Piano products now lives in one place. Explore our Compliance Center.
Subscriptions
English French
English French

How to create an AdFree Experience for paying subscribers?

First, create two versions of your site on your hosting service: one with ads on relevant pages and one without ads.

When a user visits the ad-enabled site, decrypt their __tac cookie using the Piano PHP SDK. Download the library here.

Do the following:

  1. Read the __tac cookie value.

  2. URL-decode the value and remove the {jax} prefix.

  3. Decrypt it using the private key from the Piano Dashboard.

  4. For each resource the visitor can access, you receive these values in a JSON string.

    ACCESS_ID = “id”;
    BUILD_TIME = “bt”;
    RID = “rid”;
    UID = “uid”;
    EX = “ex”;
    EARLY_EX = “eex”;
    CREATED_TIME = “ct”;

More information on checking access is available here.

Based on the returned active access, your server can display the ad-free or ad-lite version. This requires development work on your side.

Last updated: