Piano Analytics
This section provides details on how to activate the Piano Analytics <> Purchasely integration
Overview
Piano is a platform that helps digital content businesses manage their online subscriptions, paywalls, and audience engagement. It offers tools for personalized content delivery, monetization strategies, and analytics to optimize user experience and maximize revenue. By integrating with media outlets and publishers, Piano.io enables companies to streamline access control, grow their subscriber base, and generate insights for better audience targeting and retention. Contrary to Purchasely which has a mobile-first focus, Piano offers web-oriented services.
Integrating Piano with Purchasely combines the strengths of both platforms to enhance in-app subscription management and growth. This integration allows businesses to offer more personalized subscription experiences across mobile (what Piano does not allow them to do), and gain unified insights into user behavior and subscription performance on both mobile and web. Additionally, it helps streamline subscription management across multiple channels, improving retention and engagement.
Pre-requisite
The minimal version of the Purchasely SDK supporting this integration is 3.3.0. If the Purchasely SDK integrated with your app is under the minimal version, please update it.
The Piano Analytics SDK must also be integrated in your app (iOS, Android). The AT Internet SmartTag SDK is not supported anymore by Piano: use the Piano Analytics SDK.
Integrating Purchasely with Piano
The activation requires 6 steps
- Associating users with the Piano Analytics visitor ID (SDK implementation)
- Retrieving your
Site IDfrom the Piano Dashboard - Retrieving your
Collection Domainand picking aCollect Path(we recommendevent) - Configuring Piano to accept the event names and properties you will be using
- Enabling the
Pianointegration in the Purchasely Console - Enabling the forwarding of Server Events to Piano in the Purchasely Console
1. Associate users with the Piano Analytics visitor ID (SDK implementation)
Initialize the Piano Analytics SDK in your app first. Then give the Piano visitor ID to Purchasely. Purchasely sends it as idclient with each event, so Piano attaches the server events to the same visitor as your app events.
Historical nameThe Purchasely attribute keeps its historical name (
atInternetIdClient/AT_INTERNET_ID_CLIENT). It contains the Piano Analytics visitor ID.
import PianoAnalytics
pa.getVisitorId { visitorId in
Purchasely.setAttribute(.atInternetIdClient, value: visitorId)
}// Call after PianoAnalytics.init(...)
PianoAnalytics.getInstance().visitorId?.let { visitorId ->
Purchasely.setAttribute(Attribute.AT_INTERNET_ID_CLIENT, visitorId)
}// pianoVisitorId: the visitor ID read from the Piano Analytics SDK on the native side
Purchasely.setAttribute(Attributes.AT_INTERNET_ID_CLIENT, pianoVisitorId);// pianoVisitorId: the visitor ID read from the Piano Analytics SDK on the native side
Purchasely.setAttribute(PLYAttribute.atInternetIdClient, pianoVisitorId);// pianoVisitorId: the visitor ID read from the Piano Analytics SDK on the native side
Purchasely.setAttribute(Purchasely.Attribute.AT_INTERNET_ID_CLIENT, pianoVisitorId);
Piano SDK configurationThe Piano visitor ID depends on the
visitorIDTypeand on the privacy mode configured in the Piano SDK. Set the attribute again when the visitor ID changes. Do not send it if the user did not give consent.
See the Piano Analytics developer documentation for more information on the visitor ID.
2. Retrieve your Site ID from the Piano Dashboard
Site ID from the Piano Dashboard- Log into your Piano Dashboard
- You will find your
Site IDnext to your site's name

3. Retrieve your Collection Domain and choose a Collect Path
Collection Domain and choose a Collect Path- Log into your Piano Analytics account.
- Retrieve the collection domain of your site (for example
xxxxxxx.pa-cd.com). It is the same value as thecollectDomainyou use to configure the Piano Analytics SDK in your app. - Pick a collect path. We recommend
event, the default path of the Piano Analytics SDKs.
4. Configure Piano to accept the event names and properties you will be using
- Access the Data Model section of your Piano Analytics account
- Create your custom events with the event names you will use in Purchasely
- Declare the custom properties that Purchasely sends (for example
event_collection_platform,device_timestamp_utcand the server event properties)
Events using any other name than Piano's default ones or the ones set up here will be ignored by Piano.
5. Enable the Piano integration in the Purchasely Console
- Go in the "Integrations" section, and open the edition form for Piano:

- Enable the integration
- Set your Piano
Collection Domain - Set your Piano
Collect Path - Set your Piano
iOS Site IdandAndroid Site Id(use the same value twice if you use one Piano site for both platforms) - Save

6. Enable the forwarding of Server Events to Piano in the Purchasely Console
- Go in the tab Server events
- Activate the Server events to be forwarded to Piano Analytics
- Check that the Event names match the ones enabled in Piano Analytics during step 4.
Updated 2 days ago

