Audience

Collect user email addresses and build a customer marketing base using Paddle.js

Make sure you've completed Paddle.js Setup before continuing to this step!

What is Paddle Audience?

Audience allows you to collect email opt-in’s and signups on your website which go directly into an ‘Audience’ list within your Paddle dashboard. We automatically populate your Audience dashboard with users who start your checkout, but you can enrich this Audience by allowing users to opt-in on your website or sync your signups with Audience.

Behind the scenes we’re creating rich customer profiles detailing customer information, marketing preferences, purchase history and lifetime value for you to use in marketing and messaging efforts in the future.

INTEGRATION TIP
Do you offer a trial/demo download?
Use the download prompts and buttons built into Paddle.js to automatically prompt users downloading your trial/demo version for their email address.

Audience Popups & Prompts

Exit Intent Popup/Modal

Automatically display a prompt asking a user for their email address when their mouse exits the page, indicating they’re about to navigate away.

Paddle.Audience.Popup({
  triggers: {
    exitIntent: true,
    scrollDepth: false,
    timed: false
  },
  strings: {
    heading: "Before you leave...",
    subHeading: "Before you head outta here, why not subscribe to our email list and be the first to know about our latest products, updates and offers?",
    cta: "Sign me up!"
  }
});

Timed Popup/Modal

Display a popup/prompt for a user to signup to your Audience after a defined amount of time.

Paddle.Audience.Popup({
  triggers: {
    exitIntent: false,
    scrollDepth: false,
    timed: 60
  },
  strings: {
    heading: "Stay up to date!",
    subHeading: "Never miss a new feature, release, announcement or deal. Sign up to our newsletter today!",
    cta: "Sign me up!"
  }
});

For timed popups, the timed parameter should be set to an integer indicating the number of seconds until the popup should be shown. In the above example timed is set to 60 indicating the popup will trigger after 1 minute on the page.

Scroll Depth Popup/Modal

Automatically prompt the user for their email address as they navigate your page and scroll past a certain number of pixels.

Paddle.Audience.Popup({
  triggers: {
    exitIntent: false,
    scrollDepth: 350,
    timed: false
  },
  strings: {
    heading: "Stay up to date!",
    subHeading: "Never miss a new feature, release, announcement or deal. Sign up to our newsletter today!",
    cta: "Sign me up!"
  }
});

For scroll-depth popups, the scrollDepth parameter should be set to an integer indicating the vertical scroll depth in pixels that this popup should trigger at. In the above example, scrollDepth is set to 350 meaning the popup will trigger once the user scrolls 350 pixels down the page.

Ignoring Repeat Users

Paddle Audience within Paddle.js will automatically ignore users who have previously completed, or dismissed a previous Audience prompt, regardless of the trigger for the prompt. When testing, clearing your cookies will reset this, allowing you to refine your prompts.

Turning on Paddle.js Debug Mode will display a message in the console each time a prompt is triggered, skipped due to ignoring a repeat user or skipped for another reason.

Additionally, the Audience API will automatically de-duplicate Audience members, maintaining a single record for each user, and returning a consistent Audience ID for API calls containing the same email.

Audience Add APIs

Paddle.js

Call the Paddle.Audience.subscribe() method to add a user to your audience. The subscribe() function accepts two arguments, email (the email address of the user), and a callback which will indicate success/failure.

Example

Paddle.Audience.subscribe(email, function(response) {
  if(response.success) {
    alert("You've been successfully subscribed!");
  } else {
    alert(response.error);
  }
});

Response Object

When specifying a callback, the response object will be in the following format:

Success

{
    "success": true,
    "email": "christian@paddle.com",
    "user_id": 29777
}

Failure

{
    "success": false,
    "error": "The email format is invalid."
}

Direct API

In addition to using Paddle.js, you can call the API directly or from your back-end application.

Endpoint: https://checkout.paddle.com/api/1.0/audience/{vendor_id}/add

Method: GET

Accepted Parameters:

  • email - User email address.
  • callback - JSONP callback function name.

Example

curl -X GET https://checkout.paddle.com/api/1.0/audience/1234567/add?email=christian@paddle.com

Note: Replace 1234567 in the above example with your Paddle vendor_id.

On success the API will return the field user_id containing the ID of the Audience member.

Was this page helpful?