Patterns for target URLs and deep links

When creating tracking links you specify:

  • Target URL — an address which users reach when they click your ad.
  • Deeplink (only for mobile apps) — сa dedicated URL taking people to a specific screen in your app. For more details, see the Deep links section.

Target URLs and deep links support pattern processing. Patterns let you pass parameters from Click URLs to target URLs and deep links. This may be helpful when you need to supply additional information (user ID, campaign data, etc.) to a new installation or a deep link, respectively.

How it works

Patterns are somewhat similar to macros: a pattern {GET_VAR_NAME} in a target URL or deep link is replaced with a value of GET parameter named GET_VAR_NAME from a click URL. In other words, if a click URL looks like:

https://trk.mail.ru/c/123?screen=foo&username=bar

and the target URL or deep link contains a pattern:

http://myproject.com/{screen}/?user={username}

then the user will be redirected to

http://myproject.com/foo/?user=bar

If the required parameter has not been supplied to the original URL, the pattern will be replaced with a blank line.