Skip to content

Commit

Permalink
Merge branch 'release/2.5.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
fblundun committed Aug 13, 2015
2 parents e16a037 + 1ccfe5f commit 43c941c
Show file tree
Hide file tree
Showing 10 changed files with 27 additions and 22 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
Version 2.5.2 (2015-08-13)
--------------------------
Prevented the tracker from setting cookies on initialization if "useCookies" is disabled (#403)
Remove tests for unsupported environments (#406)

Version 2.5.1 (2015-07-27)
--------------------------
Fixed prerender detection (#391)
Expand Down
6 changes: 3 additions & 3 deletions examples/ads/async.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ <h1>Asynchronous ad tracking examples for snowplow.js</h1>
;(function(p,l,o,w,i,n,g){if(!p[i]){p.GlobalSnowplowNamespace=p.GlobalSnowplowNamespace||[];
p.GlobalSnowplowNamespace.push(i);p[i]=function(){(p[i].q=p[i].q||[]).push(arguments)
};p[i].q=p[i].q||[];n=l.createElement(o);g=l.getElementsByTagName(o)[0];n.async=1;
n.src=w;g.parentNode.insertBefore(n,g)}}(window,document,"script","//d1fc8wv8zag5ca.cloudfront.net/2.5.0/sp.js","adTracker"));
n.src=w;g.parentNode.insertBefore(n,g)}}(window,document,"script","//d1fc8wv8zag5ca.cloudfront.net/2.5.2/sp.js","adTracker"));

window.adTracker('newTracker', rnd, 'd3rkrsqld9gmqf.cloudfront.net', {
'encodeBase64': false
Expand Down Expand Up @@ -110,7 +110,7 @@ <h1>Asynchronous ad tracking examples for snowplow.js</h1>
;(function(p,l,o,w,i,n,g){if(!p[i]){p.GlobalSnowplowNamespace=p.GlobalSnowplowNamespace||[];
p.GlobalSnowplowNamespace.push(i);p[i]=function(){(p[i].q=p[i].q||[]).push(arguments)
};p[i].q=p[i].q||[];n=l.createElement(o);g=l.getElementsByTagName(o)[0];n.async=1;
n.src=w;g.parentNode.insertBefore(n,g)}}(window,document,"script","//d1fc8wv8zag5ca.cloudfront.net/2.5.0/sp.js","adTracker"));
n.src=w;g.parentNode.insertBefore(n,g)}}(window,document,"script","//d1fc8wv8zag5ca.cloudfront.net/2.5.2/sp.js","adTracker"));

window.adTracker('newTracker', rnd, 'd3rkrsqld9gmqf.cloudfront.net', {
'encodeBase64': false
Expand Down Expand Up @@ -141,7 +141,7 @@ <h1>Asynchronous ad tracking examples for snowplow.js</h1>
;(function(p,l,o,w,i,n,g){if(!p[i]){p.GlobalSnowplowNamespace=p.GlobalSnowplowNamespace||[];
p.GlobalSnowplowNamespace.push(i);p[i]=function(){(p[i].q=p[i].q||[]).push(arguments)
};p[i].q=p[i].q||[];n=l.createElement(o);g=l.getElementsByTagName(o)[0];n.async=1;
n.src=w;g.parentNode.insertBefore(n,g)}}(window,document,"script","//d1fc8wv8zag5ca.cloudfront.net/2.5.0/sp.js","adTracker"));
n.src=w;g.parentNode.insertBefore(n,g)}}(window,document,"script","//d1fc8wv8zag5ca.cloudfront.net/2.5.2/sp.js","adTracker"));

window.adTracker('newTracker', rnd, 'd3rkrsqld9gmqf.cloudfront.net', {
'encodeBase64': false
Expand Down
4 changes: 2 additions & 2 deletions examples/web/async-large.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
;(function(p,l,o,w,i,n,g){if(!p[i]){p.GlobalSnowplowNamespace=p.GlobalSnowplowNamespace||[];
p.GlobalSnowplowNamespace.push(i);p[i]=function(){(p[i].q=p[i].q||[]).push(arguments)
};p[i].q=p[i].q||[];n=l.createElement(o);g=l.getElementsByTagName(o)[0];n.async=1;
n.src=w;g.parentNode.insertBefore(n,g)}}(window,document,"script","//d1fc8wv8zag5ca.cloudfront.net/2.5.1/sp.js","snowplow_1"));
n.src=w;g.parentNode.insertBefore(n,g)}}(window,document,"script","//d1fc8wv8zag5ca.cloudfront.net/2.5.2/sp.js","snowplow_1"));

window.snowplow_1('newTracker', 'cf', 'd3rkrsqld9gmqf.cloudfront.net', { // Initialise a tracker
encodeBase64: false, // Default is true
Expand Down Expand Up @@ -83,7 +83,7 @@
;(function(p,l,o,w,i,n,g){if(!p[i]){p.GlobalSnowplowNamespace=p.GlobalSnowplowNamespace||[];
p.GlobalSnowplowNamespace.push(i);p[i]=function(){(p[i].q=p[i].q||[]).push(arguments)
};p[i].q=p[i].q||[];n=l.createElement(o);g=l.getElementsByTagName(o)[0];n.async=1;
n.src=w;g.parentNode.insertBefore(n,g)}}(window,document,"script","//d1fc8wv8zag5ca.cloudfront.net/2.5.1/sp.js","snowplow_2"));
n.src=w;g.parentNode.insertBefore(n,g)}}(window,document,"script","//d1fc8wv8zag5ca.cloudfront.net/2.5.2/sp.js","snowplow_2"));

