INN / Google-Analytics-Popular-Posts

A WordPress plugin that uses Google Analytics data to determine the most popular posts on your site and display a list of popular posts via the included widget.
https://wordpress.org/plugins/ga-popular-posts/
23 stars 7 forks source link

Google Analytics Popular Posts

Warning: this plugin is under active development. Updating to new versions might require reactivating to rebuild database tables, as there is currently no upgrading framework.

Documentation

Questions

How does this differ from other WordPress popular post plugins?

The problem we found with many WordPress popular post plugins was the lack of data used in the algorithm. Our approach was first to pull as much data as possible into WordPress so we could develop a better algorithm.

What data are you capturing?

We're currently calling and caching the ga:pageviews to the database for each ga:pagepath dimension. Values for the current day and previous are stored during each cron job. A post id is generated for each ga:pagepath that corresponds to an actual post.

How do I query the data myself?

The data is stored across two database tables. The first (analyticbridge_pages) stores each ga:pagepath with a unique id and corresponding post id (if it exists).

The second table (analyticbridge_metrics) relates a page_id to a metric & value over a start & end date.

To query this data yourself, find the corresponding page_id from the pages table and select using it from the metrics table. This can be accomplished using joins.

Completed & TODO