MGID postback: send affiliate conversions back to MGID

November 28, 2026 · Hoplytic team · 5 min read

The short version: this guide in 85 seconds.
Read the video transcript

How do you tell MGID which clicks turned into sales? With a postback, so you and MGID can see which widgets pay.

The tracking URL is where MGID sends the visitor, with its macros. The postback URL is where your tracker reports the sale, back to MGID.

Add three macros to your MGID tracking URL. The click ID, which the postback needs, the widget you optimize by, and the teaser, which is the ad.

In the campaign's Conversion tracking section, choose Postback. Add up to three goals, named with Latin letters and numbers. The name is sent as e. Choose manual setup, click Get Postback URL, and save.

MGID's postback URL already holds your client ID. C is the stored click ID, and e is a goal name that must match. R is your commission, needed for revenue and ROI in MGID.

Don't leave MGID's placeholder text in c and r. Use your tracker's own tokens.

Group by widget. Give each enough clicks to expect two or three sales, block those with none, and raise bids where ROAS beats target.

Pick MGID in the link maker and the macros are added for you. Under Send back, add MGID and paste its postback URL. Sales go out within about twenty seconds.

The full guide is right below. Hoplytic: ad tracking made simple.

Key points

MGID's native traffic is spread across thousands of widgets on publisher sites, and the gap between the best and worst widgets is large. A postback tells MGID which clicks turned into sales, so both you and MGID's optimization can see which widgets pay.

Short answer: add click={click_id}&widget={widget_id}&teaser={teaser_id} to your MGID tracking URL, create up to three goals under the campaign's Conversion tracking settings with the Postback option, copy the URL from Get Postback URL, and have your tracker call https://a.mgid.com/postback/<your ID>?c=<stored click ID>&e=sale&r=<commission> for each sale.

New to postbacks? Read what a postback URL is first. For other native networks, see the Outbrain and Taboola versions.

Two URLs, two directions

MGID's help center makes a point worth repeating, because it trips up a lot of first setups:

The click ID flows out on the first and comes back on the second. If either side is missing, nothing matches.

Step 1: macros on the tracking URL

MacroWhat it is
{click_id}MGID's unique click ID. Required for the postback.
{widget_id}The widget (placement) that showed your ad. The value you optimize by.
{teaser_id}The ad (teaser) that was clicked.

Example: https://go.yoursite.com/keto?click={click_id}&widget={widget_id}&teaser={teaser_id}. The parameter names on the left (click, widget) are yours to choose; your tracker just has to know which one holds the click ID. More macros in the MGID macros reference. If you pick a tracker template inside MGID instead of manual setup, MGID adds the click ID parameter for you.

Step 2: create the goals

  1. Create or edit the campaign and go to the Conversion tracking section.
  2. On the Tracking settings tab, choose Postback.
  3. Add up to three goals. Name each one with Latin letters and numbers only, for example lead, deposit, sale. The name is sent automatically as the e parameter.
  4. Optionally enter a conversion cost per goal.
  5. Choose Manual setup (or a tracker template if yours is listed), click Get Postback URL, and save the campaign.

Step 3: the postback URL

https://a.mgid.com/postback/123456?c=8f3e1a9b2c&e=sale&r=24.50
PartMeaning
123456Your MGID client ID, already in the URL MGID gives you.
cThe click ID you stored from {click_id}. Required.
eThe goal name. Required, and it must match one of your goals.
rRevenue: your commission for this conversion. Optional, but needed for revenue and ROI in MGID.

In manual setup, MGID shows placeholders in c and r. Replace them with your tracker's own tokens for "the source click ID" and "the payout". A common mistake is leaving MGID's placeholder text in place, so MGID receives the literal word instead of a click ID.

Currency

MGID shows revenue only in the currency of your MGID account. If your account is in USD and the network pays you in EUR, convert before sending, or set your tracker to send a converted value. Otherwise ROI in MGID will be wrong by the exchange rate.

Unique or non-unique

By default MGID counts conversions as unique: one conversion per click per goal. Keep that for most offers. Switch a goal to non-unique (under the goal's advanced settings) only when one visitor really can earn you several commissions, such as repeat deposits. Non-unique counting with a network that sends a pending and then an approved postback for the same sale will double your numbers.

Step 4: test the flow

  1. Use MGID's test conversion flow (described in its help center as "Test conversion flow in MGID Ads") or click your own ad.
  2. Check your tracker stored a real click ID in the click parameter, not the text {click_id}.
  3. Trigger a test sale or a test postback from the network to your tracker.
  4. Confirm the tracker called a.mgid.com with that click ID and the right goal name, then look for the conversion in the campaign's stats.

Then: optimize by widget

With conversions flowing, group your report by widget. A sensible routine:

More on picking the cut-off in when to cut a placement, and on bot-heavy widgets in bot clicks on affiliate links.

Using the three goals well

Three goals per campaign is enough for most funnels if you plan them before launch:

Your tracker has to send the right goal name for each network event. If the network only reports one event type, only one goal will ever fire.

Doing it in Hoplytic

Pick MGID in the link maker and {click_id}, {widget_id} and {teaser_id} are added to the link. Under Send back, add MGID and paste the postback URL from MGID with {source_click_id} in c and {payout} in r. Each sale from MGID clicks is sent within about 20 seconds of the network reporting it, and reports group by widget with cost, profit and ROAS when your link carries a cost value.

Pick the ad platform and its macros are added to your tracking link.

Questions people ask

What does an MGID postback URL look like?

It has the form https://a.mgid.com/postback/CLIENT_ID?c=CLICK_ID&e=GOAL_NAME&r=REVENUE, where CLIENT_ID is your own MGID ID. Copy the exact URL from Get Postback URL in the campaign's Conversion tracking settings.

What is the MGID click ID macro?

{click_id}. Add it to your campaign's tracking URL with a parameter name your tracker reads, for example click={click_id}. MGID replaces it with a unique ID on every click.

How many conversion goals can MGID track by postback?

Up to three per campaign, for example lead, deposit and sale. Each goal's name is sent in the e parameter.

In which currency should I send revenue to MGID?

MGID displays revenue only in the currency of your MGID account, so send r in that currency. If your network pays in another currency, convert it first or your ROI figures will be off.

More in Conversion tracking

Also: tracking glossary · ad platform macros · Markdown copy