BUG: Sitecatalyst 1.6 template dynamic variables omitted

Gold Contributor
Gold Contributor

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

 

3 REPLIES 3

BUG: Sitecatalyst 1.6 template dynamic variables omitted

Gold Contributor
Gold Contributor

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

BUG: Sitecatalyst 1.6 template dynamic variables omitted

Employee Emeritus

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 :

AppMeasurement Release Notes

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

BUG: Sitecatalyst 1.6 template dynamic variables omitted

Gold Contributor
Gold Contributor

@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.

Public