Boy, does size ever matter – particularly oversize – and, in this post, that’s all that matters, so we won’t be discussing purpose or technique.
Seriously, this post categorizes SiteCatalyst variables based their length, syntax and other restrictions, to focus on tracking rather than reporting.
The SiteCatalyst Implementation Manual is ok as a reference work but it is far more instructive to look at SC Variables and their restrictions within a categorisation. Here is one way to categorise them:
SC collects data ‘behind the scenes’ populating its own variables. Examples include ‘g’ (page URL),’bh’ (browserHeight), ‘k’ (cookiesEnabled), ‘s’ (resolution), ‘t’ (timestamp) etc.
Since they are set automatically by SC, as required, their restrictions are of little further interest here, save that we can use them to populate props and eVars.
Such variables either have a length limit of 255 bytes or are unlimited (which, on such subjects means no practical limit). They also may have size limits of 255 bytes or other specific limits for individual segments of data. These include:
Value Type
SC variables are not strongly typed but some expect certain types of values like logical or numeric
Although some such variables are sent to SC, the majority are not. So, I’m dealing with this type of restriction within the JS-only category:
These defy categorization. They are limited by the actual values they must store and/or by their structure. They are better regarded as exceptions.
The following characters may not be contained in any of your variables
To avoid them, use JavaScript’s escape() function to URLencode them, although they may be encoded before leaving the visitor’s browser.
The real problem here is that they will consume additional bytes. E.g. a single space will become 3 characters when changed to %20 and an & 5 characters when becoming &
At the end of the day, one cannot send unlimited amounts of data to SC, even if all the above restrictions have been obeyed.
With 50 props (100 chars each), 50 eVars (250 chars each), products, 80 events (out of the box), etc, the total size of the image request to SC may easily exceed what visitors’ browsers can handle.
Fortunately for us, me in particular, Jason Thompson just posted an excellent article on the Adobe Site Catalyst Developer Connection at https://developer.omniture.com/node/5723 dealing with this very issue.
For reasons Jason explains, your image requests should not exceed 2083 bytes and he gives you a small little tool to measure them – just copy the following code in your address bar:
<![CDATA
]>
Jason also provides a great diagnostic solution to report pages with image requests that exceed or are at risk generating image requests that are too large.
When your image requests are too big, its often caused by having lengthy values, like URLs and page names, being copied to multiple variables. To reduce the size of your image requests, SC provides a syntax called Dynamic Variables that allows one to do what comes naturally in many programming languages:
Instead of:
use:
When the SC server evaluates s.prop1 and sees its value begins with D=, it evaluates the expression and assigns the value of pageName to s.prop1.
This code does not have to be retrofitted into every page or even some pages. Rather, pick out the worst culprits and reassign them in do_Plugins().
The topic is discussed in the Implementation Manual (search it for s.dynamicVariablePrefix) and in Article ID 10099, 10142 and 10297
We look forward to bringing you more SiteCatalyst Close-ups and your feedback and suggestions will go far in driving and inspiring more posts. Some already in process include closer looks at Page Naming strategies and much ado about ‘None’.
The posts may not be regular, so the “best practice” is to subscribe
As consumers become increasingly digitally savvy, and more and more brand touchpoints take place online,…
Marketers are on a constant journey to optimize the efficiency of paid search advertising. In…
Unassigned traffic in Google Analytics 4 (GA4) can be frustrating for data analysts to deal…
This website uses cookies.