bug: AnalyticsController AJAX endpoints query unpopulated analytics table #246
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
The analytics feature has two separate data sources that are out of sync:
AnalyticsModel (used by the page-rendered Analytics view) queries
#__mokosuitecross_postsdirectly -- this works correctly because posts data always exists.AnalyticsController AJAX endpoints (
heatmap(),besttimes()) useAnalyticsHelperwhich queries#__mokosuitecross_analytics-- but nothing ever populates this table.AnalyticsHelper::recordEngagement()exists and is designed to write engagement metrics (impressions, clicks, shares, engagement_rate) to the analytics table, but it is never called anywhere in the codebase.Impact
#__mokosuitecross_analyticstable exists with columns for impressions, engagements, clicks, shares, and engagement_rate but is never populatedFiles
src/Controller/AnalyticsController.php-- AJAX endpoints using AnalyticsHelpersrc/Helper/AnalyticsHelper.php-- queries analytics table, has unusedrecordEngagement()src/Model/AnalyticsModel.php-- queries posts table (correct, working)src/View/Analytics/HtmlView.php-- uses AnalyticsModel (correct)sql/install.mysql.sql-- defines#__mokosuitecross_analyticstableOptions
Branch created:
feature/246-bug-analyticscontroller-ajax-endpoints-q