Skip to content

Pagar.me Integration

Learn how to set up OneClick Tracking on Pagar.me.

OneClick Tracking is a feature for Meta Ads advertisers who take their store’s or website’s payments through Pagar.me. It provides immediate, accurate conversion tracking.

This solution corrects wrong attributions made by Meta, delivering real data based on UTMs and enabling safer scaling decisions.

With OneClick Tracking you see the volume of real conversions per period right in your Ads Manager, making for a quick, clear audit without complicated dashboards that need to be kept up to date.

Using Pagar.me’s order webhook, OneClick takes into account the UTMs your website writes into the order as well as Meta’s data, without duplicating conversions.


How to Plug OneClick Tracking into Pagar.me

Section titled “How to Plug OneClick Tracking into Pagar.me”
  1. Log in to your OneClick Ads account.

  2. Go to the "OneClick Tracking" tab, available in the left sidebar of OneClick Ads.

    The OneClick Tracking tab in the OneClick Ads sidebar, with the New Integration card

  3. Click "New Integration".

  4. Select the "E-commerce" product type and click Continue.

  5. Select the "Pagar.me" platform and click Continue.

  1. Copy the Webhook URL generated by OneClick and register it in Pagar.me by following the steps below: a. Each ad account will have a unique link generated automatically. b. This link is what connects your account to Pagar.me and tracks conversions by UTM.

    6.1. Open the Pagar.me Dashboard and go to Configurações → Webhooks (Settings → Webhooks).

    6.2. Create a new webhook and, in the URL field, paste the tracking URL provided by OneClick.

    6.3. In the events, check order.paid (order paid). This is the event that generates the conversion.

    6.4. Save the webhook.

  1. Copy the UTM Script generated in OneClick Tracking.

    The UTM parameters step of OneClick Tracking, with the parameter to copy

    7.1. Paste it into the "URL parameters" field in ALL of your ads in Ads Manager, as shown below:

    The URL parameters field of an ad in Meta Ads Manager

  1. Write the UTMs into the Pagar.me order: a. Add the UTM Pass-Through Script to all your sales pages, so the UTMs are carried to the checkout page. You can install it via Google Tag Manager or, preferably, directly in your site’s header. b. At checkout, when creating the order through the Pagar.me API, send the URL’s UTMs in the order’s metadata object, with these names: utm_source, utm_medium, utm_campaign, utm_content and utm_term (the src and sck parameters are read too). For example: "metadata": { "utm_source": "facebook", "utm_campaign": "120210000000000", "utm_content": "120210000000001" }. c. If your checkout runs on a platform that uses Pagar.me underneath, check whether it has its own OneClick Tracking integration: that is the simpler path.
  1. Set the Attribution Mode.

    The Attribution Mode step of OneClick Tracking

  2. Set the Naming Convention that your campaigns, ad sets and ads will receive in your Ads Manager and click next.

The Campaign Naming step of OneClick Tracking Analysis periods and the Naming Convention preview


Wait at least 24 hours for the setup to take effect, and all your campaigns (those that receive conversions) will start recording conversions right inside Ads Manager.

Campaigns with the OneClick Tracking prefix in Ads Manager


  • OneClick Tracking records the order total (shipping included), in the order’s currency (Brazilian Real).
  • Each order is recorded once, by its Pagar.me order id, even if the webhook is resent.
  • Subscriptions (invoices and renewals) are not recorded by this integration.
  • Only campaigns created after the setup will have access to the “Maximum Period” data. This does not affect OneClick Ads optimization on older campaigns in any way.
  • Keep at least one ad identifier (ad.id) in the UTM parameters — it is what lets OneClick Tracking match the conversion to the right campaign, ad set and ad. If the order does not carry the UTMs in metadata, the sale cannot be attributed.