mirror of
https://github.com/discourse/discourse.git
synced 2026-08-08 17:53:55 +08:00
`handleRouteDidChange` skipped beacon pageviews when a transition had `urlMethod === "replace"` and `queryParamsOnly`. That guard was modeled on the GA/GTM convention but doesn't match the legacy AJAX-tagged tracker, which counts these transitions (discovery filter, sort, and period changes) as pageviews. As a result, `page_view_anon_browser_beacon_total` undercounted real traffic. This commit removes the guard, aligning the two trackers.
31 lines
712 B
Ruby
Vendored
31 lines
712 B
Ruby
Vendored
# frozen_string_literal: true
|
|
|
|
module PageObjects
|
|
module Pages
|
|
class Discovery < PageObjects::Pages::Base
|
|
def topic_list
|
|
Components::TopicList.new
|
|
end
|
|
|
|
def topic_list_header
|
|
Components::TopicListHeader.new
|
|
end
|
|
|
|
def category_drop
|
|
Components::SelectKit.new(".category-breadcrumb li:first-of-type .category-drop")
|
|
end
|
|
|
|
def subcategory_drop
|
|
Components::SelectKit.new(".category-breadcrumb li:nth-of-type(2) .category-drop")
|
|
end
|
|
|
|
def tag_drop
|
|
Components::SelectKit.new(".category-breadcrumb .tag-drop")
|
|
end
|
|
|
|
def nav_item(name)
|
|
find("#navigation-bar .nav-item_#{name}")
|
|
end
|
|
end
|
|
end
|
|
end
|