AI resources

Ads conversion

Ads conversion analysis allows you to evaluate the return on your commercial campaigns. Checkout Pro offers integration with Facebook Ads and Google Ads, allowing you to associate payments with your campaigns.

Only instantly approved payments with credit and debit cards or Mercado Pago cash will be associated.

Facebook Ads

To associate an order with a Facebook Ads pixel, include the config.online.tracks parameter with the type facebook_ad and the corresponding pixel_id when sending the request to the Create orderAPI endpoint.

Only one pixel can be configured per order. For more information, visit the official Facebook site.

curl

curl -X POST \
    -H 'accept: application/json' \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer ENV_ACCESS_TOKEN' \
    -H 'X-Idempotency-Key: UNIQUE_KEY' \
    'https://api.mercadopago.com/v1/orders' \
    -d '{
  "type": "online",
  "processing_mode": "manual",
  "total_amount": "1000.00",
  "external_reference": "order_pro_123",
  "payer": {
    "email": "buyer@email.com"
  },
  "items": [
    {
      "title": "My product",
      "unit_price": "1000.00",
      "quantity": 1,
      "unit_measure": "unit",
      "total_amount": "1000.00"
    }
  ],
  "config": {
    "online": {
      "tracks": [
        {
          "type": "facebook_ad",
          "values": {
            "pixel_id": "PIXEL_ID"
          }
        }
      ]
    }
  }
}'

Once the configuration is complete, a purchase event will be associated with the specified pixel when a payment originated by your ad is approved.

Google Ads

To associate an order with a Google Ads tag, include the config.online.tracks parameter with the type google_ad and the conversion_id and conversion_label values available in your Google account when sending the request to the Create orderAPI endpoint.

Only one tag can be configured per order. For more information about Google Ads conversion tags, visit the official Google site.

curl

curl -X POST \
    -H 'accept: application/json' \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer ENV_ACCESS_TOKEN' \
    -H 'X-Idempotency-Key: UNIQUE_KEY' \
    'https://api.mercadopago.com/v1/orders' \
    -d '{
  "type": "online",
  "processing_mode": "manual",
  "total_amount": "1000.00",
  "external_reference": "order_pro_123",
  "payer": {
    "email": "buyer@email.com"
  },
  "items": [
    {
      "title": "My product",
      "unit_price": "1000.00",
      "quantity": 1,
      "unit_measure": "unit",
      "total_amount": "1000.00"
    }
  ],
  "config": {
    "online": {
      "tracks": [
        {
          "type": "google_ad",
          "values": {
            "conversion_id": "CONVERSION_ID",
            "conversion_label": "CONVERSION_LABEL"
          }
        }
      ]
    }
  }
}'

Once the configuration is complete, a conversion will be associated with the specified tag when a payment originated by your ad is approved.