- TLC Home Home
- Discussions & Ideas Discussions & Ideas
- Product Guides Product Guides
- Knowledge Base Knowledge Base
- Developer Docs Developer Docs
- Education Education
- Blog TLC Blog
- Support Desk Support Desk
We have recently solved for an ongoing issue within IE that limits the amount of data being sent to Site Catalyst due to the character limitation of 2047. If you are sending large amounts of data or have many query string parameters in your URL here are a few pieces of code that you can use to cut down on characters.
We were not sure of the size of our image requests across all applications and did not want spend the time evaluating each page with Adobe Digital Pulse Debugger or any other tool so we simply decided to put the image request character length in to a variable.
Extension:
Set Data Values
imgReqLength to JSCode - (eval('s_i_0_'+s.visitorNamespace+'.src.length'));
This allowed a deep dive analysis of which pages and site sections were producing the largest image requests.
Our breadcrumb for example was getting too long in some cases, so we decided to shorten it.
Extension:
Set Data Values
page.breadcrumb to JSCode - b['page.breadcrumb'].replace(/\s+/g, "");
We noticed that our URL was taking up most of the space in our image request and contained many query string parameters. This also caused an issue for the referrer variable (Thanks to Ty for this one).
Extension:
JavaScript
function removeQueryString(a)
{
return a.split("?")[0];
}
s.referrer = removeQueryString(document.referrer);
s.pageURL = removeQueryString(document.URL);
Hope this helps! Suggestions and comments are welcome.
JH
Copyright All Rights Reserved © 2008-2021