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

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

If you use a traffic analysis system that does not process standard UTM parameters, you can specify the required markup that will be added at the end of each ad link by clicking on the "UTM Tracking Tags" option in the advertising campaign settings. 

Our system allows you to add macros to the ad URL.

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};
  17. {source_id}
This macro is only available for mobile devices. The format of the values that are transmitted to the macro:
  • Below150$
  • 150$to200$
  • ...
  • Above700$
  • Undefined

If the device type is desktop, tablet, or smart TV, the transmitted value is "null."

* 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}