1. Help Center Home
  2. Advertisers
  3. Conversion tracking: general

Macros. Setting up Non-standard Markup for Links to Track Traffic

Using a traffic analysis system, you can specify the markup that will be added at the end of each ad link. In the advertising campaign settings, select the required macros in the "Tracking Tags" block on the tracking setup step.

We can use the following macros:

  1. {teaser_id}: Unique ID of your ad;
  2. {title}: Ad title
  3. {widget_id}: ID of the source site;
  4. {campaign_id}: Campaign ID in the MGID system;
  5. {category_id}: ID of the ad category in the MGID system;
  6. {user_id}: User ID;
  7. {geo}: Countries selected in the campaign settings;
  8. {geo_region}: Cities or regions selected in the campaign settings;
  9. {click_id}: Click ID;
  10. {click_price}: Price per click*;
  11. {ifa}: Unique device identifier;
  12. {price_range}: Price range of the phone from which the click was made;
  13. {gdpr}: If the user accepts GDPR terms;
  14. {gdpr_consent}: If the user agrees to give GDPR consent;
  15. {referrer}: The URL from which the user was referred;
  16. {source}: This macro identifies the specific source (e.g., website, application, etc.) from which you receive traffic;
  17. {source_id}: This macro provides the unique identifier of the source (e.g., website, application, etc.) from which you receive traffic.

The macros {source} and {source_id} are now available for campaigns with Sources Optimization enabled. By default, the {source} macro will be populated in the utm_term parameter, allowing you to easily track and identify the traffic source in your reporting. You can also add these macros manually in your URL structures to see detailed traffic source data, including both the source name and the source ID within our system.

* When you use the {click_price} macro, keep in mind that a click may not be counted in the MGID system during the data analysis post factum. Consequently, the expenses will not be written off from the advertiser's balance. We recommend using our API to transfer the actual API metrics. 

Allowed characters:

0-9, a-z, -, _, =, +, &, /, :, ^, |

The unchanged macro must be inserted at the place in the link where you want to see the value of the corresponding variable.

Examples of using macros in existing campaigns:

  • Example 1: http://yourdomain.com/base.php?c=121&key=d0c1607d08bad2e6d7863430d1147d6d&keyword= {widget_id}&ad= {teaser_id}
  • Example 2: http://www.yourdomain.com/en-2/?A=8598&B=5682&SubAffiliateID=at_200x200_500-2_ {teaser_id}_ {widget_id}
  • Example 3: http://www.yourdomain.com/?id=461&tid= {teaser_id }&pid= {widget_id}
  • Example 4: http://www.yourdomain.com/en-2/?A=8598&B=5682&SubAffiliateID=at_200x200_500-2_ {teaser_id}_ {widget_id}
  • Example 5: http://yourdomain.com/_3K5dClZQ4U06nbr1audJf2Nd7ZgqdRLk/1/?sub_id= {widget_id} {teaser_id}