govuk_frontend_toolkit 6.0.2 → 6.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 526290e0d6a639b3fb8050860e0a182aebaff1dc
4
- data.tar.gz: 58d711eecec56c5dc538fa8cfadcef312a7a0a2a
3
+ metadata.gz: 2123d895ea1f087dab79dce5c997cb67583752a0
4
+ data.tar.gz: 2f9363cec91c82e7395e03e344ff1e86ae6e998d
5
5
  SHA512:
6
- metadata.gz: 595690d09b02873b1b475f649e19211c3f47ab8b0f7326281f16eea4d4ca6ec4507e0ef9705d1038717013d4b9e027dae4e78454628826fbc5ff13885814d6e4
7
- data.tar.gz: 205865d691b8d3fea0c54be6e0e0d2b136853f30d46f0e045b1b19b0363ccec048bbcf8007cd4814dcd35cb139f0061acd7b9691116e0f342c0ac4b5c1761a5a
6
+ metadata.gz: ce55114817c07322bf2d62f5ff38109088db66785680899091f5fce56d0f424e0c7b03316b7bfd42018b9c8c540ee18263d8f7a0bc58e469db18a1b1778b077d
7
+ data.tar.gz: 70978bf4e28e49aa25a7b825e8bc68eae044579ca262666dcd257c35983a178ee8212daf8bc45ffbfacaa4deb59a9559cb7486c2987f412247ac9f57119e9b24
@@ -1,3 +1,10 @@
1
+ # 6.0.3
2
+
3
+ - Allow the passing of a [fields object](https://developers.google.com/analytics/devguides/collection/analyticsjs/field-reference)
4
+ to the `trackShare` method in analytics, in line with the Google Analytics
5
+ [social interactions API](https://developers.google.com/analytics/devguides/collection/analyticsjs/social-interactions)
6
+ - Add documentation for new version releases
7
+
1
8
  # 6.0.2
2
9
 
3
10
  - Increase button focus specificity to avoid being overridden by govuk_template ([PR #409](https://github.com/alphagov/govuk_frontend_toolkit/pull/409))
@@ -9,8 +9,13 @@ guidelines:
9
9
 
10
10
  ## Versioning
11
11
 
12
- We use [semantic versioning](http://semver.org/), and bump the version
13
- on master only. Please don't submit your own proposed version numbers.
12
+ We use [Semantic Versioning](http://semver.org/).
13
+
14
+ ## Releasing a new version
15
+
16
+ 1. Create a branch that proposes a new [version number](https://github.com/alphagov/govuk_frontend_toolkit/blob/master/VERSION.txt) and update the [`CHANGELOG`](https://github.com/alphagov/govuk_frontend_toolkit/blob/master/CHANGELOG.md). To see the commits to be summarised in the changelog since the last release, [compare the latest-release branch with master](https://github.com/alphagov/govuk_frontend_toolkit/compare/latest-release...master).
17
+ 2. Open a Pull Request - here is a [good example](https://github.com/alphagov/govuk_frontend_toolkit/pull/396).
18
+ 3. Once merged into master a new version will be built and [downstream jobs triggered by Travis CI](https://github.com/alphagov/govuk_frontend_toolkit/blob/master/.travis.yml) for [govuk_frontend_toolkit_gem](https://github.com/alphagov/govuk_frontend_toolkit_gem) and [govuk_frontend_toolkit_npm](https://github.com/alphagov/govuk_frontend_toolkit_npm).
14
19
 
15
20
  ## Commit hygiene
16
21
 
@@ -1 +1 @@
1
- 6.0.2
1
+ 6.0.3
@@ -50,8 +50,8 @@
50
50
  this.sendToTrackers('trackEvent', arguments)
51
51
  }
52
52
 
53
- Analytics.prototype.trackShare = function (network) {
54
- this.sendToTrackers('trackSocial', [network, 'share', global.location.pathname])
53
+ Analytics.prototype.trackShare = function (network, options) {
54
+ this.sendToTrackers('trackSocial', [network, 'share', global.location.pathname, options])
55
55
  }
56
56
 
57
57
  /*
@@ -112,13 +112,17 @@
112
112
  target – Specifies the target of a social interaction.
113
113
  This value is typically a URL but can be any text.
114
114
  */
115
- GoogleAnalyticsUniversalTracker.prototype.trackSocial = function (network, action, target) {
116
- sendToGa('send', {
115
+ GoogleAnalyticsUniversalTracker.prototype.trackSocial = function (network, action, target, options) {
116
+ var trackingOptions = {
117
117
  'hitType': 'social',
118
118
  'socialNetwork': network,
119
119
  'socialAction': action,
120
120
  'socialTarget': target
121
- })
121
+ }
122
+
123
+ $.extend(trackingOptions, options)
124
+
125
+ sendToGa('send', trackingOptions)
122
126
  }
123
127
 
124
128
  /*
@@ -61,12 +61,16 @@
61
61
  this.sendToTracker('event', evt)
62
62
  }
63
63
 
64
- GOVUKTracker.prototype.trackSocial = function (network, action, target) {
65
- this.sendToTracker('social', {
64
+ GOVUKTracker.prototype.trackSocial = function (network, action, target, options) {
65
+ var trackingOptions = {
66
66
  'socialNetwork': network,
67
67
  'socialAction': action,
68
68
  'socialTarget': target
69
- })
69
+ }
70
+
71
+ $.extend(trackingOptions, options)
72
+
73
+ this.sendToTracker('social', trackingOptions)
70
74
  }
71
75
 
72
76
  GOVUKTracker.prototype.addLinkedTrackerDomain = function () { /* noop */ }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: govuk_frontend_toolkit
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.0.2
4
+ version: 6.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Government Digital Service
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-05-11 00:00:00.000000000 Z
11
+ date: 2017-05-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails