Skip to main content

Appmetrica/Yandex integration with Swaarm

How to set up the tracking link and postback URL for Appmetrica/Yandex integration with Swaarm.

Overview

This article covers the tracking URL and postback URL templates for integrating Appmetrica/Yandex with Swaarm.

The templates below are suggested starting points — you can add or remove parameters and macros based on your requirements.

ℹ️


Tracking URL

The Appmetrica tracking link contains the minimum information needed to record the click and redirect the user to the app download. Additional parameters go after the ? character to capture extra data and return it via the postback.

ℹ️ The templates below are suggested starting points - you're free to add or remove parameters and macros based on your company's specific needs.

Base structure

https://redirect.appmetrica.yandex.com/serve/[tracking ID]

ℹ️ redirect.appmetrica.yandex.com is the most commonly used domain. Other possible variations: appmetrika.yandex.com, appmetrica.yandex.ru, appmetrika.yandex.ru

Complete tracking link with Swaarm macros

https://redirect.appmetrica.yandex.com/serve/600573419754384676?click_id={id}&google_aid={device.ids.gaid}&ios_ifa={device.ids.idfa}&device_ip={user.ip}&device_ua={user.encoded_ua}&click_timestamp={time.timestamp}&afpub_id={publisher.id}_{publisher.subId}&site_id={publisher.site}&creative_id={publisher.creative}

Tracking link parameter mapping

Appmetrica Parameter

Swaarm Macro

Description

click_id

{id}

Unique click ID (mandatory)

google_aid

{device.ids.gaid}

Google AID

google_aid_sha1

{device.ids.gaid.sha1}

SHA1 hash of Google AID

ios_ifa

{device.ids.idfa}

iOS IFA

ios_ifa_sha1

{device.ids.idfa.sha1}

SHA1 hash of IFA

device_ip

{user.ip}

URL-encoded device IP

device_ua

{user.encoded_ua}

URL-encoded device User-Agent

click_timestamp

{time.timestamp}

UTC click timestamp (seconds)

afpub_id

{publisher.id}_{publisher.subId}

Affiliated publisher (sub-partner) ID

site_id

{publisher.site}

Advertising placement ID

creative_id

{publisher.creative}

Banner/creative ID


Postback URL

Global postback with Appmetrica macros

⚠️ Replace {yournetwork} with your own Swaarm postback domain.

https://track.{yournetwork}.swaarm-clients.com/postback?click_id={click_id}&event_id={conversion_event_name}&gaid={google_aid}&idfa={ios_ifa}&sale_amount={price}

Postback parameter mapping

Swaarm

Parameter

Description

Appmetrica Macro

Description

click_id

Swaarm click ID for the attributed conversion

{click_id}

Unique click ID

match_type

Attribution method

{match_type}

referrer, fingerprint, or identifier

postback_id

Postback ID passed by the advertiser

{transaction_id}

ID of this event/install occurrence

user_agent

User device User-Agent

{click_user_agent}

User agent of the click

click_timestamp

Click timestamp recorded by the SDK

{click_datetime}

UTC click time, RFC3339 format

conversion_timestamp

Conversion timestamp recorded by the SDK

{conversion_timestamp}

Conversion time, UNIX seconds

event_id

Event ID attributed in the advertiser's SDK

{conversion_event_name}

Event name

event_value

JSON object with custom event data

{conversion_event_json}

Nested event attributes (JSON)

installed_at

First app open time recorded by the SDK

{install_datetime}

UTC install time, RFC3339 format

install_finish_time

App download completion timestamp

{install_timestamp}

Install time, UNIX seconds

gaid

Google AID of the device

{google_aid}

Device's Google AID as received

idfa

IDFA of the iOS device

{ios_ifa}

Device's IFA as received

device_manufacturer

Device manufacturer

{device_manufacturer}

e.g. Apple, Samsung

device_name

Device model

{device_model}

e.g. Galaxy S6

device_language

User device language

{device_locale}

Language on the device

os_name

Operating system

{os_name}

ios, android, or windows

os_version

OS version

{os_version}

OS version on the device

isp

Internet service provider

{operator_name}

Mobile operator name

app_version

App version

{app_version_name}

Version as specified by the developer

app_title

App name

{app_package_name}

Package name (Android) or Bundle ID (iOS)

sdk_version

SDK version used by the advertiser

{appmetrica_sdk_version}

AppMetrica SDK version integrated

app_id

App ID

{store_app_id}

App ID on Google Play or App Store

sale_amount

Revenue per conversion

{price}

Purchase/product cost

sale_amount_currency

Currency of the revenue

{currency}

Purchase currency


Event Setup

Events are tracked based on Appmetrica's event name. Set the Adv. EventType ID on the corresponding Swaarm event to match the Appmetrica event name exactly.

Did this answer your question?