To set this up, you need to:

  1. Setup Google Analytics Account  
  2. Enable Google Analytics in Chargebee

Setup Google Analytics Account  

  • Sign up for a Google Analytics Account
  • After filling in the information, click Get Tracking ID 
  • The Tracking Info page will give you the code you need to integrate to your business’ website. Here’s how it’s done:
    • Locate the header section in your webpage code (<head> </head> tags)
    • Copy the pixel code from the Google Analytics Tracking Info page and paste it within the header tags.
    • Paste the tracking code wherever you use pop-up checkout.
    • Chargebee supports both ga and gtag version of tracking code.

Enable Google Analytics in Chargebee

  • Login to your Chargebee site and navigate to Settings > Configure Chargebee > Checkout & Self Serve Portal > Configurations > Advanced Settings > Add domains
  • Here you add the domain of your business, so Chargebee will whitelist them to give them access to subscription and invoice-related information in chargebee.js callbacks and to use conversion tracking via chargebee.js. If you have multiple domains, separate them with commas
  • Navigate to Settings > Configure Chargebee > Checkout & Self Serve Portal > INTEGRATE WITH CHARGEBEE
  • In Header Script, add data-cb-ga-enabled="true" attribute to enable Google Analytics


Feel free to contact Chargebee support if you need further clarification.