workarea-google_tag_manager 4.3.2 → 4.3.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9ea907b260fea9b2d43e51a34af9731750d9cd60c4e30951e07445797d0224b3
4
- data.tar.gz: 25d54c35055e1a4e2718a068164c15acd361e5c3b477fd1f143118d0ab34b348
3
+ metadata.gz: a00d662dbe5ad2d2a21950bfdfce717edb9e933d54383ece7e2fdc64b090b1dc
4
+ data.tar.gz: a25d9f446ea898a5ff25ac7fdd8bbab0de59a1c6aaf645e89ae172dd9608a233
5
5
  SHA512:
6
- metadata.gz: 985415ef1ce00208c7987742c17846f5c230c680f38413e1c0e26dfe0e0b8e409e8aec052cc0fc5ee8059509b459a549afb7697ab01ac7621ade3a0c2c1f9690
7
- data.tar.gz: 90db61aa625c68d3aa4d7ca862f57984f9615cf2e7ef7eb76617bdd8c077fc4bcfc18ae0e282ec275ec6b636f673cbdf728896a893ddd384625123244fab82f2
6
+ metadata.gz: 90b2243b85af5caa9aafd83c2cb0d9327226a048dc96ab41d3ab1d1a508f06908f8193c74076f5e84b237c9e407a19965812cc8fc361f75435e2378eda93d50e
7
+ data.tar.gz: 0c51f0144bdaf05aa898c69e7bdfffc4b40036671b746575041c6fba23a69e17ebbc24e8b023a935b49ade767d8f2526d8548dbed80b789c7eb21bc49867ee31
@@ -0,0 +1,35 @@
1
+ {
2
+ "extends": "eslint:recommended",
3
+ "rules": {
4
+ "semi": ["error", "always"],
5
+ "eqeqeq": ["error", "always"]
6
+ },
7
+ "globals": {
8
+ "window": true,
9
+ "document": true,
10
+ "WORKAREA": true,
11
+ "$": true,
12
+ "jQuery": true,
13
+ "_": true,
14
+ "feature": true,
15
+ "JST": true,
16
+ "Turbolinks": true,
17
+ "I18n": true,
18
+ "Chart": true,
19
+ "Dropzone": true,
20
+ "strftime": true,
21
+ "Waypoint": true,
22
+ "wysihtml": true,
23
+ "LocalTime": true,
24
+ "describe": true,
25
+ "after": true,
26
+ "afterEach": true,
27
+ "before": true,
28
+ "beforeEach": true,
29
+ "it": true,
30
+ "expect": true,
31
+ "sinon": true,
32
+ "fixture": true,
33
+ "chai": true
34
+ }
35
+ }
@@ -0,0 +1,68 @@
1
+ name: CI
2
+ on: [push]
3
+
4
+ jobs:
5
+ static_analysis:
6
+ runs-on: ubuntu-latest
7
+ steps:
8
+ - uses: actions/checkout@v1
9
+ - uses: workarea-commerce/ci/bundler-audit@v1
10
+ - uses: workarea-commerce/ci/rubocop@v1
11
+ - uses: workarea-commerce/ci/eslint@v1
12
+ with:
13
+ args: '**/*.js'
14
+
15
+ admin_tests:
16
+ runs-on: ubuntu-latest
17
+ steps:
18
+ - uses: actions/checkout@v1
19
+ - uses: actions/setup-ruby@v1
20
+ with:
21
+ ruby-version: 2.6.x
22
+ - uses: workarea-commerce/ci/test@v1
23
+ with:
24
+ command: bin/rails app:workarea:test:admin
25
+
26
+ core_tests:
27
+ runs-on: ubuntu-latest
28
+ steps:
29
+ - uses: actions/checkout@v1
30
+ - uses: actions/setup-ruby@v1
31
+ with:
32
+ ruby-version: 2.6.x
33
+ - uses: workarea-commerce/ci/test@v1
34
+ with:
35
+ command: bin/rails app:workarea:test:core
36
+
37
+ storefront_tests:
38
+ runs-on: ubuntu-latest
39
+ steps:
40
+ - uses: actions/checkout@v1
41
+ - uses: actions/setup-ruby@v1
42
+ with:
43
+ ruby-version: 2.6.x
44
+ - uses: workarea-commerce/ci/test@v1
45
+ with:
46
+ command: bin/rails app:workarea:test:storefront
47
+
48
+ plugins_tests:
49
+ runs-on: ubuntu-latest
50
+ steps:
51
+ - uses: actions/checkout@v1
52
+ - uses: actions/setup-ruby@v1
53
+ with:
54
+ ruby-version: 2.6.x
55
+ - uses: workarea-commerce/ci/test@v1
56
+ with:
57
+ command: bin/rails app:workarea:test:plugins
58
+
59
+ teaspoon:
60
+ runs-on: ubuntu-latest
61
+ steps:
62
+ - uses: actions/checkout@v1
63
+ - uses: actions/setup-ruby@v1
64
+ with:
65
+ ruby-version: 2.6.x
66
+ - uses: workarea-commerce/ci/test@v1
67
+ with:
68
+ command: bin/rails app:teaspoon
data/.gitignore CHANGED
@@ -9,3 +9,4 @@ test/dummy/.sass-cache
9
9
  Gemfile.lock
