Function Macros
A function macro performs a function on another macro. Function macros can be used in combination with any other creative macro, including custom macros although if they are not recognized at render time, they will not be translated and the function will not be called.
Pontiac currently supports the {$URL_ENC} function macro, which can be used for a variety of purposes related to encoding. A key use case is when a URL needs to be passed from ad server to ad server via a creative macro, and due to the presence of unsupported characters in standard URL formatting, must be encoded at various steps of the process.
The macro takes the following form:
${URL_ENC(${MACRO_NAME},#)}
where ${MACRO_NAME} is the macro to be encoded and # is the integer 1, 2, or 3, representing the number of times to encode the contents. Note that more than three encodings are not supported.
Each encoding corresponds to a step in the redirect chain, as well as how a given third-party click tracker works with the macro. Double encoding will usually be needed for final destination URLs when a second ad server is involved, and triple encoding for a third ad server.
To determine whether you will need to use single, double, or triple encoding, you should check with your third-party click tracker and then test your URL_ENC macro to ensure it works. If your macro is not working, one consequence of this may be link breakage, which will result in users not reaching the intended destination URL.