Google Analytics

(49 KB)

59
83
Adds Google Analytics to the stats addon.

Setup instructions…
  1. Set up oAuth for Google Analytics at Admin Zone > Setup > Setup API Access.
  2. Find the numeric ID of the Google Analytics property you need to integrate with (e.g. 12345678), then configure the "Google Analytics View ID" option at Admin Zone > Setup > Configuration > Site options > Logging. Note this number has nothing to do with the identifier that starts UA.

The addon provides a main_staff_google_analytics block for showing analytic data of your choice (suggested for adding to the Admin Zone dashboard). You can use the default main_staff_stats_graph but this doesn't come with tabbing support, and the main_staff_google_analytics tabbing support has special code required to make tabbing work with Google Analytics's JavaScript-based graph rendering.
There are metric and days parameters you may want to use for the block:
  • metric is a comma-separated list of any of the following: hits, speed, browsers, device_types, screen_sizes, countries, languages, referrers, referrers_social, referral_mediums, popular_pages, keywords. keywords is only available if Google Search Console is configured. Tabs will be used if multiple metrics are requested. If you don't specify this parameter it will default to a reasonable selection.
  • days is a number, the number of days to show data for (initially). If you don't specify this parameter it will default to 31.

You can always see all metrics from Admin Zone > Audit > Site statistics > Google Analytics simplified view.


System Requirements / Dependencies

stats

Website Software Requirements

Minimum version: 11


Licence

Licensed on the same terms as Composr

Images

Rating

Unrated