
At a glance
How it works
1
MGID sends the click
A visitor clicks your teaser. MGID opens your ClickFlare campaign URL and fills in its macros: the click ID in
click_id, the click price in click_price, plus the teaser, widget, campaign and other details.2
ClickFlare stores the MGID click ID
ClickFlare saves the value of
click_id as the visit’s External ID, records the click price as the visit’s cost, and redirects the visitor to your lander or offer.3
The conversion reaches ClickFlare
Your affiliate network, store or feed posts the conversion back to ClickFlare, matched on the ClickFlare click ID.
4
ClickFlare posts it back to MGID
ClickFlare fires the MGID postback, replacing
{external_id} with the stored MGID click ID and {payout} with the revenue. MGID matches it to the original click and records it under the goal named in e.The mirror to keep straight: in the campaign URL you write ClickFlare’s parameter (
click_id) and MGID’s macro ({click_id}). The template does this for you. In the postback URL you write MGID’s parameter (c) and ClickFlare’s token ({external_id}).Before you start
- Set up your own tracking domain. Run the campaign and the postback on your own custom domain. Shared domains get flagged by networks and blocked by browsers. See Custom Domains.
- Have an offer ready in ClickFlare, and its affiliate network set up to post conversions back to ClickFlare. See Creating an Offer and Adding an Affiliate Network.
- Plan your MGID conversion goals. MGID allows up to three per campaign: a main goal and two additional ones. Goal names may contain only Latin letters and numbers, for example
purchaseorlead1. No spaces, underscores or dashes. - Decide which conversions MGID should receive. MGID optimizes on what you send it. See Tracking several events.
Step 1 – Create the campaign and the MGID traffic source
- Go to Campaigns and click New.
- In Traffic Source, open the dropdown and click + New Traffic Source.
- Type
mgidin the search box and select the MGID template. - Enter a Name, for example
MGID. - Set Cost currency to the currency of your MGID account. The click price arrives in that currency.

widget_id is the one you will use most: it tells you which publisher placements convert, so you can block them or adjust their bids in MGID. teaser_id and title tell you which creative won.
For the visitor’s real country, use ClickFlare’s own geo data, not the geo column. MGID’s {geo} repeats your campaign targeting.
To pass more MGID data, click Add Parameter, give it a name and parameter, and enter the MGID macro as the TS Token. ClickFlare assigns the next free tracking field. MGID also offers {source}, {source_id}, {site_id}, {site_category} and {geo_region}, among others. Check MGID’s macro list before adding them.
Step 2 – Set up the postback
The postback is what sends conversions to MGID. It lives on the traffic source, so every campaign that uses this MGID traffic source sends conversions the same way.Get your client ID and goal name from MGID
The template’s postback needs two values from MGID: your client ID and the name of the conversion goal. MGID shows both in the postback URL it creates inside each campaign’s conversion tracking settings.- In MGID, create a campaign, or open an existing one and click its edit icon.
- Go to the Conversion tracking section and, on the Tracking settings tab, choose Postback.
- Add your conversion goal and give it a name, for example
purchase. Add up to two more goals if you track several events. - Optional: under the advanced settings, choose whether each goal counts unique or non-unique conversions. Unique is the default.
- In the Postback URLs section, click Get Postback URL next to the goal and copy it.
/postback/, and the goal name in e. You only need these two. The ClickFlare template already has the click ID and revenue tokens in place.
Keep the MGID tab open. You come back to it in Step 4.
Add the template’s postback in ClickFlare
- Back in the New Traffic Source form, scroll to Passing conversion info to traffic source.
- Turn on Traffic source postback URL. The template’s postback appears:
- Replace the two placeholders:
Leave
{external_id} and {payout} as they are. ClickFlare fills them in. With client ID 12345 and the goal purchase, the result is:
- In the dropdown on the left, choose the ClickFlare event that should fire the postback. Keep Conversions to send every conversion. If your final action is a custom conversion (for example
purchase), choose that instead. - Click Save. You are back in the campaign editor with the MGID traffic source selected.

