I have implemented a tracking pixel that is simply an img tag that another party puts on their website. This works by making the src refer to our endpoint with query params set with extra information. The GET hits the server and we collect the QPs. Right now I have just regular key-value query params that refer to user/account info but I need more data (date, time, browser, ip, etc) so I would like to pass something more complicated like a JSON object.
Since this is in the URL, I would have to encode the JSON. I am thinking of just base64 encoding the whole JSON object and setting it as a single query param and decoding it later. Would this be a good thing to do or is there a better way?
imgtag is injected into the page by a JS script which sets thesrcattribute with info specific to who and what is being tracked. We use browser info, cookies, and some variables in the script to set those query params.