Encoding callbacks

URL encoding is the practice of converting sensitive sections of complex URLs into code so that they can be read by a server. URL encoding is an essential practice. Failure to correctly encode a URL can result in a server error, which prevents Adjust from reading and processing parameters. This may mean you lose valuable callback data and your redirects and fallbacks malfunction

The same encoding rules apply to callback URLs and link URLs.

Adjust URL encoding requirements

You need to encode the callback URL only.

Warning:
Do not encode the Adjust link URL and any campaign parameters in the Adjust link URL.

The following must always be encoded. For a more comprehensive list, refer to the RFC 3986 specifications.

  • Unsafe special characters: @, &, +, ,, /, :, ;, =, ?, @, ", <, >, #, %, {, }, |, \, ^, ~, [, ], `, (, )
  • Spaces ( )
  • URLs as parameter values (Example: fallback URLs)
  • Parameters within parameters (Example: Android install referrer values)

We recommend that you avoid using spaces or special characters in the callback URL. Use an underscore instead.

While our instructions specify when you need to encode a significant part of a URL, you also need to encode any parameter value that contains unsafe characters. If you are unsure whether a value contains unsafe characters, enter it into a URL encoder. This converts any sensitive characters in the value. 

Note:
Placeholders using curly brackets ({ }do not need to be encoded.

If you do not correctly encode a URL you will see an error on our server, leading to, malfunctioning fallbacks and redirects and an inability to read and process parameters.

Examples

Special characters in a callback URL

Encoded URLAlways encode the URL
Unencoded URLDo not use as is
http://callbacks.myserver.com/registration?username=bob_uncle&email=bob.uncle%40mail.com

A link URL with a URL as a parameter

Encoded URLAlways encode the URL
Unencoded URLDo not use as is
https://app.adjust.com/abc123?redirect=https%3A%2F%2Fwww.mywebsite.com%2Flanding_page

A link URL with parameters within parameters

Encoded URLAlways encode the URL
Unencoded URLDo not use as is
https://app.adjust.com/abc123?referrer=adjust_tracker%3Dabc123%26adjust_campaign%3DChristmasCamp59_ChristmasCampId330%26adjust_adgroup%3DAppId48399_SubID%26adjust_creative%3DCreative9383_SubId%26utm_source%3Dadjust_store&adjust_install_callback=www.3rdpartydomain.com%253Fsrc%253Dadjust%2526advertiserId%253D57638%2526password%253D4d13c4dc
Note:
In this example, there is in fact a callback parameter within a URL that is already encoded, meaning that the callback URL value must be double encoded.