Git Product home page Git Product logo

wp-total-hits's Introduction

WPTotalHits

Total Hits for Wordpress is a widget plugin which shows the total number of hits on your website and a basic chart with hits for the last 7 days. The data is taken from your Google Analytics account via Google Analytics API. The widget is inspired by the similar widget that is available on blogger.com.

Features

  • displays total number of hits and a chart for the last 7 days
  • uses official Google API client for PHP
  • caches the results of the API calls for 2 hours using Transient API
  • renders the chart using Google Charts SDK
  • allows styling via CSS classes
  • minimum configuration

Prerequisites

Before you can use the widget you need to create a service user for it in your Google Account. The service user has restricted permissions and can only read data in your Google Analytics account. The steps to create such a user are the following:

  • Open the Service accounts page. If prompted, select a project.
  • Click Create service account.
  • In the Create service account window, type a name for the service account, and select Furnish a new private key. Then click Create.

Download and save the credentials file in the JSON format.

Installation

  • install the plugin.
  • upload the credentials file to your server in such place that is not available for everyone.
  • go to Appearance - Widgets and drag-n-drop the TotalHits widget. Configure the Title and Path to the credentials file on your service.
  • save the widget

Screenshots

Backend

backend

Frontend

frontend

wp-total-hits's People

Contributors

orkon avatar

Watchers

 avatar  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.