Macros are special labels or markers used in click and inpression URLs to get additional information about ad conversions.
For example, in this Click URL template:
https://trk.mail.ru/c/a12345/?idfa={mt_idfa}&clickId={clickId}&sub1={mt_sub1}
macros are the following:
{mt_idfa}
— device identifier{clickId}
— identifier of the attribution click{mt_sub1}
— information on ad campaign
When generating the final Click URL that will be shown to the user,
macros must be replaced with specific values.
For example, the above template may turn into such a URL:
https://trk.mail.ru/c/a12345/?idfa=AAAAAAAA-AAAA-AAAA-AAAA-AAAAAAAAAAAA&clickId=click123&sub1=offer1
with following replacements:
{mt_idfa}
→ AAAAAAAA-AAAA-AAAA-AAAA-AAAAAAAAAAAA
{clickId}
→ click123
{mt_sub1}
→ offer1
Your partner will replace macros with specific values. Usually, the replacement process is automated. To be able to do this, your partner needs to know what macros are used in URLs.
Some partners may work with default macros provided by MyTracker (see MyTracker macros). For other partners, MyTracker macros in the URL need to be replaced with their own macros (see partner macros).
For more details on Click URL structure and sources of its parameters, refer to Click and Impression URLs
If a partner uses the own macros in the tracking links, you should configure macros in MyTracker.
For integrated partners (indicated by the symbol ), macros are set by default. If you need to modify it, contact our support team
For non-integrated partner that you have connected yourself, you can set up macros as follows:
For instance, your partner has provided you with the following information:
%%IDFA%%
macro%%CLICK_ID%%
macro%%OFFER%%
macroThis means that you need to fill the Macros form as follows.
As a result, all tracking links for the partner will include the specified replacements. And the already created links will be updated automatically.
For example, the URL templates on the tracking link view page shown below:
https://trk.mail.ru/c/a12345/?idfa={mt_idfa}&clickId={clickId}&sub1={mt_sub1}
will be modified as follows:
https://trk.mail.ru/c/a12345/?idfa=%%IDFA%%&clickId=%%CLICK_ID%%&sub1=%%OFFER%%
This makes replacing familiar macro markers,
such as %%IDFA%%
, with specific values an easy job for your partner.
List of MyTracker macros that can be used in tracking links:
Macros | Description | Example |
---|---|---|
{mt_idfa} | Device IDFA (only iOS) | 82706CAC-3B4C-4C76-A9CB-B23F80D87692 |
{mt_waid} | Device WAID (only Windows) | 82706CAC-3B4C-4C76-A9CB-B23F80D87692 |
{mt_gaid} | Device advertising id or GAID (only Android) | 82706CAC-3B4C-4C76-A9CB-B23F80D87692 |
{mt_gaid_lc} | Lowercased device advertising id or GAID (only Android) | 82706cac-3b4c-4c76-a9Cb-b23f80d87692 |
{mt_idfa_or_gaid} | IDFA, or advertising_id (GAID): depends on the platform (Android/iOS) | 82706CAC-3B4C-4C76-A9CB-B23F80D87692 |
{mt_idfa_upper_or_gaid_lower} | Uppercased IDFA, or lowercased GAID, depends on the platform (Android/iOS) | 82706CAC-3B4C-4C76-A9CB-B23F80D87692 |
{mt_android_id} | Device android_id (only Android) | 96c504a0a4f0bb19 |
{mt_idfv} | ios_vendor_id or "app + device" pair (only iOS) | 82706CAC-3B4C-4C76-A9CB-B23F80D87692 |
{mt_oaid} | Device OAID (only Huawei Store) | 82706CAC-3B4C-4C76-A9CB-B23F80D87692 |
{mt_app_set_id} | Device App set ID (only Android) | 82706CAC-3B4C-4C76-A9CB-B23F80D87692 |
{mt_mna_id} | Device mna (only Windows) | 82706CAC-3B4C-4C76-A9CB-B23F80D87692 |
{mt_wna_id} | Device wna (only Windows) | 82706CAC-3B4C-4C76-A9CB-B23F80D87692 |
Macros | Description | Example |
---|---|---|
{mt_s2s} | Sign of tracking link activation from a partner's server, not from the user's device. This link does not lead to the target URL, there is no redirect. Instead, the tracker records a click and return status 204 | 1 (read-only) |
{mt_device_ua} | User-Agent. Required when using {mt_s2s} in a tracking link. If MyTracker does not receive {mt_device_ua}, the macro will be assigned an empty value | Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:35.0) Gecko/20100101 Firefox/35.0 |
{mt_device_ip} | User IP address. Required when using {mt_s2s} in a tracking link. If MyTracker does not receive {mt_device_ip}, the macro will be assigned an empty value | 172.16.255.2 |
{mt_ts} | Unix timestamp of the click/impression. Required when using {mt_s2s} in a tracking link. If MyTracker does not receive {mt_ts}, the macro will be assigned a current server timestamp | 1592838075 |
{mt_no_redirect} | Sign of tracking link activation by a partner, without MyTracker redirect. This link does not lead to the target URL. Instead, the tracker records a click and return status 204 | 1 (read-only) |
For information about campaign details, refer to the section SubID
Macros | Description | Example |
---|---|---|
{mt_sub1} | Additional details | Any string |
{mt_sub2} | Additional details | Any string |
{mt_sub3} | Additional details | Any string |
{mt_sub4} | Additional details | Any string |
{mt_sub5} | Additional details | Any string |
{mt_network} | Additional network breakdowns | Any string |
{mt_campaign} | Additional campaign breakdowns | Any string |
{mt_adset} | Additional ad link breakdowns | Any string |
{mt_creative} | Additional banner breakdowns | Any string |
For information about costs, refer to the section Campaigns > Costs
Macros | Description | Example |
---|---|---|
{mt_cost_currency} | Currency code: USD, EUR, etc. | USD |
{mt_cost_value} | Cost of target events | 1.5 |
{mt_cost_count} | Number of events for which you specified cost (positive integer) | 1 |
{mt_cost_model} | Pricing model: CPI, CPM, CPC, etc. | CPC |