fastlane-plugin-google_analytics 0.1.0 → 0.2.0.pre.alpha.pre.5

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
  SHA1:
3
- metadata.gz: ed99b525fea8a06dfc3aa3882f9440888983aedf
4
- data.tar.gz: a03b41640cb2d73420dbeae307c4b8bff3194c3d
3
+ metadata.gz: 9708197bd8e89454b80fb83e4fa9eaa29982be10
4
+ data.tar.gz: 2577b524b46b55913958259a980d6b118ce62134
5
5
  SHA512:
6
- metadata.gz: 915ffd33aacae01a4a8d0af8bf10875a81cc7e35fb0b7b4bf242b0feb41409c2cad65cce95af9ebdb885d5cd43ce1147d1dbf484071e5c532c70a250b0d378d4
7
- data.tar.gz: 0526014f5589d998a9df63b60e47d26f7e8534262d77f3da3a3f52e66b7b08dc190f5807cdee5a06af54b47cd980aa4047ebabc0fae66be7ebaf63ffd87f1519
6
+ metadata.gz: 01fa107995857c47b012c713fe94e3aba77c1df9fe9b2aa242b22759f11a27092d2167729445215cc7ce019fe57c58b6bc9523458835f98ef964d47c59e8a38b
7
+ data.tar.gz: e60081c1e884cd321d407a22294b2f551fce3f43f2d4a473d302b03470c54e49e21a514699c426a8abfa92c9d284e50ad4931bd774872173b94b7cb78ae29640
data/README.md CHANGED
@@ -10,43 +10,39 @@ This project is a [fastlane](https://github.com/fastlane/fastlane) plugin. To ge
10
10
  fastlane add_plugin google_analytics
11
11
  ```
12
12
 
13
- ## About google_analytics
13
+ ## About
14
14
 
15
- Fire universal Analytics
15
+ Use Google Analytics
16
16
 
17
- **Note to author:** Add a more detailed description about this plugin here. If your plugin contains multiple actions, make sure to mention them here.
17
+ <img src='assets/screen.png'>
18
18
 
19
19
  ## Example
20
20
 
21
- Check out the [example `Fastfile`](fastlane/Fastfile) to see how to use this plugin. Try it by cloning the repo, running `fastlane install_plugins` and `bundle exec fastlane test`.
22
-
23
- **Note to author:** Please set up a sample project to make it easy for users to explore what your plugin does. Provide everything that is necessary to try out the plugin in this project (including a sample Xcode/Android project if necessary)
24
-
25
- ## Run tests for this plugin
26
-
27
- To run both the tests, and code style validation, run
28
-
21
+ ### Pageview
22
+ ```ruby
23
+ google_analytics(payload: { path: '/page-path', hostname: 'mysite.com', title: 'A Page!' } )
29
24
  ```
30
- rake
25
+
26
+ ### Exception
27
+ ```ruby
28
+ google_exception(payload: { description: 'RuntimeException', fatal: true })
31
29
  ```
32
30
 
33
- To automatically fix many of the styling issues, use
31
+ ### Timing
32
+ ```ruby
33
+ google_timing(payload: { category: 'runtime', variable: 'db', label: 'query', time: 50 })
34
34
  ```
35
- rubocop -a
35
+
36
+ ### Event
37
+ ```ruby
38
+ google_event(payload: { category: 'video', action: 'play', label: 'cars', value: 1 })
36
39
  ```
37
40
 
41
+
38
42
  ## Issues and Feedback
39
43
 
40
44
  For any other issues and feedback about this plugin, please submit it to this repository.
41
45
 
42
- ## Troubleshooting
43
-
44
- If you have trouble using plugins, check out the [Plugins Troubleshooting](https://docs.fastlane.tools/plugins/plugins-troubleshooting/) guide.
45
-
46
- ## Using `fastlane` Plugins
47
-
48
- For more information about how the `fastlane` plugin system works, check out the [Plugins documentation](https://docs.fastlane.tools/plugins/create-plugin/).
49
-
50
46
  ## About `fastlane`
51
47
 
52
48
  `fastlane` is the easiest way to automate beta deployments and releases for your iOS and Android apps. To learn more, check out [fastlane.tools](https://fastlane.tools).
@@ -4,24 +4,29 @@ module Fastlane
4
4
  module Actions
5
5
  class GoogleAnalyticsAction < Action
6
6
  def self.run(params)
7
- UI.important "Firing #{params[:type].to_s} ⚡️"
7
+ UI.important "Firing #{params[:type]} ⚡️"
8
8
  tracker(params).send(params[:type].to_s, params[:payload])
9
9
  end
10
+
10
11
  def self.tracker(params)
11
- Staccato.tracker(params[:ua], nil, ssl:true) do |c|
12
- #c.adapter = Staccato::Adapter::Logger.new(Staccato.ga_collection_uri, Logger.new(STDOUT), lambda {|params| JSON.dump(params)})
12
+ Staccato.tracker(params[:ua], nil, ssl: true) do |c|
13
+ # c.adapter = Staccato::Adapter::Logger.new(Staccato.ga_collection_uri, Logger.new(STDOUT), lambda {|params| JSON.dump(params)})
13
14
  end
14
15
  end
16
+
15
17
  def self.description
16
18
  "Fire universal Analytics"
17
19
  end
20
+
18
21
  def self.alias_used(action_alias, params)
19
22
  cat = action_alias.split("_").last
20
- params[:type]=cat
23
+ params[:type] = cat
21
24
  end
25
+
22
26
  def self.aliases
23
- ["google_event", "google_pageview", "google_timing", "google_exception"]
27
+ ["google_event", "google_pageview", "google_timing", "google_exception"]
24
28
  end
29
+
25
30
  def self.authors
26
31
  ["Helmut Januschka"]
27
32
  end
@@ -47,12 +52,12 @@ module Fastlane
47
52
  description: "Google Analytics Payload",
48
53
  optional: false,
49
54
  type: Hash),
50
- FastlaneCore::ConfigItem.new(key: :type,
51
- env_name: "GOOGLE_ANALYTICS_TYPE",
52
- default_value: "pageview",
53
- description: "pageview, event, timinig, exception",
54
- optional: false,
55
- type: String)
55
+ FastlaneCore::ConfigItem.new(key: :type,
56
+ env_name: "GOOGLE_ANALYTICS_TYPE",
57
+ default_value: "pageview",
58
+ description: "pageview, event, timinig, exception",
59
+ optional: false,
60
+ type: String)
56
61
  ]
57
62
  end
58
63
 
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module GoogleAnalytics
3
- VERSION = "0.1.0"
3
+ VERSION = "0.2.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-google_analytics
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0.pre.alpha.pre.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Helmut Januschka
@@ -135,12 +135,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
135
135
  version: '0'
136
136
  required_rubygems_version: !ruby/object:Gem::Requirement
137
137
  requirements:
138
- - - ">="
138
+ - - ">"
139
139
  - !ruby/object:Gem::Version
140
- version: '0'
140
+ version: 1.3.1
141
141
  requirements: []
142
142
  rubyforge_project:
143
- rubygems_version: 2.6.8
143
+ rubygems_version: 2.4.8
144
144
  signing_key:
145
145
  specification_version: 4
146
146
  summary: Fire universal Analytics