social-share-button 0.8.1 → 0.8.2

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: 5fb846549368b3f0e2ded2a8c3f5ffc75c2030e3
4
- data.tar.gz: 53a136baa92a86900e2fe8d317bd88dec3d25d3e
3
+ metadata.gz: 1b2c810f9120de773ce8c2782d5d2833da53fb3c
4
+ data.tar.gz: f43744c4a675708a27c7f539f259bc2b784cf055
5
5
  SHA512:
6
- metadata.gz: 5eaa3c5614c0e7ea9b3962cc4749ce0fa0e3028480e20a0d86ced4961951282d7305ffecd97e5115615243d6d05454216614e9b5f7ad1113e179e2f09690af9e
7
- data.tar.gz: dee528f687864be12ab5ff8b7f53d4aba3b3c466b8182662c083fc3f78adb4dc9e1b487da3b764a826b8f0eeb2927f564a958fa1a02c08a8a846449f03bd4da1
6
+ metadata.gz: 9c63afe86736ab4495a80586444fc65e9a076f7ed068d279e861baf41934ec674659728de21d9c8e5ff1be1a35a69bd62e36e7f3bbaead7a47ab0ba917c2b878
7
+ data.tar.gz: 238b808e184f9af6397e803e825036b6c149bd7837f95e4e3957985bf4c9f6314f71c048e3e7dc1258888602ce59fdf5d60b1f85aa670a43424c9519872365c0
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ == 0.8.2
2
+
3
+ * Add google analytics code to track share button click events. (#106)
4
+
1
5
  == 0.8.1
2
6
 
3
7
  * Fix wechat typo. (#103)
@@ -16,6 +16,11 @@ window.SocialShareButton =
16
16
  via = encodeURIComponent($parent.data("via") || '')
17
17
  desc = encodeURIComponent($parent.data("desc") || ' ')
18
18
 
19
+ # tracking click events if google analytics enabled
20
+ ga = window[window['GoogleAnalyticsObject'] || 'ga']
21
+ if typeof ga == 'function'
22
+ ga('send', 'event', 'Social Share Button', 'click', site)
23
+
19
24
  if url.length == 0
20
25
  url = encodeURIComponent(location.href)
21
26
  switch site
@@ -1,3 +1,3 @@
1
1
  module SocialShareButton
2
- VERSION = '0.8.1'
2
+ VERSION = '0.8.2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: social-share-button
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.1
4
+ version: 0.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jason Lee
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-10-24 00:00:00.000000000 Z
11
+ date: 2016-11-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails