登录

Campaign cost

The cost of an ad campaign depends on the platform, ad format, pricing model, and so on. MyTracker allows you to aggregate all spend information and to determine easily the return on investment for individual partners and advertisements.

Tracking

MyTracker supports the following ways to collect cost data:

  • Partner integration. You can get the data via API or tracking link parameters.
  • Tariffs. You can manually add the rates for each ad campaign.
  • Corrections. You can add corrections to the total cost of the campaign.

Partner integration

Some integrated partners share cost per click and impression via the API, or tracking link parameters.

Partner Tracking method
AppLabs Tracking links
AppNext Tracking links
AstraLab Tracking links
Bidease Tracking links
Bigo Ads API
Buzzoola API
BYYD Tracking links
IconPeak Tracking links
ironSource API
Getintent Tracking links
Hyper AdTech Tracking links
Liftoff Tracking links
Petal Ads API
Plazkart Tracking links
Unisound Tracking links
Unity Ads Tracking links
VK Ads + myTarget API
Vfineads Tracking links
Vungle Tracking links
Xapads Media Tracking links
Yabbi Tracking links
Yandex Direct API

If your partner is not on that list, you can contact our support team.

API

To get the data, you need to connect your partner account to MyTracker. See instructions in the Partners section or by the links above.

MyTracker logs the sum passed by the partner through the API in the "Cost from Partner" and "Campaign cost" metrics.

Campaign costs can be sent at the moment of a click or impression. In this case, a partner sends data in an encrypted or unencrypted form in the parameters of the tracking link embedded in the ad.

MyTracker logs the sum passed by the partner through tracking links in the "Cost from Partner" and "Campaign cost" metrics.

For unencrypted data transfer, the partner uses the following tracking link macros:

  • mt_cost_currency — currency code: USD, EUR, etc.
  • mt_cost_value — cost of target events, for example, 1.5.
  • mt_cost_count — number of events for which you specified cost (positive integer). For example, 1.
  • mt_cost_model — pricing model: CPI, CPM, CPC

When a user clicks or views the ad, the partner replaces the {macros} with specific values, based on which MyTracker automatically calculates the campaign cost. For example: https://trk.mail.ru/c/?mt_gaid=1234&mt_cost_currency=USD&mt_cost_value=1.5&mt_cost_count=1&mt_cost_model=CPC, that means 1 click costs USD 1.5.

Or https://trk.mail.ru/i/?mt_gaid=1234&mt_cost_currency=USD&mt_cost_value=1.2&mt_cost_count=1000&mt_cost_model=CPM, that means 1000 impressions cost USD 1.2. Thus, 1 impression will be equal to USD 1.2 / 1000 impressions = USD 0,0012.

A partner can send parameters via both Click and Impression URLs. Only Click URLs should be used with the CPC (Cost Per Click) and CPI (Cost Per Install) pricing models.

Encrypted data transfer involves the following steps:

  1. A partner requests an encryption key from our support team. Only the partner and MyTracker specialist will know the key.
  2. Using the AES-128-CBC algorithm with ECB, the partner encrypts five parameters: encryption key, currency code, event cost, number of events, and pricing model. Then, the partner encodes the result to Base64 and URL encoded format. For example:
  3. <?php
    
    $secretKey = hex2bin(trim(readline('Enter secret key: ')));
    $costModel = trim(readline('Enter cost model: '));
    $costValue = trim(readline('Enter cost value: '));
    $costCount = trim(readline('Enter cost count: '));
    $costCurrency = trim(readline('Enter cost currency: '));
    
    $costQuery = http_build_query([
        'mt_cost_model' => $costModel,
        'mt_cost_value' => $costValue,
        'mt_cost_count' => $costCount,
        'mt_cost_currency' => $costCurrency
    ]);
    printf("Cost query params: %s \n", $costQuery);
    
    $costQuery .= str_repeat('0', 16 - strlen($costQuery) % 16);
    $costEncrypt = openssl_encrypt($costQuery, 'aes-128-cbc', substr($secretKey, 0, 16), OPENSSL_ZERO_PADDING, substr($secretKey, 16));
    printf("Cost query encrypted: %s \n", $costEncrypt);
    
    $linkParam = http_build_query(['mt_enc_data' => $costEncrypt]);
    printf("Link query param: %s \n", $linkParam);
    
    ?>
    from Crypto.Cipher import AES
    from binascii import unhexlify
    from urllib.parse import urlencode
    import base64
    
    
    secret_key = unhexlify(input('Enter secret key: ').strip())
    cost_model = input('Enter cost model: ').strip()
    cost_value = input('Enter cost value: ').strip()
    cost_count = input('Enter cost count: ').strip()
    cost_currency = input('Enter cost currency: ').strip()
    
    cost_query = urlencode({
        'mt_cost_model': cost_model,
        'mt_cost_value': cost_value,
        'mt_cost_count': cost_count,
        'mt_cost_currency': cost_currency,
    })
    print("Cost query params: %s" % cost_query)
    
    cost_query += '0' * (16 - len(cost_query) % 16)
    cipher = AES.new(secret_key[:16], AES.MODE_CBC, secret_key[16:])
    cost_encrypt = cipher.encrypt(cost_query)
    cost_encrypt = base64.b64encode(cost_encrypt).decode('ascii')
    print("Cost query encrypted: %s" % cost_encrypt)
    
    link_param = urlencode({'mt_enc_data': cost_encrypt })
    print("Cost query encrypted: %s" % link_param)
  4. The partner sends the encrypted data via the tracking link parameter mt_enc_data. For example: https://trk.mail.ru/c/?mt_gaid={mt_gaid}&mt_enc_data=AaBbCc123
  5. MyTracker decrypts the data.

Tariffs

MyTracker supports adding tariff plans for any ad campaign: you specify a pricing model, rate, period. The campaign cost will be calculated automatically based on the tariffs for tracked clicks, impressions, and target events. MyTracker logs the result in the "Cost by Tariffs" and "Campaign cost" metrics.

For details, refer to the Tariffs section.

Corrections

You can add corrections to any campaign to adjust its cost. For example, due to fines or a bonus program.

MyTracker logs the data in the "Cost Corrections" and "Campaign cost" metrics.

For details, refer to the Corrections section.

Reports

Control ad spending with MyTracker reports and metrics in the Constructor.

Profit

See the stats on total expenses and profit in the Monetization report. In the Profit section, you will see charts detailing the on campaign cost, income, and profit.

ROI

Analyse ROI for partners, campaigns and other traffic sources using the Builder. Select from list → Dimension → Traffic source, and also Campaign metrics → Campaign cost and Financial metrics → ROI.

Metrics

To analyze spending information from different sources, use the following metrics in the Constructor:

  • Campaign cost — total sum including partner data, added tariffs, and corrections.
  • Cost from Partner — sum received via API or tracking link parameters.
  • Cost by Tariffs — sum calculated on the tariffs.
  • Cost Corrections — sum of corrections added.
Was this article helpful?
    Sorry, the translation has not been completed yet