Skip to main content
MediaGo traffic source template MediaGo is Baidu’s native advertising platform. It places native ads on premium publisher sites worldwide, and you buy them on CPC. This guide sets up MediaGo as a traffic source in ClickFlare. It covers passing MediaGo’s click data into your reports and sending conversions, with payout and conversion type, back to MediaGo so its optimization and your stats agree. You do everything from the campaign editor. The MediaGo traffic source is created inline, without leaving the campaign.

At a glance

How it works

1

MediaGo sends the click

A visitor clicks your ad. MediaGo opens your landing page URL with your tracking string attached and fills in its macros: the tracking ID, the cost of the click, the ad, the asset, the site and other details.
2

ClickFlare stores the MediaGo tracking ID

ClickFlare saves the value of TRACKING_ID as the visit’s External ID, records the cost, and redirects the visitor to your lander or offer.
3

The conversion reaches ClickFlare

Your affiliate network or store posts the conversion back to ClickFlare, matched on the ClickFlare click ID.
4

ClickFlare posts it back to MediaGo

ClickFlare fires the MediaGo postback, replacing {external_id} with the stored tracking ID, {trackingField1} with the ad ID and {payout} with the revenue. MediaGo matches it to the original click.
The mirror to keep straight: in the campaign URL you write ClickFlare’s parameter (TRACKING_ID) and MediaGo’s macro (${TRACKING_ID}). The template does this for you. In the postback URL you write MediaGo’s parameter (trackingid) 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.
  • Know your MediaGo account name. It goes into the postback, so MediaGo support can find your requests in their logs.
  • Decide which conversion type MediaGo should count. MediaGo labels each conversion with a type (purchase, lead, registration…) and decides from a flag whether it counts in the main Conversions column. If your funnel has several steps, decide now which one is final. See Tracking several events.

Step 1 – Create the campaign and the MediaGo traffic source

  1. Go to Campaigns and click New.
  2. In Traffic Source, open the dropdown and click + New Traffic Source.
  3. Type mediago in the search box and select the MediaGo template.
  4. Enter a Name, for example MediaGo.
  5. Leave Cost currency on USD unless your MediaGo account is billed in another currency.
The template fills in the Parameters table for you: The MediaGo template's Parameters table in ClickFlare, with MediaGo's macros pre-filled Each tracking field becomes a column you can group reports by. SITE_ID and PUBLISHER_NAME show which placements convert, so you can block or bid on sites in MediaGo. AD_ID and ASSET_ID show which creatives work.
Don’t change or remove the External ID row. Without ${TRACKING_ID} in the URL, MediaGo cannot match conversions. Also keep the AD_ID row on {trackingField1}: the template’s postback reads the ad ID from that field.
To pass more MediaGo data, click Add Parameter, give it a name and parameter, and enter the MediaGo macro as the TS Token. ClickFlare assigns the next free tracking field. MediaGo also offers ${CAMPAIGN_NAME}, which the template leaves out.

Step 2 – Set up the postback

The postback is what sends conversions to MediaGo. It lives on the traffic source, so every campaign that uses this MediaGo traffic source sends conversions the same way.

What MediaGo’s postback expects

MediaGo documents one postback endpoint with these parameters: MediaGo’s conversion types:

Add it to the traffic source in ClickFlare

  1. Back in the New Traffic Source form, scroll to Passing conversion info to traffic source.
  2. Turn on Traffic source postback URL. The template’s postback appears:
The Traffic source postback URL switched on, showing the MediaGo template's postback It already sends the tracking ID ({external_id}), the ad ID ({trackingField1}) and the payout ({payout}), all as ClickFlare tokens.
  1. Replace the three REPLACE values:
    • conversiontype=REPLACE: the number for your conversion, for example 8 for Purchase or 10 for Lead.
    • includeintotalconversion=REPLACE: 1 for your final conversion.
    • accountname=REPLACE: your MediaGo account name.
    For a purchase, the result looks like this:
  1. 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.
  2. Click Save. You are back in the campaign editor with the MediaGo traffic source selected.
Replace all three REPLACE values. MediaGo expects a number in conversiontype and 0 or 1 in includeintotalconversion. A postback that still carries REPLACE sends invalid values, and the conversion may be dropped or filed under the wrong type.
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

  1. Name the campaign.
  2. Set the Cost Model to Not Tracked, so ClickFlare uses the cost MediaGo passes. See Cost.
  3. Choose Redirect or Direct tracking. Redirect is the usual choice for MediaGo.
  4. Click Next and, on Destination, add your lander (optional) and your offer.
  5. Save, open Tracking, select your own tracking domain and copy the campaign URL.
The campaign URL already contains every MediaGo macro from the template, for example TRACKING_ID=${TRACKING_ID} and SITE_ID=${SITE_ID}. 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 MediaGo. See Creating a Campaign in ClickFlare.

Step 4 – Create the campaign in MediaGo

MediaGo takes the URL in two parts. Its Tracking field cannot contain ?, @, #, /, spaces or line breaks, so you split the ClickFlare campaign URL at the ?.
  1. In MediaGo, click Create Ad in the navigation bar and set up the campaign as usual.
  2. In the Landing page URL field, paste the part of the ClickFlare campaign URL before the ?.
  3. On the Create Ad Set page, scroll to the Tracking field at the bottom and paste the part after the ?. Don’t include the ? itself.
  4. Save the campaign and submit it for review.
