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.

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. 

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.


Special characters in a callback URL

Encoded URLAlways encode the URL
Unencoded URLDo not use as is

A link URL with a URL as a parameter

Encoded URLAlways encode the URL
Unencoded URLDo not use as is

A link URL with parameters within parameters

Encoded URLAlways encode the URL
Unencoded URLDo not use as is
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.