workarea-google_analytics 2.1.6 → 2.2.0
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 +4 -4
- data/.eslintrc.json +35 -0
- data/.github/workflows/ci.yml +57 -0
- data/.gitignore +1 -1
- data/.rubocop.yml +3 -0
- data/.stylelintrc.json +8 -0
- data/CHANGELOG.md +0 -15
- data/Gemfile +2 -2
- data/README.md +1 -16
- data/Rakefile +5 -4
- data/app/assets/javascripts/workarea/storefront/google_analytics/modules/adapter.js +1 -1
- data/app/views/workarea/storefront/analytics/_google_analytics.html.haml +7 -6
- data/config/initializers/fields.rb +8 -0
- data/lib/workarea/google_analytics/version.rb +1 -1
- data/test/dummy/config/initializers/session_store.rb +1 -1
- data/workarea-google_analytics.gemspec +1 -1
- metadata +13 -3
- data/config/initializers/configuration.rb +0 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b3b2732c59098561a87d64fcaa5b282c327e729c3bf26f64ff8ba0d252b6e286
|
|
4
|
+
data.tar.gz: 7274c3cc842cf545257bfce7fbbd012559b6c0dffaa515e83e079e2dbbda6f37
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e9a26aa2b74b54a05541671fcc8cd7dd48d5763013d78008cf32d19e6aff4d7602f539c6b08ca36edbc022f550235d34d90d1fa67a6af743cd2188c881649ca6
|
|
7
|
+
data.tar.gz: f8e156793f7fa1a48c41e766f70d7cd2022d8f8f7ab6db78eaccf0ea29e81750b8fdc1e776d35fdb7a19b021e780e9c0739948c33711d6d75fdc1f07a4bf6bcc
|
data/.eslintrc.json
ADDED
|
@@ -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,57 @@
|
|
|
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
|
data/.gitignore
CHANGED
data/.rubocop.yml
ADDED
data/.stylelintrc.json
ADDED
data/CHANGELOG.md
CHANGED
|
@@ -1,18 +1,3 @@
|
|
|
1
|
-
Workarea Google Analytics 2.1.6 (2020-02-04)
|
|
2
|
-
--------------------------------------------------------------------------------
|
|
3
|
-
|
|
4
|
-
* Don't Call Google Analytics Until It's Defined
|
|
5
|
-
|
|
6
|
-
Instead of seeing whether the app is in the test environment, check
|
|
7
|
-
whether the `ga()` function is present before sending any calls to it.
|
|
8
|
-
This prevents a JS error that occurs when the
|
|
9
|
-
`config.google_analytics_tracking_id` is missing.
|
|
10
|
-
|
|
11
|
-
GOOGLEANALYTICS-4
|
|
12
|
-
Tom Scott
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
1
|
Workarea Google Analytics 2.1.5 (2019-08-21)
|
|
17
2
|
--------------------------------------------------------------------------------
|
|
18
3
|
|
data/Gemfile
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
source 'https://rubygems.org'
|
|
2
|
-
git_source(:github) { |repo| "
|
|
2
|
+
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
|
|
3
3
|
|
|
4
4
|
gemspec
|
|
5
5
|
|
|
6
|
-
gem 'workarea', github: 'workarea-commerce/workarea'
|
|
6
|
+
gem 'workarea', github: 'workarea-commerce/workarea'
|
data/README.md
CHANGED
|
@@ -30,22 +30,7 @@ bundle
|
|
|
30
30
|
Configuration
|
|
31
31
|
--------------------------------------------------------------------------------
|
|
32
32
|
|
|
33
|
-
To integrate your Workarea application with Google Analytics you need configure your host application with your Google Analytics tracking ID.
|
|
34
|
-
|
|
35
|
-
You should use application secrets to do this. Add the following to your `config/secrets.yml` file
|
|
36
|
-
|
|
37
|
-
```yaml
|
|
38
|
-
google_analytics:
|
|
39
|
-
:tracking_id: UA-2499240-11
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
Then in workarea.rb add the following config:
|
|
43
|
-
|
|
44
|
-
```ruby
|
|
45
|
-
Workarea.configure do |config|
|
|
46
|
-
config.google_analytics_tracking_id = Rails.application.secrets.google_analytics[:tracking_id]
|
|
47
|
-
end
|
|
48
|
-
```
|
|
33
|
+
To integrate your Workarea application with Google Analytics you need configure your host application with your Google Analytics tracking ID in the "Analytics" section on the configuration page within the admin UI.
|
|
49
34
|
|
|
50
35
|
Shared Payloads
|
|
51
36
|
--------------------------------------------------------------------------------
|
data/Rakefile
CHANGED
|
@@ -16,12 +16,13 @@ desc "Release version #{Workarea::GoogleAnalytics::VERSION} of the gem"
|
|
|
16
16
|
task :release do
|
|
17
17
|
host = "https://#{ENV['BUNDLE_GEMS__WEBLINC__COM']}@gems.weblinc.com"
|
|
18
18
|
|
|
19
|
-
Rake::Task['workarea:changelog'].execute
|
|
20
|
-
system 'git add CHANGELOG.md'
|
|
21
|
-
system 'git commit -m "Update CHANGELOG"'
|
|
19
|
+
#Rake::Task['workarea:changelog'].execute
|
|
20
|
+
#system 'git add CHANGELOG.md'
|
|
21
|
+
#system 'git commit -m "Update CHANGELOG"'
|
|
22
|
+
#system 'git push origin HEAD'
|
|
22
23
|
|
|
23
24
|
system "git tag -a v#{Workarea::GoogleAnalytics::VERSION} -m 'Tagging #{Workarea::GoogleAnalytics::VERSION}'"
|
|
24
|
-
system 'git push
|
|
25
|
+
system 'git push --tags'
|
|
25
26
|
|
|
26
27
|
system 'gem build workarea-google_analytics.gemspec'
|
|
27
28
|
system "gem push workarea-google_analytics-#{Workarea::GoogleAnalytics::VERSION}.gem"
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
:
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
- if Workarea.config.google_analytics_tracking_id.present?
|
|
2
|
+
%meta{ property: 'ga-tracking-id', content: Workarea.config.google_analytics_tracking_id }
|
|
3
|
+
:javascript
|
|
4
|
+
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
|
5
|
+
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
|
6
|
+
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
|
7
|
+
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: workarea-google_analytics
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.
|
|
4
|
+
version: 2.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ben Crouse
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2019-11-26 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: workarea
|
|
@@ -17,6 +17,9 @@ dependencies:
|
|
|
17
17
|
- - "~>"
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
19
|
version: 3.x
|
|
20
|
+
- - ">="
|
|
21
|
+
- !ruby/object:Gem::Version
|
|
22
|
+
version: 3.5.x
|
|
20
23
|
type: :runtime
|
|
21
24
|
prerelease: false
|
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -24,6 +27,9 @@ dependencies:
|
|
|
24
27
|
- - "~>"
|
|
25
28
|
- !ruby/object:Gem::Version
|
|
26
29
|
version: 3.x
|
|
30
|
+
- - ">="
|
|
31
|
+
- !ruby/object:Gem::Version
|
|
32
|
+
version: 3.5.x
|
|
27
33
|
description: Provides Google Analytics Enhanced Ecommerce integration for the Workarea
|
|
28
34
|
Commerce Platform.
|
|
29
35
|
email:
|
|
@@ -33,11 +39,15 @@ extensions: []
|
|
|
33
39
|
extra_rdoc_files: []
|
|
34
40
|
files:
|
|
35
41
|
- ".editorconfig"
|
|
42
|
+
- ".eslintrc.json"
|
|
36
43
|
- ".github/ISSUE_TEMPLATE/bug_report.md"
|
|
37
44
|
- ".github/ISSUE_TEMPLATE/documentation-request.md"
|
|
38
45
|
- ".github/ISSUE_TEMPLATE/feature_request.md"
|
|
46
|
+
- ".github/workflows/ci.yml"
|
|
39
47
|
- ".gitignore"
|
|
40
48
|
- ".rspec"
|
|
49
|
+
- ".rubocop.yml"
|
|
50
|
+
- ".stylelintrc.json"
|
|
41
51
|
- ".yardopts"
|
|
42
52
|
- CHANGELOG.md
|
|
43
53
|
- CODE_OF_CONDUCT.md
|
|
@@ -50,7 +60,7 @@ files:
|
|
|
50
60
|
- app/views/workarea/storefront/analytics/_google_analytics.html.haml
|
|
51
61
|
- bin/rails
|
|
52
62
|
- config/initializers/appends.rb
|
|
53
|
-
- config/initializers/
|
|
63
|
+
- config/initializers/fields.rb
|
|
54
64
|
- config/routes.rb
|
|
55
65
|
- lib/tasks/google_analytics_tasks.rake
|
|
56
66
|
- lib/workarea/google_analytics.rb
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
Workarea.config.google_analytics_tracking_id = 'TODO'
|