Features:
- added
t.co
(host: 't.co', display: 'twitter.com'
) andplus.url.google.com
(host: 'plus.url.google.com', display: 'plus.google.com'
) to defaultreferral
sources. You still can override it by your custom setting (to mark it associal
for example).
Fixes:
- fixed IE8 bug
Fixes:
- fixed month in dates (
sbjs.get.first_add.fd
&sbjs.get.current_add.fd
): it was -1 from actual one
Fixes:
- fixed validation of
lifetime
,session_length
andtimezone_offset
params
Upgrade guide · Updated documentation
Changes:
Major
- API. Rewritten from the ground. See upgrade guide and updated documentation.
- Changed cookie's domain handling — also see upgrade guide and updated documentation.
- Changed default
utm_source
&utm_medium
values fortypein
traffic — you know what to do :)
Minor
- Changed default timezone from UTC to user's system (default — means no custom value provided during
sbjs
initialization).
Under the hood
- In short:
mess
becamestructure
. Check the sources if interested. - Added migration tool, which updates visitor's cookies to
1.x.x
. - Changed params delimiter in cookies: from
|
to|||
. Cookies will be automatically upgraded by migration tool without data loss. You don't have to worry about this change unless you parse these cookies by yourself.
Features:
- Added
callback
option to set custom function, which will be executed right aftersbjs
cookies will be set. This function will getsbjs.get
-object as argument (it contains all detectedsbjs
data). - Added ability to set custom cookies expiration period
- Added
term
detection from Yandex Direct traffic (if there is noutm_term
in URL) - Added
visits
counter: available throughsbjs.get.udata.vst
- Added
pages
counter for current session: available throughsbjs.get.session.pgs
- Added
current page
url for current session: available throughsbjs.get.session.cpg
- And Sourcebuster
1.0.0
available asCommonJS
/AMD
module.
Features:
- add
sbjs_current_add
cookie, which holds same data assbjs_first_add
cookie, but for the visit when current source was written - add info about first referer (see changes below)
Changes:
- move current
referer
data from stand-alonesbjs_referer
cookie tosbjs_current_add
cookie (and also tosbjs_first_add
cookie, now you can get first and current referers viaget_sbjs.first_add.rf
&get_sbjs.current_add.rf
getters)
Features:
- add
_setPromocode
user setting to set promocode for visitor;
Features:
- add
_setTypeinAttributes
user setting to set customsource
andmedium
fortypein
traffic - set value of
content
=referer_path
in cookies forreferral
traffic
Features:
- add predefined organic sources into the core (see comments and the list of added sources in the docs)
- add Sourcebuster to
bower
(bower.io). Now you can install it via...bower
Changes:
- switch from Closure Compiler to UglifyJS minification library
- switch from deprecated
escape()
/unescape()
methods to customencode_data()
/decode_data()
functions (which usesencodeURIComponent()
/decodeURIComponent()
with some additions) to set/get cookies. Please pay attention to this if you parsesbjs
cookies by yourself.
Features:
- add
_setTimeZoneOffset
user setting to set default time zone - add alias param to custom organic source (added via
_addOrganicSource
)
Changes:
- change simple and advanced setup methods
- change datetime format to
yyyy-mm-dd hh:mm:ss
(2014-06-11 17:28:26
) - store datetime in UTC by default
- remove events
'sbjs:set'
and'sbjs:ready'
(see Using the data section for details)
Fixes:
- fix matching of Yandex organic source
- fix matching of custom organic source (added via
_addOrganicSource
) - fix getter (
get_sbjs
) in IE8 and lower - fix output of non-ASCII chars via
get_sbjs
Features:
- add Google AdWords
gclid
param handler - add
_setCampaignParam
user setting to set custom GET-param, whose value will be set asutm_campaign
in cookies (if there is no originalutm_campaign
in request)
Sourcebuster JS released.