Skip to content

Commit 699632f

Browse files
authored
Merge branch 'release/2.8.0'
2 parents 0ba1bad + 8727f2f commit 699632f

File tree

10 files changed

+283
-60
lines changed

10 files changed

+283
-60
lines changed

CHANGELOG

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
Version 2.8.0 (2017-05-18)
2+
--------------------------
3+
Add support for users opting out of state tracking using cookie or localStorage (#459)
4+
Add support for recording state in localStorage rather than cookies (#506)
5+
Exclude password fields from form tracking (#521)
6+
Add Parrable context (#525)
7+
Add support for OptimizelyX context (#551)
8+
Update README markdown in according with CommonMark (#561)
9+
Add support for not recording any state (#563)
10+
Deprecate useCookies (#565)
11+
Deprecate useLocalStorage (#566)
12+
Prevent multiple setInterval from being created (#571)
13+
Guard against non-integer values for minimumVisitLength and heartBeatDelay (#572)
14+
Provide read-only access to domainSessionIndex (#573)
15+
Provide read-only access to cookieName (#574)
16+
Provide read-only access to pageViewId (#575)
17+
118
Version 2.7.2 (2017-03-07)
219
--------------------------
320
Add defensive check for window.optimizely.data in getOptimizelyStateContexts (#555)

README.md

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,32 @@
11
# JavaScript web analytics for Snowplow
22

3-
[ ![Build Status] [travis-image] ] [travis]
4-
[ ![Selenium Test Status] [saucelabs-button-image]][saucelabs]
5-
[ ![Code Climate] [codeclimate-image] ] [codeclimate]
6-
[ ![Built with Grunt] [grunt-image] ] [grunt]
7-
[ ![License] [license-image] ] [bsd]
3+
[![Build Status][travis-image]][travis]
4+
[![Selenium Test Status][saucelabs-button-image]][saucelabs]
5+
[![Code Climate][codeclimate-image]][codeclimate]
6+
[![Built with Grunt][grunt-image]][grunt]
7+
[![License][license-image]][bsd]
88

99
## Overview
1010

11-
Add analytics to your websites and web apps with the [Snowplow] [snowplow] event tracker for JavaScript.
11+
Add analytics to your websites and web apps with the [Snowplow][snowplow] event tracker for
12+
JavaScript.
1213

13-
With this tracker you can collect user event data (page views, e-commerce transactions etc) from the client-side tier of your websites and web apps.
14+
With this tracker you can collect user event data (page views, e-commerce transactions etc) from the
15+
client-side tier of your websites and web apps.
1416

1517
## Find out more
1618

17-
| Technical Docs | Setup Guide | Roadmap & Contributing |
18-
|-----------------------------|-----------------------|--------------------------------------|
19-
| [ ![i1] [techdocs-image] ] [tech-docs] | [ ![i2] [setup-image] ] [setup] | ![i3] [roadmap-image] |
20-
| [Technical Docs] [tech-docs] | [Setup Guide] [setup] | _coming soon_ |
19+
| Technical Docs | Setup Guide | Roadmap & Contributing |
20+
|-------------------------------------|------------------------------|--------------------------------------|
21+
| [![i1] [techdocs-image]][tech-docs] | [ ![i2][setup-image]][setup] | ![i3][roadmap-image] |
22+
| [Technical Docs][tech-docs] | [Setup Guide][setup] | _coming soon_ |
2123

2224

2325
## Developers
2426

2527
### Contributing quickstart
2628

27-
Assuming git, [Vagrant] [vagrant-install] and [VirtualBox] [virtualbox-install] installed:
29+
Assuming git, [Vagrant][vagrant-install] and [VirtualBox][virtualbox-install] installed:
2830

2931
```
3032
host$ git clone https://github.com/snowplow/snowplow-javascript-tracker.git
@@ -36,21 +38,25 @@ guest$ cd core
3638
guest$ sudo npm install
3739
```
3840

39-
Set up an `./aws.json` file using the example `./aws.sample.json`. If you just want to concat + minify without uploading then you don't need to fill out the `aws.json` file with valid credentials.
41+
Set up an `./aws.json` file using the example `./aws.sample.json`. If you just want to concat +
42+
minify without uploading then you don't need to fill out the `aws.json` file with valid credentials.
4043

4144
Build the package (default task concatenates and minifies) using `grunt`.
4245

4346
## Testing
4447

45-
[ ![Selenium Test Status][saucelabs-matrix-image]][saucelabs]
48+
[![Selenium Test Status][saucelabs-matrix-image]][saucelabs]
4649

4750
## Copyright and license
4851

49-
The Snowplow JavaScript Tracker is based on Anthon Pang's [`piwik.js`] [piwikjs], the JavaScript tracker for the open-source [Piwik] [piwik] project, and is distributed under the same license ([Simplified BSD] [bsd]).
52+
The Snowplow JavaScript Tracker is based on Anthon Pang's [`piwik.js`][piwikjs], the JavaScript
53+
tracker for the open-source [Piwik][piwik] project, and is distributed under the same license
54+
([Simplified BSD][bsd]).
5055

51-
Significant portions of the Snowplow JavaScript Tracker copyright 2010 Anthon Pang. Remainder copyright 2012-14 Snowplow Analytics Ltd.
56+
Significant portions of the Snowplow JavaScript Tracker copyright 2010 Anthon Pang. Remainder
57+
copyright 2012-14 Snowplow Analytics Ltd.
5258

53-
Licensed under the [Simplified BSD] [bsd] license.
59+
Licensed under the [Simplified BSD][bsd] license.
5460

5561
[snowplow]: http://snowplowanalytics.com/
5662

examples/ads/async.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ <h1>Asynchronous ad tracking examples for snowplow.js</h1>
3838
;(function(p,l,o,w,i,n,g){if(!p[i]){p.GlobalSnowplowNamespace=p.GlobalSnowplowNamespace||[];
3939
p.GlobalSnowplowNamespace.push(i);p[i]=function(){(p[i].q=p[i].q||[]).push(arguments)
4040
};p[i].q=p[i].q||[];n=l.createElement(o);g=l.getElementsByTagName(o)[0];n.async=1;
41-
n.src=w;g.parentNode.insertBefore(n,g)}}(window,document,"script","//d1fc8wv8zag5ca.cloudfront.net/2.7.2/sp.js","adTracker"));
41+
n.src=w;g.parentNode.insertBefore(n,g)}}(window,document,"script","//d1fc8wv8zag5ca.cloudfront.net/2.8.0/sp.js","adTracker"));
4242

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

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

146146
window.adTracker('newTracker', rnd, 'd3rkrsqld9gmqf.cloudfront.net', {
147147
'encodeBase64': false

examples/web/async-large.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
;(function(p,l,o,w,i,n,g){if(!p[i]){p.GlobalSnowplowNamespace=p.GlobalSnowplowNamespace||[];
2424
p.GlobalSnowplowNamespace.push(i);p[i]=function(){(p[i].q=p[i].q||[]).push(arguments)
2525
};p[i].q=p[i].q||[];n=l.createElement(o);g=l.getElementsByTagName(o)[0];n.async=1;
26-
n.src=w;g.parentNode.insertBefore(n,g)}}(window,document,"script","//d1fc8wv8zag5ca.cloudfront.net/2.7.2/sp.js","snowplow_1"));
26+
n.src=w;g.parentNode.insertBefore(n,g)}}(window,document,"script","//d1fc8wv8zag5ca.cloudfront.net/2.8.0/sp.js","snowplow_1"));
2727

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

8888
window.snowplow_2('newTracker', 'cf', 'd3rkrsqld9gmqf.cloudfront.net', { // Initialise a tracker
8989
encodeBase64: false, // Default is true

examples/web/async-medium.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
;(function(p,l,o,w,i,n,g){if(!p[i]){p.GlobalSnowplowNamespace=p.GlobalSnowplowNamespace||[];
2525
p.GlobalSnowplowNamespace.push(i);p[i]=function(){(p[i].q=p[i].q||[]).push(arguments)
2626
};p[i].q=p[i].q||[];n=l.createElement(o);g=l.getElementsByTagName(o)[0];n.async=1;
27-
n.src=w;g.parentNode.insertBefore(n,g)}}(window,document,"script","//d1fc8wv8zag5ca.cloudfront.net/2.7.2/sp.js","new_name_here"));
27+
n.src=w;g.parentNode.insertBefore(n,g)}}(window,document,"script","//d1fc8wv8zag5ca.cloudfront.net/2.8.0/sp.js","new_name_here"));
2828

2929
window.new_name_here('newTracker', 'cf', 'd3rkrsqld9gmqf.cloudfront.net', {
3030
encodeBase64: false,

examples/web/async-small.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
;(function(p,l,o,w,i,n,g){if(!p[i]){p.GlobalSnowplowNamespace=p.GlobalSnowplowNamespace||[];
2424
p.GlobalSnowplowNamespace.push(i);p[i]=function(){(p[i].q=p[i].q||[]).push(arguments)
2525
};p[i].q=p[i].q||[];n=l.createElement(o);g=l.getElementsByTagName(o)[0];n.async=1;
26-
n.src=w;g.parentNode.insertBefore(n,g)}}(window,document,"script","//d1fc8wv8zag5ca.cloudfront.net/2.7.2/sp.js","snowplow"));
26+
n.src=w;g.parentNode.insertBefore(n,g)}}(window,document,"script","//d1fc8wv8zag5ca.cloudfront.net/2.8.0/sp.js","snowplow"));
2727

2828
window.snowplow('newTracker', 'cf', 'd3rkrsqld9gmqf.cloudfront.net', { // Initialise a tracker
2929
encodeBase64: false, // Default is true

examples/web/sync.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
<!-- Snowplow starts plowing -->
2121
<script type="text/javascript">
22-
var spSrc = ('https:' == document.location.protocol ? 'https' : 'http') + '://d1fc8wv8zag5ca.cloudfront.net/2.7.0/sp.js';
22+
var spSrc = ('https:' == document.location.protocol ? 'https' : 'http') + '://d1fc8wv8zag5ca.cloudfront.net/2.8.0/sp.js';
2323
document.write(unescape("%3Cscript src='" + spSrc + "' type='text/javascript'%3E%3C/script%3E"));
2424
</script>
2525
<script type="text/javascript">

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "snowplow-tracker",
3-
"version": "2.7.2",
3+
"version": "2.8.0",
44
"dependencies": {
55
"browser-cookie-lite": "0.3.1",
66
"jstimezonedetect": "1.0.5",

src/js/forms.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ object.getFormTrackingManager = function (core, trackerId, contextAdder) {
161161

162162
lodash.forEach(innerElementTags, function (tagname) {
163163
lodash.forEach(form.getElementsByTagName(tagname), function (innerElement) {
164-
if (fieldFilter(innerElement) && !innerElement[trackingMarker]) {
164+
if (fieldFilter(innerElement) && !innerElement[trackingMarker] && innerElement.type.toLowerCase() !== 'password') {
165165
helpers.addEventListener(innerElement, 'change', getFormChangeListener(context), false);
166166
innerElement[trackingMarker] = true;
167167
}

0 commit comments

Comments
 (0)