Query string parameters with "=" in the value

Gold Contributor
Gold Contributor
I'm trying to track the value of a query string parameter (in Adobe Analytics). It should be pretty simple, but the variable I've mapped it to it isn't showing up at all. The value itself contains two equal signs - e.g., example.com?string1=abcefd==&string2=qwerty==. When I look at the Web Companion, the value is there in the utag objects, but without those equal signs. Are these somehow interfering with the JS?
2 REPLIES 2

Query string parameters with "=" in the value

Employee Emeritus
Patrick, You are right, the equal signs are getting stripped out. You can see this in the console: utag.data['qp.string1']; utag.data['qp.string2']; However you might be able to get what you need with dom.query_string. Check that out in the console: utag.data['dom.query_string']; Depending on what you need, you might be able to get away with something like: utag.data['dom.query_string'].split('string1=')[1].split('&')[0]; Without knowing the specifics, it is hard to come up with the exact javaScript for your scenario. It could be something like a set data value where you have the above split going on with a condition that is looking for the existence of the qp.string1 so that you don't get any javaScript errors. It will be possible to do what you are looking for with Tealium, just need to massage the data slightly. If you need help coming up with the exact javaScript, please reach out to your Account Manager. Keep us posted on what you learn. Thanks and Happy Tracking. Bk

Query string parameters with "=" in the value

Employee Emeritus
Hi Patrick, Just to add, "=" is a reserved character in a query-string so it shouldn't be used as part of a parameter (e.g. test=hello==test) unless it is URL encoded. To URL encode an "=", just replace it with "%3D". For example: test=hello%3D%3Dtest Tealium will URL decode this for you if you refer to it as a query-string data source ("test" in this case): https://www.evernote.com/l/AI5tqIU90QBKja5Nu5sdbiQ1L1l51mqBkEY https://www.evernote.com/l/AI5UWRya3nJANaKEYNmFy6AM63-wiFJjjqw I would recommend changing the query-strings to be encoded so they are valid. I hope this helps! Cheers, Roshan
Public