c and e are mandatory. r is optional, but without it MGID doesn’t know your revenue. MGID shows revenue in your account’s currency, so send payouts in that currency. See Multicurrency in ClickFlare.
To learn what each postback token does, see How to Configure a Traffic Source S2S Postback URL.
Step 3 – Finish the campaign and copy its URL
- Name the campaign.
- Set the Cost Model. See Cost.
- Choose Redirect or Direct tracking. Redirect is the usual choice.
- Click Next and, on Destination, add your lander (optional) and your offer.
- Save, open Tracking, select your own tracking domain and copy the campaign URL.
click_id={click_id} and click_price={click_price}.
If you use a lander, its call-to-action must link to the ClickFlare click URL, not to the offer directly. Otherwise the visit reaches the offer without a ClickFlare click ID, and the conversion cannot be traced back to MGID.
See Creating a Campaign in ClickFlare.
Step 4 – Create the campaign in MGID
- Return to the MGID campaign from Step 2 and finish its targeting, budget and bid.
- In the tracking link settings, make sure
click_id={click_id}appears only once. The ClickFlare URL already carries it. Check the Tracking link preview to see the final link. - Click Publish.
- Create your ads and paste the ClickFlare campaign URL into each ad’s URL field.
Step 5 – Test the integration
MGID records test conversions separately from real ones.- In MGID, open the campaign’s ads. Hover over an ad image and click the eye icon to open the preview.
- Click the ad in the preview and complete the offer the way a real visitor would. Clicks from the preview are flagged as tests.
- In ClickFlare, check the visit. The External ID should hold an MGID click ID, not the literal text
{click_id}. - Go to Logs → Postback Status and filter by the campaign. A successful request to
a.mgid.comconfirms ClickFlare sent the postback. - In MGID, wait 5–15 minutes and check the Test conversions column in the campaign list. If it is missing, add it with Columns. It can take up to an hour.
Tracking several events
MGID tracks up to three goals per campaign, for example a lead, a deposit and a purchase. Each goal has its own postback, with its own name ine:
- In MGID, add a goal for each step. Note each goal’s name.
- In ClickFlare, create a custom conversion for each step, for example
leadandpurchase. - On the MGID traffic source, click + Another postback URL once per extra goal.
- In each postback, paste the template’s URL, replace
YOUR_CLIENT_IDwith your client ID andREPLACE_EVENT_NAMEwith that goal’s name. Map each postback to its ClickFlare event: theleadcustom conversion to thee=leadURL,purchasetoe=purchase. - Test each goal. MGID shows test conversions under each goal separately.
Rules for MGID goals
Rules for MGID goals
- Three goals at most: a main goal and two additional ones.
- One postback per goal. Don’t combine goals in one URL.
- Goal names use Latin letters and numbers only, and each name is unique.
- The
evalue must match the goal name in MGID exactly. - Choose unique or non-unique counting separately for each goal.
Sending only one event
Sending only one event
If MGID should only learn from your final sale, keep a single postback and map it to that event. Earlier steps (leads, add to carts) still show in ClickFlare. They just don’t reach MGID.To send a postback only for some conversions, for example only those above a certain payout, use Event filter under the postback to add conditions.
Cost
The template passes cost per click. MGID fills{click_price} with the price of each click, and ClickFlare stores it as the visit’s cost. In the campaign editor, set the Cost Model to Not Tracked. With no cost integration connected, ClickFlare then takes the cost from the click_price value in the URL. A fixed CPC would ignore MGID’s real bid. See Cost Models.
{click_price} is an estimate. MGID notes that some clicks are discounted after the fact and never charged, so the URL can overstate your spend. MGID recommends its API for actual figures.
For exact spend, use ClickFlare’s MGID cost integration. It pulls cost from MGID’s API at campaign, content and publisher level. You need your MGID email, password, Client API ID and access token. Once the integration exists, select it under Cost Integration on the MGID traffic source and keep the campaign’s Cost Model on Not Tracked. The integration then takes priority over the URL value. Set the integration’s timezone to match your MGID account, or costs will drift between days. See MGID Cost Integration.
To fix individual days by hand, use a manual cost upload. See also Traffic Source Cost Tracking.
Delayed revenue
If you run search arbitrage (RSOC or AFD) behind MGID, the feed reports revenue hours or days after the click. To pass that revenue to MGID once it arrives, see Sending Delayed Revenue to Traffic Sources.Troubleshooting
MGID shows no test conversions
MGID shows no test conversions
YOUR_CLIENT_IDis still in the postback, or the client ID belongs to another MGID account. Copy it from MGID’s Get Postback URL.REPLACE_EVENT_NAMEis still in the postback, oredoesn’t match the goal name in MGID exactly.- The postback still uses MGID’s
{click_id}instead of ClickFlare’s{external_id}. ClickFlare doesn’t know{click_id}and sends it as literal text. - The test click wasn’t made from the ad preview, so MGID didn’t flag it as a test.
Conversions show in ClickFlare but not in MGID
Conversions show in ClickFlare but not in MGID
- Traffic source postback URL is off on the MGID traffic source.
- Disable sending postbacks to traffic source is on in the campaign.
- The postback is mapped to a different event than the one the conversion logged. Check Logs → Event Logs to see which event was recorded.
- Check Logs → Postback Status: a failed request shows the status code MGID returned.
MGID shows conversions with no revenue
MGID shows conversions with no revenue
The postback has no
r={payout}, or r still holds MGID’s {revenue}. Use ClickFlare’s {payout}.Cost in ClickFlare doesn't match MGID
Cost in ClickFlare doesn't match MGID
{click_price} doesn’t account for clicks MGID discounts later. Connect the MGID cost integration and match its timezone to your MGID account.FREQUENTLY ASKED QUESTIONS
Q1: Can I use the same MGID traffic source for all my MGID campaigns?A1: Yes, if they use the same goal names. The postback is set once on the traffic source and every campaign using it sends conversions the same way. Create a second MGID traffic source only if a campaign needs different goals.
Q2: Why is it calledA2: They are two halves of the same value. ClickFlare reads MGID’s click ID from its ownclick_idin the campaign URL andcin the postback?
click_id parameter. MGID expects it back in its own c parameter. Both names are fixed. Change neither.
Q3: Can I rename my MGID goals later?A3: Yes, but update the
e value in the ClickFlare postback at the same time. A postback with an old goal name no longer matches.
Q4: Should I use Redirect or Direct tracking with MGID?A4: Redirect is the usual choice. Use Direct only if MGID must see your lander’s domain as the destination. See Direct Campaign Tracking.
Q5: Do I need the {click_price} cost row if I use the cost integration?
A5: No harm in keeping it. With the Cost Model on Not Tracked, the integration takes priority and the click_price value is ignored. If you ever disconnect the integration, the URL cost takes over again.
Related
MGID cost integration
Pull actual spend from MGID’s API.
Traffic source postbacks
Every token you can use in a postback.
Custom conversions
Split leads and sales into separate events.
Conversions not showing
The general checklist when postbacks don’t arrive.