10
10
  test/dummy/public/*
11
11
  .DS_STORE
12
+ .rubocop-http*
@@ -1,37 +1,3 @@
1
- # This configuration was generated by
2
- # `rubocop --auto-gen-config`
3
- # on 2017-05-02 15:21:42 -0400 using RuboCop version 0.46.0.
4
- # The point is for the user to remove these configuration records
5
- # one by one as the offenses are removed from the code base.
6
- # Note that changes in the inspected code, or installation of new
7
- # versions of RuboCop, may require this file to be generated again.
1
+ inherit_from:
2
+ - https://raw.githubusercontent.com/workarea-commerce/workarea/master/.rubocop.yml
8
3
 
9
- # Offense count: 24
10
- # Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
11
- # URISchemes: http, https
12
- AllCops:
13
- Exclude:
14
- - 'Rakefile'
15
- - 'test/dummy/**/*'
16
- - 'lib/workarea/google_tag_manager.rb'
17
- - 'lib/workarea/google_tag_manager/**/*'
18
-
19
- Metrics/LineLength:
20
- Exclude:
21
- - 'workarea-google_tag_manager.gemspec'
22
-
23
- Style/Documentation:
24
- Enabled: false
25
-
26
- # Offense count: 1
27
- # Cop supports --auto-correct.
28
- # Configuration parameters: EnforcedStyle, SupportedStyles.
29
- # SupportedStyles: use_perl_names, use_english_names
30
- Style/SpecialGlobalVars:
31
- Exclude:
32
- - 'workarea-google_tag_manager.gemspec'
33
-
34
- # Offense count: 1
35
- Metrics/LineLength:
36
- Exclude:
37
- - 'workarea-google_tag_manager.gemspec'
@@ -0,0 +1,8 @@
1
+ {
2
+ "extends": "stylelint-config-recommended-scss",
3
+ "rules": {
4
+ "block-no-empty": null,
5
+ "no-descending-specificity": null,
6
+ "property-no-unknown": [true, { "ignoreProperties": ["mso-hide"] }]
7
+ }
8
+ }
@@ -1,3 +1,28 @@
1
+ Workarea Google Tag Manager 4.3.3 (2020-06-18)
2
+ --------------------------------------------------------------------------------
3
+
4
+ * Use `product_name` in Order Item Payloads
5
+
6
+ When the `addToCart` and `removeFromCart` analytics events are fired,
7
+ the payload is populated from the `#order_item_analytics_data` helper in
8
+ Ruby. This payload stores the product name in an attribute called
9
+ `product_name`, but the analytics adapter was written to use the `.name`
10
+ attribute, so when analytics events made it to GTM, they would not be
11
+ populated with the product name. To fix this, the `product_name` field
12
+ is now used in both the `addToCart` and `removeFromCart` analytics
13
+ events in the google tag manager adapter.
14
+
15
+ GTM-2
16
+
17
+ Tom Scott
18
+
19
+ * Update README
20
+
21
+
22
+ Matt Duffy
23
+
24
+
25
+
1
26
  Workarea Google Tag Manager 4.3.2 (2019-08-22)
2
27
  --------------------------------------------------------------------------------
3
28
 
data/Gemfile CHANGED
@@ -1,5 +1,5 @@
1
1
  source 'https://rubygems.org'
2
- git_source(:github) { |repo| "git@github.com:#{repo}.git" }
2
+ git_source(:github) { |repo| "https://github.com/#{repo}.git" }
3
3
 
4
4
  # Declare your gem's dependencies in tag_manager.gemspec.
5
5
  # Bundler will treat runtime dependencies like base dependencies, and
@@ -12,4 +12,4 @@ gemspec
12
12
  # your gem to rubygems.org.
