Hi! Just finished my first module This module adds a new "Google-Analytics" Page in your Admin-Panel and displays various Statistics from a Google Analytics Account. It uses the JQuery plugin "jqplot" to display the charts. Github: https://github.com/w...GoogleAnalytics Modules directory: http://modules.proce...ogle-analytics/ Features
Visits by Date (Chart)
General Statistics about Visits (Total visits, Visit duration, New visitors, Returning visitors etc.)
Demographics: Countries, Cities, Languages
System: Browsers, Operating Systems, Screen Resolutions
Mobile: Operating Systems, Screen Resolutions
Pageviews by Date (Chart)
Top Content
Traffic Sources: Keywords, Referral Traffic by Domain and URI
Choose a default date range displaying statistics: last 24 hours, 2 days, 1 week, 1 month etc.
Custom date range by setting a "start date" and "end date"
Requirements
Google Account and Analytics Account
A Project in the Google APIs Console
cURL
Installation 1) Create a Project in the Google APIs Console:
Create a new Project in the APIs Console: code.google.com/apis/console/
Under Services, enable the Analytics API
Under API Access: create an Oauth 2.0 Client-ID
Give a Product Name, choose "Web-Application", Domain doesn't matter
Enter a Redirect URI to the GA-Page in your Processwire Installation: http://yourdomain.com/processwire/google-analytics/
Notes:
The redirect URI must exactly match with the URL from the new "Google Analytics" page in Processwire. Open the Page and copy the URL from the address-bar (localhost does work too!)
The project created in the APIs Console can be reused for every Processwire installation using this module. You just have to enter more redirect URIs
2) Install the module:
Place the module's files in /site/modules/ProcessGoogleAnalytics
Install the Module via the Admin-Panel
Enter Client-ID and Client-Secret keys from the created project in the module config
Load the newly created page "Google-Analytics" and click on the button "authenticate"
Grant the module access to the Analytics Data
Choose a Google Analytics account (Domain) from the dropdown
Done: You should see the statistics. Check out the module config options for further customization
In order to let other users see the Google Analytics page, you must give their role access to the "ga-view" permission. Ps. Processwire is awesome and so is this community!