The first part is your tracking domain and the campaign’s path. The second part is the list of parameters, such as CPC=${CPC} and TRACKING_ID=${TRACKING_ID}, joined by &. Check that the tracking string still contains TRACKING_ID=${TRACKING_ID} after pasting. MediaGo adds the tracking string to the landing page URL and replaces each ${...} macro when the ad is clicked.

Step 5 – Test the integration

  1. Once the ad is live, click it yourself and look at the URL that opens. No ${...} text should remain, and TRACKING_ID should hold a long alphanumeric value.
  2. In ClickFlare, check that the visit shows up in the campaign with the cost and tracking fields filled.
  3. Complete the offer the way a real visitor would.
  4. In ClickFlare, go to Logs → Postback Status and filter by the campaign. Open the postback to sync.mediago.io and check that trackingid holds the tracking ID, and that conversiontype, includeintotalconversion and accountname hold your values, not REPLACE.
  5. In MediaGo, check that the conversion appears in the dashboard under the expected conversion type, and in the total if you sent 1.
If you use a lander, test the whole path. The tracking ID can be lost at any redirect between the ad and the offer.

Tracking several events

MediaGo can record several funnel steps, for example a lead and a purchase. Each step needs its own postback with its own conversiontype. Send intermediate steps with includeintotalconversion=0 and only the final step with 1. Otherwise every step counts as a conversion in MediaGo and your conversion rate is inflated.
  1. In ClickFlare, create a custom conversion for each step, for example lead and purchase.
  2. On the MediaGo traffic source, click + Another postback URL once per extra event.
  3. Map each postback to its ClickFlare event: lead to the conversiontype=10 URL, purchase to the conversiontype=8 URL.
  4. Test each event and check it in Logs → Postback Status.
  • One postback per event. Don’t combine types in one URL.
  • Use the numbers from MediaGo’s conversion type table. Other values are not documented.
  • Only the final step gets includeintotalconversion=1. Intermediate steps still show in their own conversion type column.
  • Keep trackingid={external_id} in every postback.
If MediaGo 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 MediaGo.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. The Cost row sends MediaGo’s ${CPC} macro, the CPC of the ad, and ClickFlare records it as the visit’s cost. On the campaign, set the Cost Model to Not Tracked so ClickFlare uses the cost passed in the URL. For exact spend, add ClickFlare’s MediaGo cost integration. It pulls cost from MediaGo’s API every hour. You need a MediaGo API token, which you request from your MediaGo account manager or support. Once the integration exists, select it under Cost Integration on the MediaGo traffic source, and set the integration’s timezone to match your MediaGo account. See MediaGo Cost Integration.
Don’t create several cost integrations with the same MediaGo API token. Parallel requests can hit MediaGo’s API rate limit.
When the recorded spend differs from your MediaGo spend, correct it with a manual cost upload. See Cost Models.

Delayed revenue

If you run search arbitrage (RSOC or AFD) behind MediaGo, the feed reports revenue hours or days after the click. To pass that revenue to MediaGo once it arrives, see Sending Delayed Revenue to Traffic Sources.

Troubleshooting

  • The tracking string in MediaGo’s Tracking field is missing TRACKING_ID=${TRACKING_ID}, or the macro was edited. Copy it from the ClickFlare campaign URL again.
  • The postback uses MediaGo’s ${TRACKING_ID} instead of ClickFlare’s {external_id}. MediaGo’s macros only work in the click URL, not in the postback.
  • The External ID row was removed from the traffic source.
  • A REPLACE value is still in the postback.
  • Traffic source postback URL is off on the MediaGo 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 MediaGo returned.
The postback sends includeintotalconversion=0. Change it to 1 for your final conversion.
  • The Tracking field contains a ?, /, #, @ or space. Paste only the part of the campaign URL after the ?, and put the rest in Landing page URL.
  • The URL was edited after copying. Paste it from ClickFlare unchanged. See Traffic Source Tokens Arriving Empty.
${BID_TIME_STAMP} is in UTC+8. Convert it before comparing with ClickFlare’s visit times.
For the general checklist, see Conversions not showing.
FREQUENTLY ASKED QUESTIONS
Q1: Can I use the same MediaGo traffic source for all my MediaGo campaigns?
A1: Yes. The postback is set once on the traffic source and every campaign using it sends conversions the same way. Create a second MediaGo traffic source only if a campaign needs a different postback, for example a different conversion type.
Q2: Why is it TRACKING_ID in the campaign URL and trackingid in the postback?
A2: They are two halves of the same value. ClickFlare reads MediaGo’s tracking ID from its own TRACKING_ID parameter. MediaGo expects it back in its own trackingid parameter. Change neither.
Q3: Do I need both the ${CPC} macro and the cost integration?
A3: No. The macro gives you cost per click as soon as traffic starts. The integration pulls spend from MediaGo’s API every hour and is the more exact of the two. Use the integration if you can.
Q4: Should I use Redirect or Direct tracking with MediaGo?
A4: Redirect is the usual choice. Use Direct only if MediaGo must see your lander’s domain as the destination. See Direct Campaign Tracking.
Q5: What if I leave accountname out?
A5: MediaGo marks it as recommended, not required. The conversion still counts. MediaGo support uses it to find your requests in their logs, so keep it if you can.

MediaGo cost integration

Pull your MediaGo spend into ClickFlare automatically.

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.