rails_local_analytics 0.2.2 → 0.2.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: 6c1dffba4cbead6faa6192e3c1df830aa749f6f653bdc8f0eef6e9dbd3a2650b
4
- data.tar.gz: b0b6a574e09786c7888c4e6194fff36616f9d0634d99773955e762417ee3c828
3
+ metadata.gz: f0a0bf463e77ac16f76c751e5664ae847146c8e2e7b2fbbef76093512d966af1
4
+ data.tar.gz: d5c9028dcf9cc3307bb39441f107a0a07afa8f115c013b0edc9512d9ccc0d7e8
5
5
  SHA512:
6
- metadata.gz: 021fcb8b029ce1d842415eb5a4a3ed39a433726851988891455f2aa1ec510a1f56acc9563bad3003b799624384a8ff74ef40183e0a81746df82bb1d3b68d2e24
7
- data.tar.gz: 6c9d8b537f1de5f9b28b1b6e6baac6135a389a1ba65bb5dbc19a4ebdd7b73e1efaf855e6daaaa81b8b06b0a2d1913e0d0cdc97fd31635c794d545238751820c6
6
+ metadata.gz: faa7bf7a4c0ee569aae5873e93358cea48ff0060b9caf14c9b7516390a71698bd42b2308233b87438fce0d85d3804990ee0254bb66090024394caf674c5e0f79
7
+ data.tar.gz: 71662ed4b26b97d416d9dd8341ccc3576f0e6725af6ece920adef1727fd276871cac65023d8d5d2279d734ce3ee6a6d2f32c0e2c7f75b92856d157d4fe2c8112
data/README.md CHANGED
@@ -73,6 +73,7 @@ class CreateAnalyticsTables < ActiveRecord::Migration[6.0]
73
73
  end
74
74
  end
75
75
  ```
76
+ The reason we store our anayltics in two separate tables to keep the cardinality of our data low. You may use only a single table but I recommend you try the 2 table approach first and see if it meets your needs. See the performance optimization section for more details.
76
77
 
77
78
  Add the route for the analytics dashboard at the desired endpoint:
78
79
 
@@ -81,11 +82,11 @@ Add the route for the analytics dashboard at the desired endpoint:
81
82
  mount RailsLocalAnalytics::Engine, at: "/admin/analytics"
82
83
  ```
83
84
 
84
- Its generally recomended to use a background job (especially since we now have [`solid_queue`](https://github.com/rails/solid_queue/)). If you would like to disable background jobs you can use the following config:
85
+ Its generally recomended to use a background job (especially since we now have [`solid_queue`](https://github.com/rails/solid_queue/)). If you would like to disable background jobs you can use the following config option:
85
86
 
86
87
  ```ruby
87
88
  # config/initializers/rails_local_analytics.rb
88
- RailsLocalAnalytics.config.background_jobs = false # defaults to true
89
+ # RailsLocalAnalytics.config.background_jobs = false # defaults to true
89
90
  ```
90
91
 
91
92
  The next step is to collect traffic.
@@ -157,6 +158,7 @@ There are a few techniques that you can use to tailor the database for your part
157
158
  * Consider just storing "local" or nil instead if the request originated from your website
158
159
  - `platform` and `browser_engine` columns
159
160
  * Consider dropping either of these if you do not need this information
161
+ - If you want to store everything in one table (which I dont think most people actually need) then you can simply only create one table (I recommend `tracked_requests_by_day_page`) with all of the fields from both tables. This gem will automatically populate all the same fields. You should NOT need to use `:custom_attributes` in this scenario.
160
162
 
161
163
  ## Usage where a request object is not available
162
164
 
File without changes
@@ -1,3 +1,3 @@
1
1
  module RailsLocalAnalytics
2
- VERSION = "0.2.2".freeze
2
+ VERSION = "0.2.3".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_local_analytics
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Weston Ganger
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-12-12 00:00:00.000000000 Z
11
+ date: 2024-12-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -106,6 +106,8 @@ files:
106
106
  - README.md
107
107
  - Rakefile
108
108
  - app/assets/config/rails_local_analytics_manifest.js
109
+ - app/assets/images/rails_local_analytics/.keep
110
+ - app/assets/javascripts/rails_local_analytics/.keep
109
111
  - app/assets/stylesheets/rails_local_analytics/application.css
110
112
  - app/controllers/rails_local_analytics/application_controller.rb
111
113
  - app/controllers/rails_local_analytics/dashboard_controller.rb