Getting Started

Building Blocks

Custom Fields

Subscription Features




Order Management

Billing Features


Payment Methods

Direct Debit Payments

Configuring Gateways

Revenue Recovery

Chargebee Moments(Checkout and Portal)


Reports and Analytics

Data Privacy & Security

Fraud Management


Open Source Resources

Other Features

API Integration

Third Party Integrations

Google Analytics for Checkout & Portal v3 


Chargebee Checkout & Portal v3, in association with Google Analytics, will help you track activities based on the events  generated in your website.

Checkout and Self-serve portal (v3) load within your app, hence Google event tracking is supported.

Configure Google Analytics Tracking 

You need to

  • Set up Google Analytics Account
  • Enable Google Analytics in your Chargebee site
  • Set up a goal in Google Analytics

Here's how you can set up Google Analytics Account and enable it in Chargebee Checkout (V3) .

This will help you view event-based reports such as realtime event reporting, behavior tracking and conversions (successful transactions).

Setting up Goals in Google Analytics 

Step 1: Login to your Google Analytics (GA) account, go to Admin tab (the View level), select Goals and click New Goal.

Step 2: Under Goal setup, select Template option, select Place an Order in the Revenue section. Click Next Step to move to Goal description.

Step 3: Enter the goal description, select Event option, and click Next Step.

Step 4: Configure the Goal Details

In the Event condition section, set the event details you want to track.

Events Tracked by Chargebee 

You can track the following events related to Checkout and Self-serve portal.

Send When Event Action Event Category Parameter
checkout begins begin_checkout ecommerce
trial subscription is created generate_lead engagement
no-trial subscription is created purchase ecommerce transaction-id, currency, value
each checkout step is visited {screen_name} cb-checkout
each portal screen is visited {screen_name} cb-portal

Whitelisted domains are mandatory to send purchase event, otherwise Chargebee will send them as generate_lead event.

var cbInstance = Chargebee.getInstance();
// checkout
cbInstance.setCheckoutCallbacks(function (cart) {
  return {
      loaded: function () {
        ga('send', 'event', 'your-category', 'your-action');
// self-serve portal
  close: function() {
    ga('send', 'event', 'your-category', 'your-action');

For callback details, please refer Chargebee JS Doc .

Was this article helpful?