> ## 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)](https://www.cashfree.com/docs/payments/checkout/after/external-analytics.md#google-analytics-4-ga4)
* [Meta Pixel](https://www.cashfree.com/docs/payments/checkout/after/external-analytics.md#meta-pixel)
* [Mixpanel](https://www.cashfree.com/docs/payments/checkout/after/external-analytics.md#mixpanel)
* [Google Ads (via GA4 linking) ](https://www.cashfree.com/docs/payments/checkout/after/external-analytics.md#ga4-google-ads)
* [Meta Ads (via Meta Pixel linking) ](https://www.cashfree.com/docs/payments/checkout/after/external-analytics.md#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).

## 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.

![](https://mintcdn.com/cashfreepayments-d00050e9/vGHAFJp1ZDsFJV2e/static/images/pg/external-analytics.png?fit=max\&auto=format\&n=vGHAFJp1ZDsFJV2e\&q=85\&s=d15fd2ab4811d2c739b36708f257fab1)

## 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.

Cashfree uses a server-to-server integration to share event data with analytics and advertising platforms.

#### 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] Google Analytics 4 (GA4)
>
> 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**.
>
> ![](https://mintcdn.com/cashfreepayments-d00050e9/Vm19t-1BmbodApc1/static/images/pg/ga-analytics.gif?s=c50e82c51b7d693f39a4d15145b33ffb)
>
> **Verification**:
>
> * In GA4, go to **Reports > Realtime Overview**.
>
> * Perform a test transaction.
>
> * Events should appear in real time.
>
> > [!NOTE]
> >
> > The 24–48 hour monitoring window applies to Google Ads event attribution and overall conversion reporting, not to the GA4 Realtime Overview. Realtime events appear immediately; attribution data in Google Ads and standard GA4 reports can take up to 48 hours to reflect accurately.

> [accordion] Meta Pixel
>
> 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**.
>
>    ![Meta Pixel ID](https://mintcdn.com/cashfreepayments-d00050e9/dXRw7XB0qJ07N0Oo/static/images/pg/meta-data-set.png?fit=max\&auto=format\&n=dXRw7XB0qJ07N0Oo\&q=85\&s=dec7f6a3d04718b5d6ba378c39ba49ae)
>
> 4. Generate an **Access Token**:
>    * Scroll to **Conversions API**.
>    * Select **Generate Access Token**.\\
>
>      ![Meta generate access token](https://mintcdn.com/cashfreepayments-d00050e9/dXRw7XB0qJ07N0Oo/static/images/pg/meta-generate-access-token.png?fit=max\&auto=format\&n=dXRw7XB0qJ07N0Oo\&q=85\&s=fd1ffcea985520fee11b4315f5cdce84)
>
> 5. In Cashfree’s configuration modal, enter the Pixel ID and Access Token.
>
> 6. Select **Save**.
>
> 7. In the [Merchant Dashboard](https://merchant.cashfree.com/auth/login), go to **Developers > Checkout Analytics > Meta** and toggle on the **Purchase events** option.
>
> > [!NOTE]
> >
> > Cashfree sends Meta Purchase events as server-side events. These events will not appear in Meta’s **Test Events** section or in browser-based tools like the Meta Pixel Helper extension. Monitor the **Events Overview** section of your Meta Events Manager instead.
>
> **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.
>
> ![](https://mintcdn.com/cashfreepayments-d00050e9/nWzIgdT81HZg8CRp/static/images/pg/meta-verification.png?fit=max\&auto=format\&n=nWzIgdT81HZg8CRp\&q=85\&s=e387f8eec0bc5bc512f1c325e7001907)
>
> ### Event verification
>
> Use this section to confirm that Meta Pixel receives your Purchase events successfully. Verify event delivery directly in Meta Events Manager rather than in other tracking interfaces, because Meta Events Manager is the only source that reflects the data Meta actually receives.
>
> > [!NOTE]
> >
> > If you configure a new Meta Pixel, wait approximately 30 minutes to 1 hour before you verify event delivery. Event data can take this long to appear in Meta Events Manager.
>
> To verify Purchase events in Meta Events Manager:
>
> 1. Log in to [Meta Events Manager](https://www.facebook.com/events_manager2).
> 2. Navigate to the relevant Pixel or data set.
> 3. Apply the date and time filter for the period you want to review.
> 4. Review the number of Purchase events recorded for that period.
> 5. Open the Shopify Admin and navigate to the **Orders** section.
> 6. Filter the orders for the same period.
> 7. Count the number of orders processed through the OCC channel during that period.
> 8. Compare the Purchase events shown in Meta Events Manager with the OCC orders from Shopify for the same period.
>
> This comparison provides the most accurate way to confirm that Meta receives your Purchase events successfully.
>
> > [!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.

> [accordion] Mixpanel
>
> 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**.

## Linking with ad platforms

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

> [accordion] GA4 + Google Ads
>
> 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**.
>
> ![GA4 Google Ads links](https://mintcdn.com/cashfreepayments-d00050e9/nWzIgdT81HZg8CRp/static/images/pg/ga-ad-step-2.png?fit=max\&auto=format\&n=nWzIgdT81HZg8CRp\&q=85\&s=67db3fe56a3883ad58c4890ae4daacee)
>
> 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**.
>
> ![](https://mintcdn.com/cashfreepayments-d00050e9/nWzIgdT81HZg8CRp/static/images/pg/ga-ad-step3.png?fit=max\&auto=format\&n=nWzIgdT81HZg8CRp\&q=85\&s=af203ab03932fe4acae35a2c71a71f4c)
>
> 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.

> [accordion] Meta Pixel + Meta Ads
>
> 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.

## 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.

## FAQs

> [accordion] I am not able to see events in the Meta Pixel Helper (Meta Pixel Ad Helper). Why?
>
> 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.
>
> [FAQs feedback component](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)

> [accordion] 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.
>
> [FAQs feedback component](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)

> [accordion] How long does it take for GA4 data to appear after configuring it in Cashfree OCC?
>
> After configuring GA4 in Cashfree OCC, monitor the data for approximately **24–48 hours** to allow a sufficient sample size to accumulate. Note that only events generated after the configuration is enabled will be sent. Orders or events created prior to the configuration will not be available.
>
> [FAQs feedback component](https://www.cashfree.com/devstudio/preview/pg/embed/faqFeedback?section=payments%2Fexternal-analytics%23how-long-does-it-take-for-ga4-data-to-appear-after-configuring-it-in-cashfree-occ)

> [accordion] 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 in **Merchant Dashboard > Developers > Checkout Analytics > Meta**. This prevents Cashfree from sending the purchase event and resolves the duplication issue. Monitor the events for 24–48 hours after disabling to verify the duplication has stopped.
>
> [FAQs feedback component](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)

> [accordion] Where can I find documentation to set up Meta Pixel and GA4 tracking for Cashfree checkout?
>
> You can configure external analytics from the [Merchant Dashboard](https://merchant.cashfree.com/auth/login). For setup instructions, see:
>
> * [Google Analytics 4 (GA4)](https://www.cashfree.com/docs/payments/checkout/after/external-analytics.md#google-analytics-4-ga4)
> * [Meta Pixel](https://www.cashfree.com/docs/payments/checkout/after/external-analytics.md#meta-pixel)
>
> After setup, monitor the event flow for 24–48 hours to ensure events are being tracked correctly.
>
> [FAQs feedback component](https://www.cashfree.com/devstudio/preview/pg/embed/faqFeedback?section=payments%2Fexternal-analytics%23where-can-i-find-docs-for-meta-pixel-and-ga4)

> [accordion] Does Cashfree send purchase events directly to Google Ads?
>
> No. Cashfree pushes events to GA4 (Google Analytics 4) rather than directly to Google Ads. To track conversions in Google Ads, import the Purchase events from GA4 into Google Ads and configure them as conversion events. See the [Linking with ad platforms](https://www.cashfree.com/docs/payments/checkout/after/external-analytics.md#linking-with-ad-platforms) section for step-by-step instructions.
>
> If you prefer to retain existing Purchase conversions from Google Ads as the primary event, use Google Tag Manager (GTM) for the tracking setup. Once Cashfree configures GTM on its side, it triggers the relevant events to your GTM container. You must then configure GTM to forward these events to Google Ads.
>
> [FAQs feedback component](https://www.cashfree.com/devstudio/preview/pg/embed/faqFeedback?section=payments%2Fexternal-analytics%23does-cashfree-send-purchase-events-directly-to-google-ads)

> [accordion] Can Cashfree push conversion data back to the Shopify dashboard when using One Click Checkout?
>
> Shopify does not allow Cashfree to push conversion data back to the Shopify dashboard when One Click Checkout is active. Use the Merchant Dashboard for analytics insights, or use external tools like Google Analytics to view your data.

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

Related topics

<ul>
  <li>[Payment Reports](https://www.cashfree.com/docs/payments/manage/reports.md)</li>
</ul>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.