Description:
installs the function spring with two methods:
spring.add(x,y) and spring.commit(x,y)
the function add adds a pair of source,target to the current event
list. the function commit sends the list to the target servers. the
servers are identified by a special attribut 'site' in the target
object, the value of spring_site is used if this attribute is missing.
source and target may by arbitrary objects, including null. if target is
null or missing, the given source is taken as target and an object
{ r: document.referer } is created for the source.
SUBMISSION
there currently are three forms of request submission:
using an Image().url call - has some problems with some websites and or old browsers
using a document.write(.img src=...) - has some issues when using ajax-apps
null - just returns the actual url of the call - has some issues with batching
the default may be set according the local requirements
OBJECT STATE
The objects added are serialized in the commit-call. The states of the
objects are committed then, not before. So adding one object means
"registering" it; its state may change afterwards.
TRANSMISSION
the transmission of objects is done near to the JSON encoding, with some
differences. arrays and objects are encoded the same way:
both start with ',' and end with ';'. The elements in those are
separated/enumerated by '+'. Objects attributes are encoded in the form
name'='value. The encoding of name and value is done via encodeURIComponent.
Where name and value are assumed to be some object (not necc. strings).
All other escaped using JavaScript:encodeURIComponent.
Non empty Arrays and Objects may be differentiated by at least one name=value
pair in the object. The Date object is converted to a Long using getTime()
before transmission. The character '~' is used as a special char in
compression.
COMPRESSION
To compress the transmission string, references to already encoded objects are
kept. whenever an objects is to be transmitted more than one times in the same
message, only the reference is appended to the message. the encoding uses the
char '~' followed by a number. The number refers to the nth occurred, encoded
object.
LENGTH
The property spring_ms defines the size in bytes, after that the request is
forced to be transmitted. The default is 2048. Note that there is no guarantee
for the request to be smaller than an given boundary. One encoded, requested
Event (source target) determines the minimum size, because its not split.
HTTP/HTTPS
The protocol is identified using document.location.href.
If this href starts with https, this protocol is also used for the target
servers. The servers name is prepended with a 'ssl-' prefix.
ASNYC-MODE
When the script detects the presence of a variable springq in the current scope,
it expects this to be an array containing objects or arrays of objects (2dim).
It automatically calls spring.p() what reads the springq FIFO and adds the
contained elements via spring.add(). When the queue is empty, spring.p calls
spring.commit() to transfer the elements. After having transferred them, a
timeout is set that calls spring.p after 100ms.
3RD-PARTY-EXTENSION (THIRD PARTY EXTENSION HAS BEEN REMOVED IN 1.6)
For browsers, not allowing 3rd-party-cookies, the script supports an alternative
transmission mode: iframe. in this mode an iframe is appended to the containing
document and the request is passed to this iframe. The document in the frame
can get the original request from the url parameters (id) and execute it.
if the document is located in the same domain as the counting servers, this
mimics a first-party call.
In the script, you could turn on a browser switch to the Safari browser which
automatically changes the transmission mode. This feature can internally switched off
by setting ua = false - useful for release management.
It is also possible to switched off externally by setting spring.nua = true;
The safari browser is identified by /(iPod|iPad|iPhone|Mac OS).*Safari/.test(agent) && !/[Cc]hrome/.test(agent);
1ST-PARTY-EXTENSION
For browsers not allowing 3rd-party-cookies, the scripts sets a local, persistent
cookie. This cookie is transported using the URL-Parameter c=
the switch spring.nlso turns that off if set.
QDS
AFTER the FIRST request-transmission an additional script is sourced from a server 'qds' in the
defined domain. this is done by adding a script tag to the header of the document.
this behavior can be switched off be setting spring.noScript = true;
Release Notes
Version 1.9.4
Changes | Attribute | Description |
---|---|---|
Electron | Improvement | EID created is now less prone to collisions. |
ITP 2.0 | Analysis | Analysis: Cookie and Local Storage in New Safari. |
Version (Electron) | Bugfix | Fixed incorrect version number in vmpc case. |
Version parameter | Bugfix | Fixed missing version string in JavaScript case. |
SSL off-loader | Improvement | Removing ssl off-loader. Box will now take care of all ssl requests.(Internal) |
Version 1.9.2
Changes | Attribute | Description |
---|---|---|
Electron | Bugfix | Electron EID not always available. |
Version 1.9.1
Changes | Attribute | Description |
---|---|---|
Electron | Bugfix | Electron sensor now uses HTTP/SSl for communication. |
Electron | Bugfix | JSON structure of electron requests not always valid- |
Version 1.9.0
Changes | Attribute | Description |
---|---|---|
Support Panel Version | Improvement | Extend functionality of existing JS sensor to support panel version. |
Identifier Creation | Improvement | Make identifier creation (did) less collision prone. |
Version 1.8.0
Changes | Attribute | Description |
---|---|---|
OEWA | Bugfix | Now only using sensor internal scope for variables. |
Version number | Improvement | Version number is now integrated in the requests. |
Security rules | Improvement | Adapting content security rules from Google. |