- TLC Home Home
- Discussions Discussions
- Documentation Documentation
- Knowledge Base Knowledge Base
- Education Education
- Blog Blog
- Support Desk Support Desk
06-01-2016 12:07 AM
Hi,
Unless I am mistaken I could not find the part which does the 'variable compression' for the Sitecatalyst tag.
I diffed version 1.5.2 with version 1.6.0 and cannot find back the variable compression code listed below.
The compression part makes that variables with the same value get 'compressed' into dynamic notation eg. if eVar1=home and eVar2=home then the value of eVar2 will become eVar2=D=v1 which greatly reduces the size of the image request.
Can this be corrected? Can I just add the code from v1.5.2 into the 1.6 template and expect it to work or are there too many changes to risk this?
The missing code:
/* variable compression */ var t=u.o;var q={},l={};c=u.varlist; for(d in utag.loader.GV(c)){ if(typeof t[d]!='undefined' && t[d]!=null && t[d]!='' && t[d].toString().indexOf('D=')!=0) {if(typeof l[t[d]]=='undefined')l[t[d]]=c[d];else t[d]='D='+l[t[d]];} }
Thanks
Solved! Go to Solution.
06-01-2016 03:37 AM
I did the test myself by copying the code mentioned in my question in the tag template and the dynamic variable part is working again.
I pasted the code at about the same placeit was in version 1.5.2.
Hopefully this will make it into the next release of the tag template for SiteCatalyst
06-01-2016 09:51 AM - last edited on 06-01-2016 11:30 AM by kathleen_jo
Hi @jan_van_damme,
Variable compression was indeed removed from our template in recent updates, due to AppMeasurement's push towards using Context Data/Processing Rules. Also, the 2083 character limit in older versions of IE has now been handled by AppMeasurement automatically calling POST instead of GET, should it get that big.
See patchnotes for 1.4.1 at :
Also :
Shortening Image Request Practices
Finally, if you decide to continue using dynamic variables, we recommend adding the compression snippet at the end of custom doPlugins, as there was a bug where something would be compressed, but then re-modified in the doPlugins.
Thanks,
Do
06-02-2016 11:57 PM - last edited on 06-03-2016 09:48 AM by kathleen_jo
@do_pham, I do not see any reference of preferring the use of context data over normal variables in any Adobe documentation/communication I have but the choice of either one depends on the strategy we as a customer are choosing. As we use Tealium we have chosen to have the image request contain the variables we need as it is easy for us to change in Tealium ( that is why tealium is therefore) context data/processing rules need a certain level of expertise from the team to get it right whilst Tealium is more accessible to the majority of the team. But that's a whole other discussion I suppose.
I do see that long request do get properly POSTed but the available tools cannot decipher them which makes day to day work a lot more cumbersome therefore the need for the compression. I will look into adding it into the doPlugins so that I do not need to fiddle with the template no more.
Copyright All Rights Reserved © 2008-2023