Skip to Content
Track your Telegram conversions with Meta Ads - Get started in minutes!
Meta IntegrationCAPI Events

CAPI Events

This guide explains how to configure the Conversions API events AdTarget sends to Meta when users join your Telegram channel.

When Are CAPI Events Sent?

AdTarget sends a CAPI event to Meta only for attributed joins — meaning joins where AdTarget can match the Telegram join back to a specific ad click on your landing page. This requires the invite_link to be present in Telegram’s webhook.

CAPI events are sent when a user clicks your tracked invite link and Telegram reports it in the webhook (reliable for private channels).

CAPI events are NOT sent for organic joins — users who find your channel via search, direct links, or forwarded messages. These joins still appear in your AdTarget dashboard but are marked as “organic.”

Public channel limitation: Due to a Telegram API limitation, even users who click your tracked link may be treated as organic joins on public channels. Telegram’s app (especially Android) often converts invite-link joins into “direct joins” for public channels, stripping the attribution data. Learn more →

Available Event Types

AdTarget can send these standard Meta events:

EventBest ForMeta Optimization
LeadLead generation campaignsOptimizes for lead intent
PurchasePurchase-focused campaignsOptimizes for purchase actions
CompleteRegistrationSignup-focused campaignsOptimizes for registration actions
SubscribeSubscription campaignsOptimizes for subscription intent
CustomCustom event nameFor specialized tracking needs

Choosing the Right Event

Running lead gen ads? Use Lead — This tells Meta “this person became a lead.”

Selling a product or service? Use Purchase — Best when you want Meta to optimize for buyers. Pair it with a value and currency in your channel’s conversion config for value-based optimization.

Running signup campaigns? Use CompleteRegistration — Signals a completed signup action.

Promoting a channel subscription? Use Subscribe — Matches the user action (joining = subscribing).

Need a non-standard event? Use Custom — Lets you define your own customEventName for specialized tracking scenarios that don’t fit the standard types.

Tip: Match your event type to your campaign objective in Ads Manager for best results.


Configuring Events

Event types are configured per channel. Each channel defaults to Lead when first detected.

To change a channel’s event type:

  1. Go to your site’s SettingsChannels tab
  2. Click Setup (or Edit) on the channel row
  3. Select your event type in the dialog
  4. Click Save

Event Parameters

Each event AdTarget sends includes these parameters:

Required Parameters

ParameterDescription
event_nameThe event type (Lead, etc.)
event_timeUnix timestamp of the join
action_sourceAlways “website”

Attribution Parameters

ParameterDescription
fbcClick tracking cookie (contains the fbclid from the ad click, formatted as fb.1.{timestamp}.{fbclid})
fbpBrowser tracking cookie value (Meta browser ID)

User Data

If available, AdTarget sends user data for matching:

ParameterSourceHashed?
external_idTelegram user IDYes (SHA-256)
client_ip_addressIP from landing page visitNo (sent as-is)
client_user_agentBrowser from landing page visitNo (sent as-is)

The external_id (Telegram user ID) is SHA-256 hashed before sending, as recommended by Meta. Other parameters like IP address and user agent are sent as-is, which is consistent with Meta’s CAPI specifications for these fields.

Custom Data

AdTarget also sends these fields inside the custom_data object of each CAPI event:

ParameterDescription
event_source_urlLanding page URL (constructed from site domain + visit path)
valueEvent value (if configured per channel)
currencyCurrency code (defaults to "USD")
content_nameChannel title or custom name from channel config

Event Deduplication

AdTarget includes a unique event_id with each event to prevent duplicates:

event_id: "adtarget_{conversion_id}"

This ensures the same conversion isn’t counted twice, even if retried.


Testing Events

Validation Test Event

When you save your pixel during setup, AdTarget automatically sends a PageView test event with the code ADTARGET_TEST. You can see this in Meta Events Manager under the Test Events tab — it confirms your pixel ID and access token are working.

Test in Production

The most reliable way to test end-to-end:

  1. Click your own ad (or use a test ad)
  2. Visit your landing page
  3. Join your Telegram channel via the tracked invite link
  4. Check Events Manager within 5 minutes

Event Matching

Meta matches your events to users for attribution. Higher match quality = better optimization.

Match Quality Factors

FactorImpact
fbc present (contains fbclid)High - Direct click attribution
User agent + IPMedium - Probabilistic matching
External IDMedium - Cross-device matching

Improving Match Quality

  1. Capture fbclid: Ensure your landing page URL preserves the fbclid parameter
  2. Send events promptly: Shorter time between click and conversion improves matching
  3. Consistent user journey: Keep users on your domain before redirecting to Telegram

Common Event Configurations

Lead Generation

Event Type: Lead When: User joins channel Use Case: "Get subscribers" campaigns

Purchase Tracking

Event Type: Purchase When: User joins channel Use Case: "Buy now" campaigns with value-based optimization

Content Subscription

Event Type: Subscribe When: User joins channel Use Case: "Subscribe to channel" campaigns

Multi-Channel Setup

Channel A (free content): Lead Channel B (premium): Purchase Channel C (subscription): Subscribe

Troubleshooting

Events not matching?

  • Check fbclid is in the landing page URL
  • Verify Meta Pixel is also on the landing page
  • Ensure cookies aren’t blocked

Event quality score is poor?

  • Increase the data you send (IP, user agent)
  • Reduce time between click and conversion
  • Verify fbclid is being captured

Duplicate events?

  • AdTarget handles deduplication automatically
  • If seeing duplicates, contact support

Best Practices

  1. Match event type to campaign objective for better optimization
  2. Use the same event type consistently within a campaign
  3. Monitor event quality in Events Manager weekly
  4. Test before scaling ad spend

Next Steps

Your Meta integration is complete! Start running ads and watch your conversions flow into Meta.

Need help optimizing? Contact our support team.

Last updated on

CAPI Events | AdTarget Docs