13
13
 
14
14
  # To use a debugger
15
- gem 'workarea'
15
+ gem 'workarea', github: 'workarea-commerce/workarea', branch: 'v3.5-stable'
data/README.md CHANGED
@@ -1,4 +1,5 @@
1
- # Workarea Tag Manager
1
+ Workarea Tag Manager
2
+ ================================================================================
2
3
 
3
4
  Google Tag Manager plugin for the Workarea platform.
4
5
  Including Enhanced ecommerce configuration.
@@ -7,15 +8,35 @@ Do not use this plugin for Google Analytics, workarea-google-analytics is well m
7
8
 
8
9
  Tag manager Sets up a dataLayer on the window and pushes all data to the dataLayer. This is read by GTM and can be used in custom variables.
9
10
 
10
- ## Configuring Google Tag Manager
11
+ Getting Started
12
+ --------------------------------------------------------------------------------
11
13
 
12
- In your applications workarea.rb initializer add the following configuration
14
+ Add the gem to your application's Gemfile:
15
+
16
+ ```ruby
17
+ # ...
18
+ gem 'workarea-google_tag_manager'
19
+ # ...
20
+ ```
21
+
22
+ Update your application's bundle.
23
+
24
+ ```bash
25
+ cd path/to/application
26
+ bundle
27
+ ```
28
+
29
+ Configuration
30
+ --------------------------------------------------------------------------------
31
+
32
+ In your applications `config/initializer/workarea.rb` add the following configuration:
13
33
 
14
34
  ```ruby
15
35
  Workarea.config.google_tag_manager.container_id = 'your-container-id'
16
36
  ```
17
37
 
18
- ## Shared Events
38
+ Shared Events
39
+ --------------------------------------------------------------------------------
19
40
 
20
41
  These Events are re-used by many of the events detailed in the Summary of events below
21
42
 
@@ -47,7 +68,8 @@ dataLayer:
47
68
  }
48
69
  }
49
70
 
50
- ## Summary of Events
71
+ Summary of Events
72
+ --------------------------------------------------------------------------------
51
73
 
52
74
  ### Category View
53
75
 
@@ -297,43 +319,12 @@ dataLayer:
297
319
  }
298
320
  }
299
321
 
