Highlighted

QueryString variable to capture URL parameter does not work if parameter name is uppercase in URL

Bronze Contributor
Bronze Contributor

I set up a Querystring parameter to capture the URL parameter for the parameter name "intcmp". In the below Example1, I am fetching the result as expected. I am retriving "testvalue" in my Sitecatalyst variable as expected.

 

Example1: xyz.com/?intcmp=testvalue

 

The issue arises when someone visits the URL with the parameter name in uppercase; I am not able to retrive this value.

 

The Example2 does not work.

Example2: xyz.com/?INTCMP=testvalue

 

Any suggested solutions? [Adobe App Measurement library is used and I have overwritten the Util.getQueryParam function to the old getQueryParam in sCode and everything seems to work fine, so that's unlikely the cause]

 

3 REPLIES 3
Highlighted

QueryString variable to capture URL parameter does not work if parameter name is uppercase in URL

Employee Emeritus

@rohitsane

Sounds like you need to turn on lower case query string parameters. 

By default Tealium will not lowercase the querystrings:

qpUPPER.png

 

However you can override this setting and get the results you are looking for:

qplower.png

 

 

To override, you need a JavaScript Extension scoped to PreLoader with the following code:

 

window.utag_cfg_ovrd = window.utag_cfg_ovrd || {};
window.utag_cfg_ovrd.lowerqp = true;

qpsetup.png

 

 

Now you just map the querystings to any evar or sprop like you normally would in tag mappings.

 

The setup I am referring to does not use Adobe's code for getting the query string parameters, it use's Tealium.

 

Does that answer you question?

Highlighted

QueryString variable to capture URL parameter does not work if parameter name is uppercase in URL

Bronze Contributor
Bronze Contributor

Thanks @brian_kranson for this solution.

One quick question: Will this extension lowercase only the query parameter name(INTCMP) or even the value(testvalue) passed in the parameter? [we are passing case sensitive values to the parameters]

Highlighted

QueryString variable to capture URL parameter does not work if parameter name is uppercase in URL

Employee Emeritus

@rohitsane

Only the name.

 

If you want to lowercase the values we have an extension for that:

https://community.tealiumiq.com/t5/Tealium-iQ/Lower-Casing-Extension/ta-p/5634

 

Brian