Audience

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

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

In order for the Audience Popup to be GDPR compliant, your company name must be included in the opt-in message. To do this, you must add a vendorName parameter to the function initializing the popup. From May 9th onwards, not adding vendorName will prevent the audience popup to display.

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({
  vendorName: 'Your Company Name',
  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({
  vendorName: 'Your Company Name',
  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({
  vendorName: 'Your Company Name',
  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 three arguments, email (the email address of the user), marketingConsent (which defaults to true), and a callback which will indicate success/failure.

From May 9th, in order to be GDPR compliant, marketingConsent will default to false. You must collect consent on a GDPR compliant way and set it to true.

Example

Paddle.Audience.subscribe(email, marketingConsent, 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.
  • marketing_consent - User’s marketing consent status.
  • callback - JSONP callback function name.

Example

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

Note: Replace 1234567 in the above example with your Paddle vendor_id. If you do not pass through marketing_consent=1, the user will not be opted-in to marketing in your Paddle Audience.

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

Questions about Paddle?

If you need any help regarding your Paddle integration, please get in touch with our Customer Success team using the form below.