workarea-google_analytics 2.1.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (76) hide show
  1. checksums.yaml +7 -0
  2. data/.editorconfig +20 -0
  3. data/.github/ISSUE_TEMPLATE/bug_report.md +37 -0
  4. data/.github/ISSUE_TEMPLATE/documentation-request.md +17 -0
  5. data/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
  6. data/.gitignore +15 -0
  7. data/.rspec +2 -0
  8. data/.yardopts +1 -0
  9. data/CHANGELOG.md +217 -0
  10. data/CODE_OF_CONDUCT.md +3 -0
  11. data/CONTRIBUTING.md +3 -0
  12. data/Gemfile +6 -0
  13. data/LICENSE +52 -0
  14. data/README.md +589 -0
  15. data/Rakefile +31 -0
  16. data/app/assets/javascripts/workarea/storefront/google_analytics/modules/adapter.js +314 -0
  17. data/app/views/workarea/storefront/analytics/_google_analytics.html.haml +6 -0
  18. data/bin/rails +18 -0
  19. data/config/initializers/appends.rb +9 -0
  20. data/config/initializers/configuration.rb +1 -0
  21. data/config/routes.rb +2 -0
  22. data/lib/tasks/google_analytics_tasks.rake +4 -0
  23. data/lib/workarea/google_analytics/engine.rb +8 -0
  24. data/lib/workarea/google_analytics/version.rb +5 -0
  25. data/lib/workarea/google_analytics.rb +10 -0
  26. data/test/dummy/README.rdoc +28 -0
  27. data/test/dummy/Rakefile +6 -0
  28. data/test/dummy/app/assets/images/.keep +0 -0
  29. data/test/dummy/app/assets/javascripts/application.js +13 -0
  30. data/test/dummy/app/assets/stylesheets/application.css +15 -0
  31. data/test/dummy/app/controllers/application_controller.rb +5 -0
  32. data/test/dummy/app/controllers/concerns/.keep +0 -0
  33. data/test/dummy/app/helpers/application_helper.rb +2 -0
  34. data/test/dummy/app/mailers/.keep +0 -0
  35. data/test/dummy/app/models/.keep +0 -0
  36. data/test/dummy/app/models/concerns/.keep +0 -0
  37. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  38. data/test/dummy/bin/bundle +3 -0
  39. data/test/dummy/bin/rails +4 -0
  40. data/test/dummy/bin/rake +4 -0
  41. data/test/dummy/bin/setup +34 -0
  42. data/test/dummy/bin/update +29 -0
  43. data/test/dummy/config/application.rb +21 -0
  44. data/test/dummy/config/boot.rb +5 -0
  45. data/test/dummy/config/cable.yml +9 -0
  46. data/test/dummy/config/environment.rb +5 -0
  47. data/test/dummy/config/environments/development.rb +57 -0
  48. data/test/dummy/config/environments/production.rb +86 -0
  49. data/test/dummy/config/environments/test.rb +43 -0
  50. data/test/dummy/config/initializers/application_controller_renderer.rb +6 -0
  51. data/test/dummy/config/initializers/assets.rb +11 -0
  52. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  53. data/test/dummy/config/initializers/cookies_serializer.rb +5 -0
  54. data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  55. data/test/dummy/config/initializers/inflections.rb +16 -0
  56. data/test/dummy/config/initializers/mime_types.rb +4 -0
  57. data/test/dummy/config/initializers/new_framework_defaults.rb +17 -0
  58. data/test/dummy/config/initializers/session_store.rb +3 -0
  59. data/test/dummy/config/initializers/workarea.rb +7 -0
  60. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  61. data/test/dummy/config/locales/en.yml +23 -0
  62. data/test/dummy/config/puma.rb +47 -0
  63. data/test/dummy/config/routes.rb +5 -0
  64. data/test/dummy/config/secrets.yml +22 -0
  65. data/test/dummy/config/spring.rb +6 -0
  66. data/test/dummy/config.ru +4 -0
  67. data/test/dummy/db/seeds.rb +10 -0
  68. data/test/dummy/lib/assets/.keep +0 -0
  69. data/test/dummy/log/.keep +0 -0
  70. data/test/dummy/public/404.html +67 -0
  71. data/test/dummy/public/422.html +67 -0
  72. data/test/dummy/public/500.html +66 -0
  73. data/test/dummy/public/favicon.ico +1 -0
  74. data/test/test_helper.rb +10 -0
  75. data/workarea-google_analytics.gemspec +21 -0
  76. metadata +132 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 0c4f250208db326405bce7938e7d906908f98a66fdf33c0dc6ef9db3c6dbb43f
