Git Product home page Git Product logo

google-analytics-popular-posts's Introduction

‼️ This repository has been archived.

If you're interested in working with Google Analytics data in WordPress, some of the core authentication code has been migrated here to work on further.

The rest of this readme represents the original documentation.


Google Analytics Popular Posts

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

  • Authentication with Google Analytics.
  • Creation of database schema.
  • Cron job registered.
  • Dashboard widget
  • Cron job to update yesterday's values one a day.
  • Handle uninstall and disconnect properly.
  • Add front end options for the 'half-life' of a post
  • Class or WP_Query support for pulling popular posts.
  • API for querying individual page views quickly.
  • Add support for easier google redirect urls (rewrite rule)

google-analytics-popular-posts's People

Contributors

benlk avatar wjhdev avatar rnagle avatar aschweigert avatar rclations avatar wadehammes avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.