How to connect Batch to Piano Composer

This guide explains how to integrate Piano Composer with Batch to enhance your engagement strategy by retargeting users after a Piano experience is displayed on your website.

This guide is specific to Batch's Mobile Engagement Platform (More on the difference between Batch's CEP and MEP).

Overview

Piano Composer is a customer journey orchestration tool that allows you to display experiences on your website based on user behavior, triggers, and conditions. You can use it to drive conversion actions such as account creation, premium content access, or adblocker circumvention.

By connecting Piano Composer to Batch, you can trigger campaigns (e.g., Web Push or Email) after a user has seen a Piano Experience but hasn't completed the expected conversion.


1. Forward Piano Composer Events to Batch

Use Piano's callbacks to forward user interaction data to Batch via Web Tagging.

  1. Open your Piano dashboard and access the Experience you want to track.

  2. In the "Embed Code" section, insert Batch Web Tagging methods into the existing script.

  3. Piano's callbacks will then send the relevant event data to Batch automatically.

The list of available callback events is available in the Piano documentation.

You can find a sample integration script here.

Image shows the Piano Composer dashboard, highlighting the location of the "Integrate" button used to insert Batch’s embed code.

2. Use Piano Events in Batch Automations

Once events are forwarded to Batch, you can use them to trigger automations directly in the Batch dashboard.

For example, target users who saw an account creation prompt but did not convert.

Image shows the Trigger campaign configuration module in the Batch dashboard, highlighting how to select an event sent by Piano Composer to trigger a campaign.

3. Use the "Run JS" Action for Custom Triggers

In addition to callbacks, Piano Composer lets you execute JavaScript when an experience is shown.

Use the Run JS action to call Batch methods manually, making it possible to:

  • Send custom events

  • Set user attributes

  • Trigger advanced scenarios for all users targeted by the Experience

Image shows the Run JavaScript module in the Piano Composer dashboard, illustrating how to manually send custom data to Batch using the SDK.

Last updated

Was this helpful?