helsingborg-stad / google-analythics
Plugin to integrate Google Analytics and display simple statistics.
Installs: 922
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 13
Forks: 0
Open Issues: 11
Type:wordpress-plugin
Requires
- google/apiclient: ^2.7.2
- dev-master
- 1.7.2
- 1.0.7
- 1.0.6
- 1.0.5
- 1.0.4
- 1.0.3
- 1.0.2
- 1.0.1
- 1.0.0
- dev-dependabot/npm_and_yarn/qs-6.5.3
- dev-dependabot/npm_and_yarn/decode-uri-component-0.2.2
- dev-dependabot/npm_and_yarn/minimatch-and-gulp-3.1.2
- dev-dependabot/npm_and_yarn/ajv-6.12.6
- dev-dependabot/npm_and_yarn/path-parse-1.0.7
- dev-dependabot/npm_and_yarn/tar-2.2.2
- dev-dependabot/npm_and_yarn/hosted-git-info-2.8.9
- dev-dependabot/npm_and_yarn/y18n-3.2.2
- dev-dependabot/npm_and_yarn/ini-1.3.7
- dev-dependabot/npm_and_yarn/fstream-1.0.12
- dev-dependabot/npm_and_yarn/mixin-deep-1.3.2
This package is auto-updated.
Last update: 2024-12-07 21:54:10 UTC
README
Plugin to integrate Google Analytics tracking and display statistics on the admin dashboard. It requires a Google Service Account with read permissions connected to the desired Google Analytics web property.
Getting started
Install libraries
This plugin requires Google APIs Client Library for PHP and is installed with Composer:
composer install
Google Service Account setup
- Create a Project in the Google APIs Console
- Enable the Analytics API under APIs & services
- Create a Service Account for the project with view cababilities
- Download the private key (JSON)
- Finally add Service account ID as a new user to your Google Analytics account.
Filters
GoogleAnalytics/TrackingId/ua
Filters the Google Analytics UA (user id) used to load Google Analytics.
@param string $ua
- The Google Analytics UA
apply_filters('GoogleAnalytics/TrackingId/ua', $ua);