If your placement tags contain URLs with reserved characters, you may experience issues when trying to pass an ad request. We recommend using URL encoding to avoid problems with reserved characters in your URL strings.
Reserved charactersYour browser recognizes certain characters within a URL as having a special significance. For example, forward slash (/) characters separate different parts of a URL, and a question mark (?) denotes the beginning of a string. These are typically known as reserved characters. On the other hand, unreserved characters (such as letters or numbers) have no such special meanings. URL encoding is necessary if you need to use a reserved character within a URL, but don’t want the browser to interpret the character as it normally would.
A common situation where you might need to use URL encoding is when you’re passing form data from one page to another using query string variables. For example, a user may fill out a form, then hit a “submit” button, clicking through to a second page where the form data is appended to the URL in the query string. However, there’s always a possibility that the user will enter reserved characters (or characters that aren’t supported in URLs at all, such as spaces) when completing the form. It’s common for website administrators to follow a two-part process to prevent reserved characters from causing problems when working with forms: First they encode the entries before loading the second page, then they decode the query variables on the landing page in order to retrieve the original values.
Another example of where you might need to use URL encoding is when your placement tag contains a site-supplied click string. In this case, the ad’s landing page actually consists of three different URLs combined into one – and two redirects are executed before the browser requests the final landing page. It’s important to note that the second and third URLs (the SSCS and landing page URL) will both be included in the URL for the first request (to Campaign Manager 360's servers, when we count the click). Similarly, the landing page URL will be included in the request that is made using the site-supplied click string. If you don’t use encoded URLs for these values, your request may fail to execute properly. For example, let’s say that the second and third URLs both contain question marks where query string sections occur. If neither of these URLs is encoded, the browser has no way to tell where a query string begins during the first and second requests.
Encode a URL
To avoid issues with reserved characters, you may need to encode the SSCS. You also may need to encode the actual landing page URL by using click1=
in your key-value when inserting the SSCS, rather than click=
.
You can also use an encoder tool; there are several free web applications available for this online.