window.snowplow_2('newTracker', 'cf', 'd3rkrsqld9gmqf.cloudfront.net', { // Initialise a tracker
encodeBase64: false, // Default is true
Expand Down
2 changes: 1 addition & 1 deletion examples/web/async-medium.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
;(function(p,l,o,w,i,n,g){if(!p[i]){p.GlobalSnowplowNamespace=p.GlobalSnowplowNamespace||[];
p.GlobalSnowplowNamespace.push(i);p[i]=function(){(p[i].q=p[i].q||[]).push(arguments)
};p[i].q=p[i].q||[];n=l.createElement(o);g=l.getElementsByTagName(o)[0];n.async=1;
n.src=w;g.parentNode.insertBefore(n,g)}}(window,document,"script","//d1fc8wv8zag5ca.cloudfront.net/2.5.1/sp.js","new_name_here"));
n.src=w;g.parentNode.insertBefore(n,g)}}(window,document,"script","//d1fc8wv8zag5ca.cloudfront.net/2.5.2/sp.js","new_name_here"));

window.new_name_here('newTracker', 'cf', 'd3rkrsqld9gmqf.cloudfront.net', {
encodeBase64: false,
Expand Down
2 changes: 1 addition & 1 deletion examples/web/async-small.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
;(function(p,l,o,w,i,n,g){if(!p[i]){p.GlobalSnowplowNamespace=p.GlobalSnowplowNamespace||[];
p.GlobalSnowplowNamespace.push(i);p[i]=function(){(p[i].q=p[i].q||[]).push(arguments)
};p[i].q=p[i].q||[];n=l.createElement(o);g=l.getElementsByTagName(o)[0];n.async=1;
n.src=w;g.parentNode.insertBefore(n,g)}}(window,document,"script","//d1fc8wv8zag5ca.cloudfront.net/2.5.1/sp.js","snowplow"));
n.src=w;g.parentNode.insertBefore(n,g)}}(window,document,"script","//d1fc8wv8zag5ca.cloudfront.net/2.5.2/sp.js","snowplow"));

window.snowplow('newTracker', 'cf', 'd3rkrsqld9gmqf.cloudfront.net', { // Initialise a tracker
encodeBase64: false, // Default is true
Expand Down
2 changes: 1 addition & 1 deletion examples/web/sync.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

<!-- Snowplow starts plowing -->
<script type="text/javascript">
var spSrc = ('https:' == document.location.protocol ? 'https' : 'http') + '://d1fc8wv8zag5ca.cloudfront.net/2.5.1/sp.js';
var spSrc = ('https:' == document.location.protocol ? 'https' : 'http') + '://d1fc8wv8zag5ca.cloudfront.net/2.5.2/sp.js';
document.write(unescape("%3Cscript src='" + spSrc + "' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "snowplow-tracker",
"version": "2.5.1",
"version": "2.5.2",
"devDependencies": {
"JSON": "~1.0.0",
"browser-cookie-lite": "~0.3.1",
Expand Down
12 changes: 7 additions & 5 deletions src/js/tracker.js
Original file line number Diff line number Diff line change
Expand Up @@ -579,11 +579,13 @@
idCookieComponents[5] = idCookieComponents[4];
}

setSessionCookie();
// Update currentVisitTs
idCookieComponents[4] = Math.round(new Date().getTime() / 1000);
idCookieComponents.shift();
setDomainUserIdCookie.apply(null, idCookieComponents);
if (configUseCookies) {
setSessionCookie();
// Update currentVisitTs
idCookieComponents[4] = Math.round(new Date().getTime() / 1000);
idCookieComponents.shift();
setDomainUserIdCookie.apply(null, idCookieComponents);
}
}

/*
Expand Down
10 changes: 4 additions & 6 deletions tests/functional/detectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,12 @@ define([
3343029130, // IE9 Windows
1101697779, // IE10
2209912060, // IE11
2265977041, // Firefox 27.0 Mac
1268007327, // Firefox 27.0 XP
438083159, // Firefox 27.0 Linux
3528351619, // Chrome 32.0 Mac OS X
2805686079, // Firefox 27.0 Linux
2180938465, // Chrome 32.0 Windows NT
3829122699, // Chrome 32.0 Linux
2694331068, // Safari 7.0 Mac
2336697549 // Safari 6.0.5 Mac
1198971565, // Chrome 32.0 Linux
3934840736, // Safari 7.0.6 Mac
2651260973 // Safari 6.2.7 Mac
];

registerSuite({
Expand Down
4 changes: 2 additions & 2 deletions tests/intern.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ define({
{ browserName: 'internet explorer', version: '11', platform: 'Windows 8.1' },
{ browserName: 'internet explorer', version: '10', platform: 'Windows 8' },
{ browserName: 'internet explorer', version: '9', platform: 'Windows 7' },
{ browserName: 'firefox', version: '27', platform: [ 'OS X 10.6', 'Windows 7', 'Linux' ] },
{ browserName: 'chrome', version: '32', platform: [ 'OS X 10.6', 'Windows 7', 'Linux' ] },
{ browserName: 'firefox', version: '27', platform: [ 'Windows 7', 'Linux' ] },
{ browserName: 'chrome', version: '32', platform: [ 'Windows 7', 'Linux' ] },
{ browserName: 'safari', version: '6', platform: 'OS X 10.8' },
{ browserName: 'safari', version: '7', platform: 'OS X 10.9' }
],
Expand Down

0 comments on commit 43c941c

Please sign in to comment.