300
- ## Getting Started
301
-
302
- This gem contains a rails engine that must be mounted onto a host Rails application.
303
-
304
- You must have access to a WebLinc gems server to use this gem. Add your gems server credentials to Bundler:
305
-
306
- bundle config gems.weblinc.com my_username:my_password
307
-
308
- Or set the appropriate environment variable in a shell startup file:
309
-
310
- export BUNDLE_GEMS__WEBLINC__COM='my_username:my_password'
311
-
312
- Then add the gem to your application's Gemfile specifying the source:
313
-
314
- # ...
315
- gem 'workarea-google_tag_manager', source: 'https://gems.weblinc.com'
316
- # ...
317
-
318
- Or use a source block:
319
-
320
- # ...
321
- source 'https://gems.weblinc.com' do
322
- gem 'workarea-google_tag_manager'
323
- end
324
- # ...
325
-
326
- Update your application's bundle.
327
-
328
- cd path/to/application
329
- bundle
330
-
331
- ## Workarea Platform Documentation
332
-
333
- See [http://developer.weblinc.com](http://developer.weblinc.com) for Workarea platform documentation.
322
+ Workarea Commerce Documentation
323
+ --------------------------------------------------------------------------------
334
324
 
335
- ## Copyright & Licensing
325
+ See [https://developer.workarea.com](https://developer.workarea.com) for Workarea Commerce documentation.
336
326
 
337
- Copyright Workarea 2015. All rights reserved.
327
+ License
328
+ --------------------------------------------------------------------------------
338
329
 
339
- For licensing, contact sales@workarea.com.
330
+ Workarea Google Tag Manager is released under the [Business Software License](LICENSE)
data/Rakefile CHANGED
@@ -38,13 +38,12 @@ desc "Release version #{Workarea::GoogleTagManager::VERSION} of the gem"
38
38
  task :release do
39
39
  host = "https://#{ENV['BUNDLE_GEMS__WEBLINC__COM']}@gems.weblinc.com"
40
40
 
41
- #Rake::Task['workarea:changelog'].execute
42
- #system 'git add CHANGELOG.md'
43
- #system 'git commit -m "Update CHANGELOG"'
44
- #system 'git push origin HEAD'
41
+ Rake::Task['workarea:changelog'].execute
42
+ system 'git add CHANGELOG.md'
43
+ system 'git commit -m "Update CHANGELOG"'
45
44
 
46
45
  system "git tag -a v#{Workarea::GoogleTagManager::VERSION} -m 'Tagging #{Workarea::GoogleTagManager::VERSION}'"
47
- system 'git push --tags'
46
+ system 'git push origin HEAD --follow-tags'
48
47
 
49
48
  system "gem build workarea-google_tag_manager.gemspec"
50
49
  system "gem push workarea-google_tag_manager-#{Workarea::GoogleTagManager::VERSION}.gem"
@@ -132,7 +132,7 @@ WORKAREA.analytics.registerAdapter('googleTagManager', function () {
132
132
  'add': {
133
133
  'products': [{
134
134
  'id': payload.id,
135
- 'name': payload.name,
135
+ 'name': payload.product_name,
136
136
  'category': payload.category,
137
137
  'variant': payload.sku,
138
138
  'price': payload.price,
@@ -150,7 +150,7 @@ WORKAREA.analytics.registerAdapter('googleTagManager', function () {
150
150
  'remove': {
151
151
  'products': [{
152
152
  'id': payload.id,
153
- 'name': payload.name,
153
+ 'name': payload.product_name,
154
154
  'category': payload.category,
155
155
  'variant': payload.sku,
156
156
  'price': payload.price,
@@ -1,5 +1,5 @@
1
1
  module Workarea
2
2
  module GoogleTagManager
3
- VERSION = "4.3.2"
3
+ VERSION = "4.3.3"
4
4
  end
5
5
  end
@@ -25,4 +25,3 @@ module Dummy
25
25
  # -- all .rb files in that directory are automatically loaded.
26
26
  end
27
27
  end
28
-
@@ -114,26 +114,6 @@
114
114
  after(teardown);
115
115
  });
116
116
 
117
-
118
- describe('productQuickView', function () {
119
- before(function(){
120
- WORKAREA.analytics.fireCallback('productQuickView',
121
- {
122
- "terms" : "query string",
123
- "sort" : "top_sellers",
124
- "page" : 1,
125
- }
126
- );
127
- });
128
-
129
- it('pushes the quickview event to the dataLayer', function () {
130
- expect(window.dataLayer[0].event).to.eq('quickview');
131
- });
132
-
133
- after(teardown);
134
- });
135
-
136
-
137
117
  describe('productView', function () {
138
118
  before(function(){
139
119
  WORKAREA.analytics.fireCallback('productView',
@@ -171,7 +151,7 @@
171
151
  {
172
152
  'category' : 'Automotive',
173
153
  'id' : '4AF99AB7C8',
174
- 'name' : 'Heavy Duty Iron Bag',
154
+ 'product_name' : 'Heavy Duty Iron Bag',
175
155
  'price' : 80.76,
176
156
  'quantity' : '1',
177
157
  'sale' : false,
@@ -207,7 +187,7 @@
207
187
  {
208
188
  'category' : 'Automotive',
209
189
  'id' : '4AF99AB7C8',
210
- 'name' : 'Heavy Duty Iron Bag',
190
+ 'product_name' : 'Heavy Duty Iron Bag',
211
191
  'price' : 80.76,
212
192
  'quantity' : '1',
213
193
  'sale' : false,
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: workarea-google_tag_manager
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.3.2
4
+ version: 4.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Curt Howard
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-08-22 00:00:00.000000000 Z
11
+ date: 2020-06-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: workarea
@@ -32,17 +32,19 @@ extensions: []
32
32
  extra_rdoc_files: []
33
33
  files:
34
34
  - ".editorconfig"
35
+ - ".eslintrc.json"
35
36
  - ".github/ISSUE_TEMPLATE/bug_report.md"
36
37
  - ".github/ISSUE_TEMPLATE/documentation-request.md"
37
38
  - ".github/ISSUE_TEMPLATE/feature_request.md"
39
+ - ".github/workflows/ci.yml"
38
40
  - ".gitignore"
39
41
  - ".rubocop.yml"
42
+ - ".stylelintrc.json"
40
43
  - CHANGELOG.md
41
44
  - CODE_OF_CONDUCT.md
42
45
  - CONTRIBUTING.md
43
46
  - Gemfile
44
47
  - LICENSE
45
- - LICENSE.md
46
48
  - README.md
47
49
  - Rakefile
48
50
  - app/assets/javascripts/workarea/storefront/google_tag_manager/modules/adapter.js
@@ -76,7 +78,6 @@ files:
76
78
  - test/dummy/config/initializers/inflections.rb
77
79
  - test/dummy/config/initializers/mime_types.rb
78
80
  - test/dummy/config/initializers/new_framework_defaults.rb
79
- - test/dummy/config/initializers/session_store.rb
80
81
  - test/dummy/config/initializers/workarea.rb
81
82
  - test/dummy/config/initializers/wrap_parameters.rb
82
83
  - test/dummy/config/locales/en.yml
@@ -112,44 +113,43 @@ required_rubygems_version: !ruby/object:Gem::Requirement
112
113
  - !ruby/object:Gem::Version
113
114
  version: '0'
114
115
  requirements: []
115
- rubygems_version: 3.0.4
116
+ rubygems_version: 3.0.3
116
117
  signing_key:
117
118
  specification_version: 4
118
119
  summary: Google Tag Manager for the Workarea Commerce Platform
119
120
  test_files:
120
- - test/test_helper.rb
121
- - test/dummy/Rakefile
122
- - test/dummy/config/initializers/workarea.rb
123
- - test/dummy/config/initializers/assets.rb
124
- - test/dummy/config/initializers/wrap_parameters.rb
125
- - test/dummy/config/initializers/application_controller_renderer.rb
126
- - test/dummy/config/initializers/new_framework_defaults.rb
127
- - test/dummy/config/initializers/cookies_serializer.rb
128
- - test/dummy/config/initializers/filter_parameter_logging.rb
129
- - test/dummy/config/initializers/inflections.rb
130
- - test/dummy/config/initializers/backtrace_silencers.rb
131
- - test/dummy/config/initializers/session_store.rb
132
- - test/dummy/config/initializers/mime_types.rb
133
- - test/dummy/config/spring.rb
134
- - test/dummy/config/locales/en.yml
121
+ - test/dummy/bin/update
122
+ - test/dummy/bin/rake
123
+ - test/dummy/bin/setup
124
+ - test/dummy/bin/bundle
125
+ - test/dummy/bin/rails
126
+ - test/dummy/config/secrets.yml
135
127
  - test/dummy/config/routes.rb
128
+ - test/dummy/config/locales/en.yml
136
129
  - test/dummy/config/cable.yml
130
+ - test/dummy/config/environments/production.rb
131
+ - test/dummy/config/environments/development.rb
132
+ - test/dummy/config/environments/test.rb
133
+ - test/dummy/config/spring.rb
137
134
  - test/dummy/config/environment.rb
138
- - test/dummy/config/boot.rb
139
- - test/dummy/config/secrets.yml
140
135
  - test/dummy/config/application.rb
141
136
  - test/dummy/config/puma.rb
142
- - test/dummy/config/environments/test.rb
143
- - test/dummy/config/environments/development.rb
144
- - test/dummy/config/environments/production.rb
137
+ - test/dummy/config/boot.rb
138
+ - test/dummy/config/initializers/application_controller_renderer.rb
139
+ - test/dummy/config/initializers/backtrace_silencers.rb
140
+ - test/dummy/config/initializers/mime_types.rb
141
+ - test/dummy/config/initializers/filter_parameter_logging.rb
142
+ - test/dummy/config/initializers/wrap_parameters.rb
143
+ - test/dummy/config/initializers/new_framework_defaults.rb
144
+ - test/dummy/config/initializers/assets.rb
145
+ - test/dummy/config/initializers/cookies_serializer.rb
146
+ - test/dummy/config/initializers/workarea.rb
147
+ - test/dummy/config/initializers/inflections.rb
145
148
  - test/dummy/config.ru
149
+ - test/dummy/Rakefile
146
150
  - test/dummy/log/sidekiq.log
147
- - test/dummy/bin/bundle
148
- - test/dummy/bin/update
149
- - test/dummy/bin/rails
150
- - test/dummy/bin/rake
151
- - test/dummy/bin/setup
152
151
  - test/javascripts/google_tag_manager_spec.js
153
- - test/javascripts/fixtures/payloads.js
154
152
  - test/javascripts/spec_helper.js
153
+ - test/javascripts/fixtures/payloads.js
154
+ - test/test_helper.rb
155
155
  - test/teaspoon_env.rb
data/LICENSE.md DELETED
@@ -1,3 +0,0 @@
1
- View this plugin's license here:
2
-
3
- <https://github.com/workarea-commerce/workarea/blob/master/LICENSE.md>
@@ -1,3 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- Rails.application.config.session_store :cookie_store, key: '_dummy_session'