Understanding the Brightback Javascript Snippet

The basic Brightback JS snippet works all sorts of magic like:
  • Pulling custom data in about your canceling customer
  • Using that custom data to personalize the cancel experience, present different Loss Aversion Cards or Offers.

Here's a visual of how we use the Brightback JS snippet to personalize your Brightback Page.

Here’s a list of the default Standard Fields 

window.Brightback.handleData({
      app_id: 'APP_ID,                    
      first_name: 'John',                 
      last_name: 'Doe',                   
      email: 'jdoe@example.com',          
      save_return_url:
      'https://site.com/account/',       
      cancel_confirmation_url:
      'https://site.com/account/cancel',
 Name
 Description
 App_ID
This is your unique app ID that tells Brightback which company’s cancellation experience to display. You can get your app ID from your dedicated CSM.
 First_name
Customer’s First Name
 Last_name
Customer’s Last Name
 Email
Customer’s Email
 Internal_id
Your Customer’s Account ID
 Save_return_URL
Return URL from Brightback for Customers who do not cancel.
 Cancel_conf_URL
Return URL from Brightback for Customers who cancel. 

Fields we recommend pulling in under the "account" section of the code.

account: {
        company_name: 'Acme Products',    
        company_domain: 'acme.com',       
        internal_id: '1234AZ55',          
        billing_id: 'cus_FfV4CXxpR8nAqB', 
        plan: 'enterprise',               
        value: 1000.00,                   
        created_at: 1312182000            
      },
  Field
  Description
 company_name
Your canceling Customer’s company name. Recommended for reporting for B2B businesses.
 billing_term 
Whether a customer is annual or monthly
created_at
When your Customer started the subscription. Helpful to capture for creating customer age profiles.
 plan 
Used for reports or creating personalized offers by plan type, like enterprise or freemium
 billing_id 
Used to identify Customer if using a Brightback-supported billing system like Stripe or Recurly 

Any other custom data can be included in the "custom" section of the code

custom: {
        activity: {
          emails: 42085,                  //   For loss aversion card
          templates: 86,                  //   Values populated via a back-end
          contacts: 102546                //
        }
    });
  }
</script><br>
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us