Background:
- We're facing the problem that some of our affiliated link URLs can not be redirected properly in Tiktok app browser.
- Make the Tiktok app get freeze.
- The reason for this is in the redirect URL contains some of special character which make the Tiktok app get freeze.
Solution:
- We build a new click tracking endpoint name: internal_cl.php in order to change the special characters to normal characters by encoding.
Usage:
- Compare with normal adv.php endpoint, only the "url" parrameter in the adv.php endpoint will be different.
- So when you convert the link from adv.php to the internal_cl.php, take the url parameter value to encode base 64 then encode URL the encode base 64 value and rename "url" to "url_enc" other parameters keep as they are.
adv.php endpoint:
https://cl.accesstrade.vn/adv.php?rk=abcxyz&url=https%3A%2F%2Fwww.lazada.vn%2F&subid=123
Convert to internal_cl.php
url_enc = encodeUrl(encodeBase64(url))
url_enc = encodeUrl(encodeBase64("https://www.lazada.vn/"))
https://cl.accesstrade.vn/internal_cl.php?rk=abcxyz&url_enc=aHR0cHM6Ly93d3cubGF6YWRhLnZuLw%3D%3D&subid=123