4
+ data.tar.gz: c4217dd32dfe0e486eea6c2351b702d7638ab63545ac1aee9b364c5d5586b84f
5
+ SHA512:
6
+ metadata.gz: d6ed90500cc674786541834e78b2212b8ba253d905bebd6a3d62cd52f093cd0626cebcbb01f617c3583c84c5ad5a0b8f8fb7816202691695d4990c3bfe661794
7
+ data.tar.gz: 9ed033f73b2db2d50a23b6f831ca947822b76f623da5555d7bc6a869bd4febf44935b8f4b660215d425bffd129077be9fc3f9d5279afbbbd12ec79db9a77f78e
data/.editorconfig ADDED
@@ -0,0 +1,20 @@
1
+ # editorconfig.org
2
+ root = true
3
+
4
+ [*]
5
+ charset = utf-8
6
+ indent_style = space
7
+ end_of_line = lf
8
+ trim_trailing_whitespace = true
9
+ insert_final_newline = true
10
+
11
+ [{*.rb,*.haml,*.decorator,*.yml,*.yaml,*.jbuilder}]
12
+ indent_size = 2
13
+ indent_style = space
14
+
15
+ [{*.js,*.jst,*.ejs,*.scss}]
16
+ indent_size = 4
17
+
18
+ [*.md]
19
+ indent_size = 4
20
+ trim_trailing_whitespace = false
@@ -0,0 +1,37 @@
1
+ ---
2
+ name: Bug report
3
+ about: Create a report to help us improve Workarea
4
+ title: ''
5
+ labels: bug
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ ⚠️**Before you create**⚠️
11
+ Please verify the issue you're experiencing is not part of your Workarea project customizations. The best way to do this is with a [vanilla Workarea installation](https://developer.workarea.com/articles/create-a-new-host-application.html). This will help us spend time on fixes/improvements for the whole community. Thank you!
12
+
13
+ **Describe the bug**
14
+ A clear and concise description of what the bug is.
15
+
16
+ **To Reproduce**
17
+ Steps to reproduce the behavior:
18
+ 1. Go to '...'
19
+ 2. Click on '....'
20
+ 3. Scroll down to '....'
21
+ 4. See error
22
+
23
+ **Expected behavior**
24
+ A clear and concise description of what you expected to happen.
25
+
26
+ **Workarea Setup (please complete the following information):**
27
+ - Workarea Version: [e.g. v3.4.6]
28
+ - Plugins [e.g. workarea-blog, workarea-sitemaps]
29
+
30
+ **Attachments**
31
+ If applicable, add any attachments to help explain your problem, things like:
32
+ - screenshots
33
+ - Gemfile.lock
34
+ - test cases
35
+
36
+ **Additional context**
37
+ Add any other context about the problem here.
@@ -0,0 +1,17 @@
1
+ ---
2
+ name: Documentation request
3
+ about: Suggest documentation
4
+ title: ''
5
+ labels: documentation
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ **Is your documentation related to a problem? Please describe.**
11
+ A clear and concise description of what the problem is. Ex. I'm confused by [...]
12
+
13
+ **Describe the article you'd like**
14
+ A clear and concise description of what would be in the documentation article.
15
+
16
+ **Additional context**
17
+ Add any other context or screenshots about the feature request here.
@@ -0,0 +1,20 @@
1
+ ---
2
+ name: Feature request
3
+ about: Suggest an idea for Workarea
4
+ title: ''
5
+ labels: enhancement
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ **Is your feature request related to a problem? Please describe.**
11
+ A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12
+
13
+ **Describe the solution you'd like**
14
+ A clear and concise description of what you want to happen.
15
+
16
+ **Describe alternatives you've considered**
17
+ A clear and concise description of any alternative solutions or features you've considered.
18
+
19
+ **Additional context**
20
+ Add any other context or screenshots about the feature request here.
data/.gitignore ADDED
@@ -0,0 +1,15 @@
1
+ .bundle/
2
+ log/*.log
3
+ pkg/
4
+ test/dummy/db/*.sqlite3
5
+ test/dummy/db/*.sqlite3-journal
6
+ test/dummy/log/*.log
7
+ test/dummy/tmp/
8
+ test/dummy/.sass-cache
9
+ Gemfile.lock
10
+ spec/dummy/public/system/dragonfly
11
+ .DS_STORE
12
+ node_modules
13
+ test/reports
14
+ package.json
15
+ yarn.lock
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --colour
2
+ --failure-exit-code 0
data/.yardopts ADDED
@@ -0,0 +1 @@
1
+ --files CHANGELOG.md
data/CHANGELOG.md ADDED
@@ -0,0 +1,217 @@
1
+ Workarea Google Analytics 2.1.5 (2019-08-21)
2
+ --------------------------------------------------------------------------------
3
+
4
+ * Open Source!
5
+
6
+
7
+
8
+ Workarea Google Analytics 2.1.4 (2019-06-11)
9
+ --------------------------------------------------------------------------------
10
+
11
+ * Fix Configuration Docs Formatting
12
+
13
+ The YAML and Ruby code examples in the "Configuration" section of the
14
+ Workarea Google Analytics README weren't contained within code blocks,
15
+ so they were formatted as Markdown when rendered in Homebase. This has
16
+ been fixed and the aformentioned code blocks are now rendered as code, not
17
+ as Markdown.
18
+
19
+ Discovered by **Lance Harman**. Thanks for spotting this one, Lance!
20
+
21
+ WGAG-41
22
+ Tom Scott
23
+
24
+ * Update for workarea v3.4 compatibility
25
+
26
+ WGAG-40
27
+ Matt Duffy
28
+
29
+ * Fix JS linting errors
30
+
31
+ ECOMMERCE-6081
32
+ Ben Crouse
33
+
34
+ * Leverage Workarea Changelog task
35
+
36
+ ECOMMERCE-5355
37
+ Curt Howard
38
+
39
+
40
+
41
+ WebLinc Google Analytics 2.1.3 (2017-12-12)
42
+ --------------------------------------------------------------------------------
43
+
44
+ * Prevent Google Analytics firing events in test
45
+
46
+ When the Rails environment is 'test', the Google Analytics script tag
47
+ shouldn't actually send out events. This can cause extra data to appear
48
+ in Google Analytics for a client, like "Integration Product", if one
49
+ accidentally leaves in a production GA ID in their test secrets. We're
50
+ now only sending GA analytics events if the rails_env is not 'test'.
51
+
52
+ WGAG-34
53
+ Tom Scott
54
+
55
+
56
+ WebLinc Google Analytics 2.1.2 (2017-10-31)
57
+ --------------------------------------------------------------------------------
58
+
59
+ * Move configuration into initializers
60
+
61
+ WGAG-35
62
+ Matt Duffy
63
+
64
+ WebLinc Google Analytics 2.1.1 (2017-09-06)
65
+ --------------------------------------------------------------------------------
66
+
67
+ * Updates payload for orders to use the correct order id.
68
+ WGAG-32
69
+ F.M. Bonnevier
70
+
71
+ * Update addCartItem event to addToCartConfirmation
72
+
73
+ WGAG-30
74
+ Curt Howard
75
+
76
+ * Hook into cart item confirmation analytics event
77
+
78
+ WGAG-30
79
+ Curt Howard
80
+
81
+ * Fix typos in README
82
+
83
+ WGAG-28
84
+ Jake Beresford
85
+
86
+ * Removed redundant callback for checkoutLoginView and decrement subsequent checkout step values
87
+
88
+ WGAG-29
89
+ Jake Beresford
90
+
91
+ * Adds a summary of all events and payloads to the README
92
+
93
+ WGAG-28
94
+ Jake Beresford
95
+
96
+
97
+ WebLinc Google Analytics 2.1.0 (2017-08-08)
98
+ --------------------------------------------------------------------------------
99
+
100
+ * Fix typos in README
101
+
102
+ WGAG-28
103
+ Jake Beresford
104
+
105
+ * Removed redundant callback for checkoutLoginView and decrement subsequent checkout step values
106
+
107
+ WGAG-29
108
+ Jake Beresford
109
+
110
+ * Adds a summary of all events and payloads to the README
111
+
112
+ WGAG-28
113
+ Jake Beresford
114
+
115
+
116
+ WebLinc Google Analytics 2.0.0 (2017-05-01)
117
+ --------------------------------------------------------------------------------
118
+
119
+ * Upgrade google analytics for v3 compatability.
120
+
121
+ WGAG-25
122
+ Beresford, Jake
123
+
124
+ * Add callback for validation error analytics events.
125
+
126
+ WGAG-17
127
+ Beresford, Jake
128
+
129
+ * Add Google Analytics callback for flashMessage analytics events.
130
+
131
+ WGAG-16
132
+ Beresford, Jake
133
+
134
+ * Add callback function for checkoutEdit button click analytics events.
135
+
136
+ WGAG-19
137
+ Beresford, Jake
138
+
139
+ * Add callback function for primary navigation click analytics events.
140
+
141
+ WGAG-15
142
+ Beresford, Jake
143
+
144
+ * Simplify the pageView callback for google analytics adapter.
145
+
146
+ Logic to check whether the GA script has loaded is unnecessary, removing this logic reduces the size of the codebase.
147
+
148
+ * Also removed unnecessary .keep files
149
+
150
+ WGAG-10
151
+ Beresford, Jake
152
+
153
+ * Send browsing filter data as events
154
+
155
+ Filter was previously omitted from the event offering for categoryView
156
+ and searchResultsView events.
157
+
158
+ WGAG-23
159
+ Curt Howard
160
+
161
+ * Fix categoryView/searchResultsView event reporting
162
+
163
+ Send category name, page number, and current sort values as 'labels' in
164
+ three separate event calls.
165
+
166
+ WGAG-22
167
+ Curt Howard
168
+
169
+ * Add nonInteraction parameter to events that fire on page load
170
+
171
+ Without nonInteraction set to true on events that are fired on page load, google analytics interprets the event as a user interaction, and therefore affects bounce rate. Even if the user doesn't view any subsequent pages, GA will not track that as a bounce. This parameter tells google that our event is not another interaction by the user.
172
+
173
+ WGAG-4
174
+ bberg
175
+
176
+
177
+ WebLinc Google Analytics 1.0.3 (2016-09-27)
178
+ --------------------------------------------------------------------------------
179
+
180
+ * Send browsing filter data as events
181
+
182
+ Filter was previously omitted from the event offering for categoryView
183
+ and searchResultsView events.
184
+
185
+ WGAG-23
186
+ Curt Howard
187
+
188
+ * Fix categoryView/searchResultsView event reporting
189
+
190
+ Send category name, page number, and current sort values as 'labels' in
191
+ three separate event calls.
192
+
193
+ WGAG-22
194
+ Curt Howard
195
+
196
+
197
+ WebLinc Google Analytics 1.0.2 (2016-04-04)
198
+ --------------------------------------------------------------------------------
199
+
200
+
201
+ WebLinc Google Analytics 1.0.1 (2016-03-28)
202
+ --------------------------------------------------------------------------------
203
+
204
+ * Add nonInteraction parameter to events that fire on page load
205
+
206
+ Without nonInteraction set to true on events that are fired on page load, google analytics interprets the event as a user interaction, and therefore affects bounce rate. Even if the user doesn't view any subsequent pages, GA will not track that as a bounce. This parameter tells google that our event is not another interaction by the user.
207
+
208
+ WGAG-4
209
+ bberg
210
+
211
+
212
+ WebLinc Google Analytics 1.0.0 (January 13, 2016)
213
+ --------------------------------------------------------------------------------
214
+
215
+ * Update for compatibility with WebLinc 2.0
216
+
217
+ * Replace absolute URLs with relative paths
@@ -0,0 +1,3 @@
1
+ View this plugin's code of conduct here:
2
+
3
+ <https://github.com/workarea-commerce/workarea/blob/master/CODE_OF_CONDUCT.md>
data/CONTRIBUTING.md ADDED
@@ -0,0 +1,3 @@
1
+ View this plugin's contribution guidelines here:
2
+
3
+ <https://github.com/workarea-commerce/workarea/blob/master/CONTRIBUTING.md>
data/Gemfile ADDED
@@ -0,0 +1,6 @@
1
+ source 'https://rubygems.org'
2
+ git_source(:github) { |repo| "git@github.com:#{repo}.git" }
3
+
4
+ gemspec
5
+
6
+ gem 'workarea', github: 'workarea-commerce/workarea'
data/LICENSE ADDED
@@ -0,0 +1,52 @@
1
+ WebLinc
2
+ Business Source License
3
+
4
+ Licensor: WebLinc Corporation, 22 S. 3rd Street, 2nd Floor, Philadelphia PA 19106
5
+
6
+ Licensed Work: Workarea Commerce Platform
7
+ The Licensed Work is (c) 2019 WebLinc Corporation
8
+
9
+ Additional Use Grant:
10
+ You may make production use of the Licensed Work without an additional license agreement with WebLinc so long as you do not use the Licensed Work for a Commerce Service.
11
+
12
+ A "Commerce Service" is a commercial offering that allows third parties (other than your employees and contractors) to access the functionality of the Licensed Work by creating or managing commerce functionality, the products, taxonomy, assets and/or content of which are controlled by such third parties.
13
+
14
+ For information about obtaining an additional license agreement with WebLinc, contact licensing@workarea.com.
15
+
16
+ Change Date: 2019-08-20
17
+
18
+ Change License: Version 2.0 or later of the GNU General Public License as published by the Free Software Foundation
19
+
20
+ Terms
21
+
22
+ The Licensor hereby grants you the right to copy, modify, create derivative works, redistribute, and make non-production use of the Licensed Work. The Licensor may make an Additional Use Grant, above, permitting limited production use.
23
+
24
+ Effective on the Change Date, or the fourth anniversary of the first publicly available distribution of a specific version of the Licensed Work under this License, whichever comes first, the Licensor hereby grants you rights under the terms of the Change License, and the rights granted in the paragraph above terminate.
25
+
26
+ If your use of the Licensed Work does not comply with the requirements currently in effect as described in this License, you must purchase a commercial license from the Licensor, its affiliated entities, or authorized resellers, or you must refrain from using the Licensed Work.
27
+
28
+ All copies of the original and modified Licensed Work, and derivative works of the Licensed Work, are subject to this License. This License applies separately for each version of the Licensed Work and the Change Date may vary for each version of the Licensed Work released by Licensor.
29
+
30
+ You must conspicuously display this License on each original or modified copy of the Licensed Work. If you receive the Licensed Work in original or modified form from a third party, the terms and conditions set forth in this License apply to your use of that work.
31
+
32
+ Any use of the Licensed Work in violation of this License will automatically terminate your rights under this License for the current and all other versions of the Licensed Work.
33
+
34
+ This License does not grant you any right in any trademark or logo of Licensor or its affiliates (provided that you may use a trademark or logo of Licensor as expressly required by this License). TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON AN "AS IS" BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS, EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND TITLE. MariaDB hereby grants you permission to use this License’s text to license your works and to refer to it using the trademark "Business Source License" as long as you comply with the Covenants of Licensor below.
35
+
36
+ Covenants of Licensor
37
+ In consideration of the right to use this License’s text and the "Business Source License" name and trademark, Licensor covenants to MariaDB, and to all other recipients of the licensed work to be provided by Licensor:
38
+
39
+ To specify as the Change License the GPL Version 2.0 or any later version, or a license that is compatible with GPL Version 2.0 or a later version, where "compatible" means that software provided under the Change License can be included in a program with software provided under GPL Version 2.0 or a later version. Licensor may specify additional Change Licenses without limitation.
40
+
41
+ To either: (a) specify an additional grant of rights to use that does not impose any additional restriction on the right granted in this License, as the Additional Use Grant; or (b) insert the text "None."
42
+
43
+ To specify a Change Date.
44
+
45
+ Not to modify this License in any other way.
46
+
47
+ Notice
48
+ The Business Source License (this document, or the "License") is not an Open Source license. However, the Licensed Work will eventually be made available under an Open Source License, as stated in this License.
49
+
50
+ For more information on the use of the Business Source License generally, please visit the Adopting and Developing Business Source License FAQ.
51
+
52
+ License text copyright (c) 2017 MariaDB Corporation Ab, All Rights Reserved. "Business Source License" is a trademark of MariaDB Corporation Ab.