Commit graph

13 commits

Author SHA1 Message Date
Molly Struve
faa4325c1f
Only Update page_views When They Are Valid (ie created) (#5195) [deploy] 2019-12-26 11:28:18 -06:00
Molly Struve
f26a6f49d2 Revert "Use raw SQL to Update page_views so new and existing Records can be updated (#5167) [deploy]" (#5185)
This reverts commit 9a7fb3b04e.
2019-12-19 16:43:37 -05:00
Molly Struve
9a7fb3b04e
Use raw SQL to Update page_views so new and existing Records can be updated (#5167) [deploy] 2019-12-19 14:28:32 -06:00
Molly Struve
2d6d611634 switch back to update_column to improve performance (#5074) [deploy] 2019-12-10 18:38:04 -05:00
Molly Struve
3f8a6caa72
Use find_or_create_by when updating a pageview and use update in case of creation (#5066) [deploy] 2019-12-10 13:48:50 -06:00
Ben Halpern
eaf6ea2f4b
Update pageviews count less often in page_views_controller (#4945) [deploy] 2019-11-26 14:11:47 -05:00
Ben Halpern
befefd08d0
Remove extra dependencies for PageViewsController (#4923) [deploy]
* Remove extra dependencies for PageViewsController

* Fix strongparams and fix typo

* Fix spec

* Remove unnecessary page_view param

* Remove additional unnecessary page_view

* Create ApplicationMetalController for shared Metal behavior

* Revert rand numbers to ensure apples-to-apples perf compare

* Whoops, revert change revert

* Clarify comment
2019-11-25 19:06:34 -05:00
Ben Halpern
36479f09c3
Replace current_user.id with session_current_user_id (#4880) [deploy]
* Replace current_user.id with efficient_current_user_id in high-leverage areas

* Update name of efficient_current_user_id

* Replace user_signed_in? in pageviews

* Remove unneeded ?
2019-11-22 14:27:43 -05:00
rhymes
7da7a16d8d Pro: add referrers to dashboard and single article stats (#3295)
* Reorganize PageViewsController

* Add domain and path to PageView model

* Add before_create callback to populate domain and path

* Add list of referrers to AnalyticsService

* Add referrers to the UI

* Remove useless referrers card and tweak table line height

* Add referrer stats to article stats page

* Add not null and empty default to domain and path

* Refactor JS analytics client

* create_list is a step back here

* Revert "Add not null and empty default to domain and path"

This reverts commit bc02440076047a887c65d300bccd4661ecc8ffd0.

* Add index on domain concurrently

* Make the script more robust
2019-06-25 13:58:09 -04:00
Ben Halpern
4b1b137c0f
Fix/augment dashboard and article view count issues (#2449) 2019-04-15 10:24:38 -04:00
Ben Halpern
7bf37108b1
Night theme improvements + small fixes (#2114) 2019-03-19 13:36:30 -04:00
Ben Halpern
c901c7138d
Fix possible race condition with page view tracking (#2103)
* Fix possible race condition with page view tracking

* Change min number to check for html variant calculation
2019-03-18 15:53:13 -04:00
Ben Halpern
825aa9be91
Add page_view model (#1985)
* Add page_view model

* Uncomment DJ routes

* Add time on site max and don't update article page views every time
2019-03-07 11:53:33 -08:00