Table of Contents


The Piano paywall provides a mechanism to geo-locate users and target business rules and marketing messages to them.


If you want to only track the meter based on the browser's geolocation, you can configure this inside the Piano dashboard. This enables you to setup a paywall only for a certain geo-targeted set of users.


To target different offers to different segments, you can inspect the meter object on the onMeterExpired callback and render different offers to different regions or countries.

tp.push(["init", function() {
        paywallId: "123456",
        onMeterExpired: function(meter) {
            if (meter.region === "Europe") {
                    offerId: "OABCDEF",      // the offer with the EUR terms
                    templateId: "OT1234567", // the template with european messaging
            } else if (meter.country_code === "CA") {
                    offerId: "OBCDEFG",      // the offer with the canadian terms
                    templateId: "OT2345678", // the template with canadian messaging
        onShowOffer: function() {
            // this disables the default curtain and any reminders because
            // we are handling the rendering of the offers ourselves inside
            // of the onMeterExpired callback
            return false;