All networks
MGID logo
Tracking reference · Native

MGID tracking tokens & macros

On MGID, your spend is spread across many publisher widgets, and MGID generates a unique click id for every ad click. Append the macros below to your destination URL and ValidVisit attributes every visit to the exact widget that served it, then judges each of those visits Valid or Invalid, with its evidence.

Cross-check any macro against the network’s official documentation. MGID official docs →

5
MGID macros mapped to attribution
2
required for attribution
no-hop
one script, no link rewriting
Valid / Invalid
a verdict on every visit

MGID fills the curly-brace macros at click time, so attribution is just a matter of which tokens you append. The required {click_id} gives each visit a unique, network-issued identifier that ValidVisit ties back to MGID, while {widget_id} is the token that actually names the publisher widget your click came from. Add {campaign_id} (required) to separate campaigns and {teaser_id} if you also want to see which creative pulled the click. These are plain URL parameters, so MGID's macros resolve to real values automatically once the link goes live.

Granularity at the {widget_id} level is what makes the data actionable: instead of an average across the whole campaign, you see the invalid share of each individual widget, so the invalid traffic and bots hiding inside one or two bad widgets stop dragging down the rest. ValidVisit judges after the visit arrives and never switches a widget off for you. When a widget's invalid share climbs you act in MGID yourself, opening the campaign's Widget optimization tab, checking the widget UIDs and clicking the pause icon. On campaigns with Sources Optimization, an option you enable when creating a campaign, you switch the source off in the Sources Optimization tab instead, and {source} and {source_id} are the macros that name it.

MACRO MAP

MGID macro → ValidVisit param

Campaign ID *campaign
MGID macro
{campaign_id}
ValidVisit param
vv_campaign_id
Example
55501
Teaser (Creative)creative
MGID macro
{teaser_id}
ValidVisit param
vv_creative_id
Example
99012
Source IDpublisher
MGID macro
{source_id}
ValidVisit param
vv_publisher_id
Example
1234
Widget IDplacement
MGID macro
{widget_id}
ValidVisit param
vv_placement_id
Example
5678
Click ID *click
MGID macro
{click_id}
ValidVisit param
vv_click_id
Example
ck_77

* required for MGID attribution.

TRACKING URL

Ready-to-use MGID tracking parameters

mgid tracking parameters
utm_source=mgid&utm_medium=native&vv_campaign_id={campaign_id}&vv_creative_id={teaser_id}&vv_publisher_id={source_id}&vv_placement_id={widget_id}&vv_click_id={click_id}

In MGID, paste these into the Tracking Tags block of the campaign, and keep the ad’s own URL as your plain landing page. MGID adds them to every click and fills the macros, so every visit arrives attributed and ready to judge.

Using MGID tokens?

See which MGID sources send bots.

  • Every visit judged Valid or Invalid, worst source first.
  • Attributed through the MGID tokens above, down to the placement.
  • Works beside your tracker, with nothing added to the click path.

Just your email · no card · unsubscribe anytime · privacy policy

MGID traffic quality →
deal-alerts.example71% invalid
zone 447123% invalid
premium-news.example2% invalid
WHAT IT JUDGES BY

What MGID tokens let you break bots down by

Breakdown the tokens allow
  • Source ID — The source (a domain or app): the unit you switch off on campaigns with Sources Optimization, the default for new campaigns.
  • Widget ID — The widget: the unit you pause on campaigns that still use the Widget optimization tab.

Carries a per-click id, stored with each visit so a verdict traces back to the click.

Where you can act, in MGID
  • IP exclusiondocumented
  • Device targetingdocumented
  • OS targetingdocumented
  • Browser targetingdocumented
  • Connection typedocumented
  • Languagedocumented

Tokens last verified against MGID’s docs on 2026-10-02.

Found a bad source (new campaigns) or widget? Exclude it in MGID

Buyer checks the offending widget UIDs in the Widget optimization tab and clicks the pause icon to exclude them, or bulk-uploads a CSV of UIDs via Import → Widget Blocklist (max 1,000 widgets per import). On a campaign with Sources Optimization the buyer turns the source OFF in the Sources Optimization tab, which adds it to that campaign’s Sources Blocklist.

Campaign → Widget optimization tab (MGID Ads dashboard), or the Sources Optimization tab on campaigns created with Sources Optimization (an option when creating a campaign); also Rules-Based Optimization for auto-blocking
Step-by-step →
FAQ

MGID tracking token FAQs

Which token tells me which publisher the traffic came from?+

{widget_id}. MGID widgets are the publisher placements your ads run on, so {widget_id} is the token ValidVisit groups verdicts by when you want to judge a sub-source. {teaser_id} identifies the creative and {campaign_id} the campaign, but the widget is the unit you act on. On campaigns with Sources Optimization the unit is the source, passed by {source} and {source_id}.

Do I need a funnel hop or click tracker to use these?+

No. These are ordinary URL parameters. Add them in the campaign's Tracking Tags block and MGID substitutes the real values into the curly-brace macros at click time, so {click_id} and {widget_id} arrive populated without any extra hop.

Where do I act once ValidVisit flags a bad widget?+

In MGID, not in ValidVisit. ValidVisit never edits your MGID campaign; you open the campaign's Widget optimization tab, check the widgets with a high invalid share and click the pause icon, or bulk-upload their UIDs via Import → Widget Blocklist. On a campaign with Sources Optimization you turn the source off in the Sources Optimization tab.

Is MGID traffic real? See how ValidVisit judges every MGID visit for bot traffic.
deal-alerts.example71% invalid
zone 447123% invalid
premium-news.example2% invalid

Judge every MGID visit — and find the fake ones.

See which MGID publishers and placements send real buyers vs. bots.

Just your email · no card · unsubscribe anytime · privacy policy

Join the waitlist with just your email · 7-day trial at launch

One script · no cookies · no device IDs · raw IP never stored