> ## Documentation Index
> Fetch the complete documentation index at: https://www.cashfree.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# External Analytics

> Send Cashfree Checkout, Payment Links, and Payment Forms events to Google Analytics and other platforms to track behaviour and optimise conversions.

## Supported platforms

Cashfree supports integration with the following analytics platforms:

* [Google Analytics 4 (GA4)](/payments/checkout/after/external-analytics#google-analytics-4-ga4)
* [Meta Pixel](/payments/checkout/after/external-analytics#meta-pixel)
* [Mixpanel](/payments/checkout/after/external-analytics#mixpanel)
* [Google Ads (via GA4 linking) ](/payments/checkout/after/external-analytics#ga4-google-ads)
* [Meta Ads (via Meta Pixel linking) ](/payments/checkout/after/external-analytics#meta-pixel-meta-ads)

<Note>
  If your analytics provider is not listed, contact [Cashfree support](https://merchant.cashfree.com/merchants/landing?env=prod\&raise_issue=1).
</Note>

## Configure external analytics

To configure external analytics integration, follow these steps:

1. Log in to the **[Merchant Dashboard](https://merchant.cashfree.com/auth/login)**.
2. In the **Payment Gateway** section, select **Access**.
3. In the left navigation pane, select **Developers > Checkout Analytics**.
4. Under the **Actions** column, select the **Edit** icon.
5. In the **External Analytics Configuration** modal, configure the integration as described in the setup sections below.
6. Select **Save** to apply your changes.

<Frame caption="">
  <img src="https://mintcdn.com/cashfreepayments-d00050e9/vGHAFJp1ZDsFJV2e/static/images/pg/external-analytics.png?fit=max&auto=format&n=vGHAFJp1ZDsFJV2e&q=85&s=d15fd2ab4811d2c739b36708f257fab1" width="800" data-path="static/images/pg/external-analytics.png" />
</Frame>

## Event categories

Events are organised into different categories based on where they are triggered and what they track. You can track customer interactions in your integration by using the following event categories:

* Checkout
* One Click Checkout (OCC)

### Checkout events

Use these events to track customer interactions in the standard checkout flow, including checkout pages, payment links, and payment forms.

#### Client-side checkout events

Client-side events are triggered in the browser or app when customers interact with the checkout interface.

| Event name                         | Description                                |
| ---------------------------------- | ------------------------------------------ |
| `cf_checkout_load`                 | Checkout loaded successfully.              |
| `cf_checkout_transaction_initiate` | Customer initiated a transaction.          |
| `cf_transaction_success`           | Transaction completed successfully.        |
| `cf_transaction_failure`           | Transaction failed.                        |
| `cf_retry_checkout`                | Redirected to checkout after failure.      |
| `cf_return_to_merchant`            | Customer redirected back to merchant page. |

#### Client-side payment link and payment form events

| Event name              | Description                                     |
| ----------------------- | ----------------------------------------------- |
| `cf_pl_load`            | Payment link loaded successfully.               |
| `cf_pf_load`            | Payment form loaded successfully.               |
| `cf_checkout_initiated` | Checkout initiated from a payment link or form. |
| `cf_purchase_completed` | Payment completed successfully.                 |

### One click checkout (OCC) events

Use these events to track customer interactions in the One Click Checkout (OCC) flow. OCC events are available for server-side and client-side tracking.

#### Server-side events

Server-side events are pushed to Google Analytics 4 (GA4) and Meta Facebook.

| GA4 event                            | Meta Facebook event                  |
| ------------------------------------ | ------------------------------------ |
| `begin_checkout` (standard event)    | `InitiateCheckout` (standard event)  |
| `cf_checkout_login_otp_sent`         | `cf_checkout_login_otp_sent`         |
| `cf_checkout_login_verify`           | `cf_checkout_login_verify`           |
| `add_shipping_info` (standard)       | `cf_checkout_address_collected`      |
| `cf_checkout_payment_info_displayed` | `cf_checkout_payment_info_displayed` |
| `add_payment_info` (standard)        | `AddPaymentInfo` (standard event)    |
| `purchase` (standard)                | `purchase` (standard event)          |

#### Client-side events

Client-side events are triggered in the browser or app when customers interact with OCC pages.

| Event name                         | Description                                  |
| ---------------------------------- | -------------------------------------------- |
| `cf_checkout_occ_load`             | First page or login page loaded.             |
| `cf_checkout_login_verify`         | OTP verified.                                |
| `cf_checkout_login_otp_sent`       | OTP sent.                                    |
| `cf_checkout_address_load`         | Addresses loaded.                            |
| `cf_checkout_address_collected`    | Address save or continue clicked.            |
| `cf_checkout_load`                 | Payment page opened.                         |
| `cf_checkout_transaction_initiate` | Order payment transaction initiated.         |
| `cf_checkout_offer_apply`          | Offer applied.                               |
| `cf_checkout_offer_remove`         | Offer removed.                               |
| `cf_checkout_order_cancelled`      | Order cancelled.                             |
| `cf_checkout_address_deleted`      | Address deleted.                             |
| `cf_checkout_address_updated`      | Address updated.                             |
| `transaction_success`              | Triggered only for non-Shopify integrations. |

## Setup instructions

Follow the platform-specific instructions below to configure your analytics integration.

<Accordion title="Google Analytics 4 (GA4)" icon="google">
  To set up GA4 integration, complete the following steps:

  1. Sign in to your [GA4 account](https://analytics.google.com/).
  2. Go to **Admin** (bottom left).
  3. Select **Data Streams** and open the relevant stream.
  4. Copy the **Measurement ID**.
  5. In Cashfree’s External Analytics Configuration modal, enable **Broadcast events to Google**.
  6. Enter the **Measurement ID**.
  7. Generate an API token:
     * In GA4 Admin, select **Measurement Protocol API secrets**.
     * Create a new API secret and copy the value.
  8. Enter the **Access Token** in Cashfree’s configuration modal.
  9. Select **Save**.

  <img src="https://mintcdn.com/cashfreepayments-d00050e9/Vm19t-1BmbodApc1/static/images/pg/ga-analytics.gif?s=c50e82c51b7d693f39a4d15145b33ffb" alt="" width="1920" height="1043" data-path="static/images/pg/ga-analytics.gif" />

  **Verification**:

  * In GA4, go to **Reports > Realtime Overview**.
  * Perform a test transaction.
  * Events should appear in real time.
</Accordion>

<Accordion title="Meta Pixel" icon="meta">
  To set up Meta Pixel integration, complete the following steps:

  1. Sign in to [Meta Events Manager](https://www.facebook.com/events_manager2).
  2. Select your Pixel from **Data Sources**.
  3. Copy the **Pixel ID** from **Settings**.
       <img src="https://mintcdn.com/cashfreepayments-d00050e9/dXRw7XB0qJ07N0Oo/static/images/pg/meta-data-set.png?fit=max&auto=format&n=dXRw7XB0qJ07N0Oo&q=85&s=dec7f6a3d04718b5d6ba378c39ba49ae" alt="Meta Pixel ID" width="1915" height="1058" data-path="static/images/pg/meta-data-set.png" />
  4. Generate an **Access Token**:
     * Scroll to **Conversions API**.
     * Select **Generate Access Token**.\\
         <img src="https://mintcdn.com/cashfreepayments-d00050e9/dXRw7XB0qJ07N0Oo/static/images/pg/meta-generate-access-token.png?fit=max&auto=format&n=dXRw7XB0qJ07N0Oo&q=85&s=fd1ffcea985520fee11b4315f5cdce84" alt="Meta generate access token" width="1917" height="1036" data-path="static/images/pg/meta-generate-access-token.png" />
  5. In Cashfree’s configuration modal, enter the Pixel ID and Access Token.
  6. Select **Save**.

  **Verification**:

  1. Navigate to **Data Source** tab under Events Manager.
  2. Select your particular Pixel ID and click on **Overview**.

  Here, you see the list of events coming, if there is some activity on the OCC.

  <img src="https://mintcdn.com/cashfreepayments-d00050e9/nWzIgdT81HZg8CRp/static/images/pg/meta-verification.png?fit=max&auto=format&n=nWzIgdT81HZg8CRp&q=85&s=e387f8eec0bc5bc512f1c325e7001907" alt="" width="2874" height="1452" data-path="static/images/pg/meta-verification.png" />

  <Note>
    If you are a Shopify merchant using OCC, disable the **purchase** event in Cashfree Meta Pixel setup. This prevents double-counting if Facebook and Instagram sales channels are active in your Shopify store.
  </Note>
</Accordion>

<Accordion title="Mixpanel" icon="https://cdn.brandfetch.io/idr_rhI2FS/w/800/h/764/theme/dark/symbol.webp?c=1bxid64Mup7aczewSAYMX&t=1717143416035">
  To set up Mixpanel integration, complete the following steps:

  1. Sign in to your [Mixpanel account](https://mixpanel.com/).
  2. Go to **Project Settings**.
  3. Copy the **Project Token**.
  4. Enter it in the Cashfree configuration modal.
  5. Select **Save**.
</Accordion>

## Linking with ad platforms

You can link your analytics platforms with advertising platforms to enhance tracking and optimisation.

<Accordion title="GA4 + Google Ads" icon="google">
  Link Google Ads and GA4

  ### Step 1: Mark the purchase event as a conversion in GA4

  GA4 imports only events that are marked as key events. Mark the purchase event as a key event before you import it into Google Ads.

  1. Sign in to your GA4 property.
  2. Select **Admin** (bottom-left).
  3. Under **Data display**, select **Events**.
  4. Find the **purchase** event in the list of collected events.
  5. Check for the star icon to confirm the purchase event is marked as a key event (purchase events are usually marked by default).

  ### Step 2: Link Google Analytics 4 to Google Ads

  Linking creates the connection that lets data flow between the two platforms.

  1. In your GA4 property, open **Admin**.
  2. Under **Product links**, select **Google Ads links**.

  <img src="https://mintcdn.com/cashfreepayments-d00050e9/nWzIgdT81HZg8CRp/static/images/pg/ga-ad-step-2.png?fit=max&auto=format&n=nWzIgdT81HZg8CRp&q=85&s=67db3fe56a3883ad58c4890ae4daacee" alt="GA4 Google Ads links" width="1907" height="932" data-path="static/images/pg/ga-ad-step-2.png" />

  3. Select **Link** (top-right).
  4. Select **Google Ads accounts** and pick the account(s) you want to link.
  5. Select the checkbox next to the account and select **Confirm**.
  6. On the next screen, ensure **Enable personalised advertising** and **Enable auto tagging** are turned on (they should be on by default). Keep both enabled where possible.

  * Personalised advertising lets you use GA4 audiences for remarketing in Google Ads.

  * Auto tagging adds the gclid parameter to your ad URLs so GA4 can attribute clicks and conversions to Google Ads campaigns.

  7. Select **Next**, review the settings, then select **Submit**.

  Allow up to 24 hours for data to start flowing between the two platforms.

  ### Step 3: Import the purchase conversion into Google Ads

  After linking and once data has synced, import the GA4 conversion into Google Ads.

  1. Sign in to your Google Ads account.
  2. From the left menu, select **Goals**.
  3. Under **Conversion**, select **Summary**.
  4. Select **+ Create conversion action**.
  5. Select **Import**.
  6. Select **Google Analytics 4 properties**, select **Web**, then select **Continue**.

  <img src="https://mintcdn.com/cashfreepayments-d00050e9/nWzIgdT81HZg8CRp/static/images/pg/ga-ad-step3.png?fit=max&auto=format&n=nWzIgdT81HZg8CRp&q=85&s=af203ab03932fe4acae35a2c71a71f4c" alt="" width="1919" height="901" data-path="static/images/pg/ga-ad-step3.png" />

  7. Select the **purchase** event (or other conversions you want to track) from the list of GA4 key events.
  8. Select **Import and continue**, then select **Done**.

  ### Step 4: Configure the purchase conversion in Google Ads

  1. On the **Conversions** summary page, find the purchase conversion you imported.
  2. Select the conversion name to edit settings.
  3. Set **Value** to **Use the value from Google Analytics** so the purchase amount is passed into Google Ads dynamically.
  4. Set **Action optimisation** to **Primary action** so Google Ads can use this conversion for bidding optimisation.

  When setup is complete, start analysing conversion data in both platforms.

  <Note>
    Changes to conversion tracking apply only to future orders and events and won’t be applied retroactively to historical data. Allow up to 48 hours for the new conversion data to appear in GA4 and Meta reporting dashboards.
  </Note>
</Accordion>

<Accordion title="Meta Pixel + Meta Ads" icon="meta">
  Once you have configured Meta Pixel integration with Cashfree, you can link it with Meta Ads Manager to enhance your advertising campaigns with conversion tracking and optimisation.

  ### Prerequisites

  Before linking Meta Pixel with Meta Ads, ensure you have:

  * A configured Meta Pixel with Cashfree integration
  * An active Meta Ads Manager account
  * Admin access to your Meta Business account

  ### Step 1: Access your Meta Ads Manager

  1. Sign in to [Meta Ads Manager](https://www.facebook.com/adsmanager/).
  2. Navigate to **Events Manager** from the main menu.
  3. Select your configured Pixel from the **Data Sources** list.

  ### Step 2: Verify pixel events

  1. In **Events Manager**, go to your Pixel's **Overview** tab.
  2. Verify that Cashfree events such as `purchase` and `InitiateCheckout` are appearing.
  3. Verify event data quality using the **Diagnostics** tab.

  ### Step 3: Create custom conversions

  1. In **Events Manager**, select **Custom Conversions** from the left menu.
  2. Select **Create Custom Conversion**.
  3. Define conversion rules based on Cashfree events:
     * For purchase tracking: use the `purchase` event
     * For checkout initiation: use the `InitiateCheckout` event
     * For payment info collection: use the `AddPaymentInfo` event
  4. Set conversion values and attribution windows as needed.
  5. Save the custom conversion.

  ### Step 4: Use conversions in Meta Ads campaigns

  1. In [Meta Ads Manager](https://www.facebook.com/adsmanager/), create or edit a campaign.
  2. In the **Optimisation & Delivery** section, select your custom conversion as the optimisation goal.
  3. Set appropriate bid strategies based on your conversion objectives.
  4. Launch your campaign to begin using Cashfree conversion data for optimisation.

  ### Step 5: Monitor performance

  * Use **[Ads Reporting](https://www.facebook.com/adsmanager/reporting/)** to view conversion metrics from Cashfree events.
  * Monitor attribution data in **Events Manager** to understand the customer journey.
  * Adjust campaign targeting and bidding based on Cashfree conversion insights.
</Accordion>

## Verification and troubleshooting

* Allow up to 48 hours for new configurations.
* Ensure IDs and tokens are correct.
* For Shopify merchants, disable duplicate purchase events.
* Use provider-specific real-time or debug views.

<Note>
  If you are a Shopify merchant using One Click Checkout, disable the purchase event in Cashfree Meta Pixel setup. This prevents double-counting if Facebook and Instagram sales channels are active in your Shopify store.
</Note>

## FAQs

<AccordionGroup>
  <Accordion title="I am not able to see events in the Meta Pixel Helper (Meta Pixel Ad Helper). Why?" onClick={() => posthog.capture('Accordion Clicked', { title: "I am not able to see events in the Meta Pixel Helper (Meta Pixel Ad Helper). Why?" })}>
    Browser-side events are not currently supported. The Meta Pixel Helper extension only detects browser-side events.

    Cashfree External Analytics integration supports server-side events only, which are pushed directly to the Meta Events Manager dashboard instead of the browser. As a result, events do not appear in the Meta Pixel Helper, but they are visible in the Meta Events Manager dashboard.

    <iframe src="https://www.cashfree.com/devstudio/preview/pg/embed/faqFeedback?section=payments%2Fexternal-analytics%23i-am-not-able-to-see-events-in-the-meta-pixel-helper-meta-pixel-ad-helper-why" style={{ width: "100%", height: "65px", border: "none" }} title="FAQs feedback component" />
  </Accordion>

  <Accordion title="How long does it take for events to appear in Meta Pixel?" onClick={() => posthog.capture('Accordion Clicked', { title: "How long does it take for events to appear in Meta Pixel?" })}>
    * After configuration in the Merchant Dashboard, events may take approximately **30 minutes to 1 hour** to appear in the Meta Events Manager.
    * It may take **24–48 hours** for the same events to become visible in Meta Ads reporting.

    <iframe src="https://www.cashfree.com/devstudio/preview/pg/embed/faqFeedback?section=payments%2Fexternal-analytics%23how-long-does-it-take-for-events-to-appear-in-meta-pixel" style={{ width: "100%", height: "65px", border: "none" }} title="FAQs feedback component" />
  </Accordion>

  <Accordion title="What should I do if I am receiving duplicate events in Meta Pixel?" onClick={() => posthog.capture('Accordion Clicked', { title: "What should I do if I am receiving duplicate events in Meta Pixel?" })}>
    If you are receiving duplicate purchase events in the Meta Events Manager, events may be getting triggered from multiple sources.

    To avoid duplication, disable the `purchase` event from the Cashfree Merchant Dashboard. This prevents Cashfree from sending the purchase event and resolves the duplication issue.

    <iframe src="https://www.cashfree.com/devstudio/preview/pg/embed/faqFeedback?section=payments%2Fexternal-analytics%23what-should-i-do-if-i-am-receiving-duplicate-events-in-meta-pixel" style={{ width: "100%", height: "65px", border: "none" }} title="FAQs feedback component" />
  </Accordion>
</AccordionGroup>

<snippet>snippets/related-topics-loader.mdx</snippet>

<div class="hidden" data-table-of-contents="bottom">
  <p class="mt-4 font-medium flex items-center gap-2 related-docs-heading">
    <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="w-4 h-4">
      <path d="M3 4h7a2 2 0 0 1 2 2v13a2 2 0 0 0-2-2H3z" />

      <path d="M21 4h-7a2 2 0 0 0-2 2v13a2 2 0 0 1 2-2h7z" />
    </svg>

    <span>Related topics</span>
  </p>

  <ul>
    <li><a href="/docs/payments/manage/reports">Payment Reports</a></li>
  </ul>
</div>
