> ## Documentation Index
> Fetch the complete documentation index at: https://razorpay-60c89f9a-mintlify-audit-missing-sections-1778528421.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Add Facebook Pixel on Payment Success Page

> Integrate Facebook Pixel on your payment success page:

* If you use Payment Buttons to accept payments from customers and redirect them to a success page post payment.
* If you also advertise on Facebook and use Facebook Pixel to track conversions.

This integration tracks and analyses ad conversion to payments.

## Prerequisites

* [Create a Facebook Pixel](https://www.facebook.com/business/help/952192354843755?id=1205376682832142\&recommended_by=1700857106877546).
* Create a payment success page on your domain and [add the Facebook Pixel to it](https://www.facebook.com/business/help/952192354843755?id=1205376682832142).

## Add Redirects to Measure Facebook Ads' Effectiveness

Let us assume you run a website selling pet supplies. You attract customers using advertisements on Facebook and sell them pet products on your website using our Payment Button.

To track and measure the effectiveness of these Facebook ads and how many of them convert into purchases, you need to add a redirect from your Payment Button to this success page.

To add redirects:

1. Navigate to your Payment Button in the edit mode on the **Button Created Successfully** page.
2. Click **Configure** for the **Redirect URL and Custom Message**.
3. On the pop-up page, enable **Redirect URL**.
4. Add the redirect URL in the field.
5. Click **Save**.

Every time a customer successfully completes a payment, they will be directed to the success page. Facebook pixel will track this event.

### Related Information

* [Payment Button](/payments/payment-button)
* [How Payment Button Works](/payments/payment-button/how-it-works)
