# How to connect Batch to Poool?

## Overview

This integration lets you combine monetization data and engagement insights to build more personalized and effective messaging strategies.

By connecting both platforms, you’ll bridge **monetization** and **engagement** data:

* Poool provides valuable insights about reader conversion and access behaviour (free vs. premium vs. subscriber).
* Batch lets you turn those insights into **personalized** **automation triggers** — for example, re-engaging readers who saw the paywall but didn’t subscribe by sending them an email, a push notification or a SMS.

In short, this integration helps you:

* Retarget users based on their paywall interactions,
* Boost conversion through contextual messaging and automation.

## 1. Before you start

You’ll need:

* An existing **Batch Web SDK v4** setup on your website
* A **Poool Access** integration with your App ID
* Access to both dashboards: [Batch](https://dashboard.batch.com) and [Poool](https://dashboard.poool.fr)

If you haven’t integrated either SDK yet, follow each platform’s installation guide first.

## 2. Principle of the integration

Once both SDKs are loaded on your site, the idea is simple:\
Poool triggers events when users interact with your paywall — for example, when the paywall loads, when a reader clicks “Subscribe”, or when they log in.\
Each of these events can be **listened** and then **sent to Batch** as a *Custom Event*.

This allows you to record every key paywall interaction directly inside Batch and reuse it for audience segmentation or campaign targeting.

## 3. Implementation steps

{% stepper %}
{% step %}
**Load both SDKs** on your page:

* Poool scripts (`access.min.js` and `audit.min.js`) handle the paywall display and analytics.
* Batch’s script manages event collection and webpush messaging.
  {% endstep %}

{% step %}
**Initialize Poool** with your App ID and configure your paywall as usual.
{% endstep %}

{% step %}
**Listen to Poool events** such as:

* `page-view`– when the paywall is displayed
* `loginClick` – when a user clicks “Log in”
* `subscribeClick` – when a user clicks “Subscribe”
* ...

You’ll find the full list of Poool events and their payloads in Poool’s developer documentation:\
👉 [Poool Access JavaScript Events](https://www.poool.dev/fr/docs/access/javascript/events)\
👉 [Poool Audit JavaScript Events](https://www.poool.dev/fr/docs/access/javascript/audit/events)

{% endstep %}

{% step %}
**Send these events to Batch** as *Custom Events* using Batch’s Web SDK.

For example, when Poool emits a `loginClick`, you send a `Poool_click_log` event to Batch:

```javascript
 access.on("loginClick", (e) => {
          console.log("[Poool] loginClick", e);
          batchSDK((api) => {
            api.trackEvent("Poool_click_log", {
              attributes: {
                urlType: "Login",
                category: "Paywall Abonné",
                user_type: "Abonné",
              },
            });
          });
        });
```

{% endstep %}
{% endstepper %}

### 4. Use Poool Events in Batch Automations

Once the integration is live, these new events will appear in **Batch → Settings → Custom Data → Events**.\
You can then:

* Build **segments** (e.g. users who clicked “Subscribe” but didn’t convert):

<div data-full-width="false"><figure><img src="https://2998247023-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbwlQFpRAhaFR79zae6Jf%2Fuploads%2FVwRiTlFhxhirK6jKTnLf%2Fpoool_segment.png?alt=media&#x26;token=8cdd29f0-4022-4391-be75-dc3c88643b95" alt="Build segments with the data retrieve from Poool Events"><figcaption></figcaption></figure></div>

* Trigger **personalized email, SMS, push and web notifications:**

<figure><img src="https://2998247023-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbwlQFpRAhaFR79zae6Jf%2Fuploads%2FEH5sYiXTknJnb4gbwjh7%2Fpoool_trigger.png?alt=media&#x26;token=c53c3f6b-cba9-4f1b-bebb-7562c0693f95" alt="Trigger your messages using Poool Events"><figcaption></figcaption></figure>

✅ **You’re all set!**\
Your Poool paywall is now connected to Batch. Each paywall interaction — view, login, subscription, or custom action — can be tracked in Batch to help you better understand your readers and personalize their experience.
