simple_ga_reporting 1.1.8 → 1.1.9
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/CHANGELOG.md +3 -0
- data/README.md +16 -10
- data/lib/simple_ga_reporting/simple_ga_reports.rb +1 -6
- data/lib/simple_ga_reporting/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0e9f645fd9d0ebd264ff5938e511986f9b95bb5073ef4a677aba60159e9afb9f
|
4
|
+
data.tar.gz: 6d4fab1bdbc996c25cf0cbeadd728037ab0843823005df02d7afd794519cfce6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b494fc73ce80af56342d5edf7bd3c17178ea4a444914956207e844404021bbd6fb0f8aea4d281602347788d3563e10463dcbc40784e6d9d98a0d23f16a91337a
|
7
|
+
data.tar.gz: d26c64e6392761a694abff0c27a1a64bf46034df72d1569e33eeeca7d80eb5cbc738bf22f258425b21d85efd2c9a5cdee8551e174ffef4191e3d7b95851dbb09
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -24,7 +24,7 @@ $ gem install simple-ga-reporting
|
|
24
24
|
```
|
25
25
|
|
26
26
|
## 2. Create API configuration file
|
27
|
-
- You must create
|
27
|
+
- You must create `./config/key_and_email.yml`
|
28
28
|
- This YAML file must contain two Key-Value sets
|
29
29
|
- `private_key` and its value
|
30
30
|
- `client_email` and its value
|
@@ -32,11 +32,11 @@ $ gem install simple-ga-reporting
|
|
32
32
|
|
33
33
|
## 3. Create Google Analytics reporting configuration file
|
34
34
|
- You must create the YAML file which contains Google Analytics reporting configuration such as `start-date`, `end-date`, `metrics`, `demensions`, `filters` and etc.
|
35
|
-
- filepath is
|
35
|
+
- filepath is `./config/ga_reporting_config.yml`
|
36
36
|
- This YAML file format is shown later
|
37
37
|
|
38
38
|
## 4. Create filters file (Optional)
|
39
|
-
- If you wanna use filters function, please create
|
39
|
+
- If you wanna use filters function, please create `./config/filters.rb`
|
40
40
|
- the filters configuration on GUI is below
|
41
41
|
|
42
42
|

|
@@ -63,7 +63,7 @@ SimpleGaReports.filtered_results #=> Legato::Query
|
|
63
63
|
|
64
64
|
## API configuration file
|
65
65
|
- You must create Google Analytics API configuration file
|
66
|
-
- Default filepath is
|
66
|
+
- Default filepath is `./config/key_and_email.yml`
|
67
67
|
- You can change filepath by argument with `create_ga_user` method
|
68
68
|
- Sample is below
|
69
69
|
|
@@ -74,7 +74,7 @@ client_email: "your_account_name@foobar.iam.gserviceaccount.com"
|
|
74
74
|
|
75
75
|
## Google Analytics reporting configuration file
|
76
76
|
- You must create the YAML file which contains Google Analytics reporting configuration
|
77
|
-
- Default filepath is
|
77
|
+
- Default filepath is `./config/ga_reporting_config.yml`
|
78
78
|
- You can change filepath by argument with `configure` method
|
79
79
|
- Sample is below
|
80
80
|
|
@@ -193,7 +193,7 @@ limit: 20
|
|
193
193
|
- the filename `filters.rb` is determined
|
194
194
|
- only filepath is optional
|
195
195
|
- the module name `Filters` is determined
|
196
|
-
- Default filepath is
|
196
|
+
- Default filepath is `./config/filters.rb`
|
197
197
|
- You can change it by argument with `configure` method
|
198
198
|
- Examples
|
199
199
|
|
@@ -222,24 +222,27 @@ end
|
|
222
222
|
|
223
223
|
# Arguments of method
|
224
224
|
|
225
|
+
## Note
|
226
|
+
**YOU MUST SPECIFY ARGUMENTS AS RELATIVE FILEPATH SO YOU MUST ADD './' (dot slash) AT BEGINNING**
|
227
|
+
|
225
228
|
## `SimpleGaReports.filtered_results` method
|
226
229
|
- take one argument
|
227
230
|
- If you don't use filters, use `SimpleGaReports.raw_results` method
|
228
231
|
- when no filter is in configure file, `SimpleGaReports.raw_results` is the same as `SimpleGaReports.filtered_results`
|
229
232
|
|
230
233
|
1. `key_and_email_file`
|
231
|
-
- default is
|
234
|
+
- default is `./config/key_and_email.yml`
|
232
235
|
|
233
236
|
## `SimpleGaReports.configure` method
|
234
237
|
- take three arguments
|
235
238
|
|
236
239
|
1. `yaml_file`
|
237
240
|
- first argument
|
238
|
-
- default is
|
241
|
+
- default is `./config/ga_reporting_config.yml`
|
239
242
|
|
240
243
|
1. `filters_file`
|
241
244
|
- second argument
|
242
|
-
- default is
|
245
|
+
- default is `./config/filters.rb`
|
243
246
|
|
244
247
|
1. `**options`
|
245
248
|
- third argument
|
@@ -295,6 +298,9 @@ end
|
|
295
298
|
|
296
299
|
# Sample App
|
297
300
|
|
301
|
+
## Note
|
302
|
+
**YOU MUST SPECIFY ARGUMENTS AS RELATIVE FILEPATH SO YOU MUST ADD './' (dot slash) AT BEGINNING**
|
303
|
+
|
298
304
|
## Prepare files
|
299
305
|
|
300
306
|
1. `./my_sample_app.rb`
|
@@ -413,7 +419,7 @@ HAPPY CHECK!
|
|
413
419
|
- offset
|
414
420
|
- quota_user
|
415
421
|
- segment_id
|
416
|
-
- `segment` is the conbination of filters
|
422
|
+
- `segment` is the same as conbination of filters, so you can use 'filters' as alternative way
|
417
423
|
|
418
424
|
# Development
|
419
425
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
@@ -9,12 +9,7 @@ class << SimpleGaReports
|
|
9
9
|
def configure(report_config: 'config/ga_reporting_config.yml', filters: 'config/filters.rb', **options)
|
10
10
|
# TODO: oh... global variable...
|
11
11
|
$model_config = YAML.load_file(report_config)
|
12
|
-
|
13
|
-
if File.exist?(filters)
|
14
|
-
$filters_file = filters
|
15
|
-
else
|
16
|
-
$filters_file = File.expand_path("../#{filters}", __FILE__)
|
17
|
-
end
|
12
|
+
$filters_file = filters
|
18
13
|
|
19
14
|
require 'simple_ga_reporting/legato_ga_model'
|
20
15
|
query_parameters($model_config, options)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simple_ga_reporting
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Osamu Takiya
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-04-
|
11
|
+
date: 2018-04-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|