Visitor statistics and analytics
This page is for website creators who want to know how a site is used. Exponential records some things itself; for visitor analytics you add a service.
Contents
- What Exponential records
- Adding an analytics service
- Privacy and consent
- Under a Content Security Policy
What Exponential records
| Source | What | Where |
|---|---|---|
| Search statistics | phrases searched, counts, average results (off by default) | Setup > Search statistics (URLs and search statistics) |
| View counts | page views per node, counted by the updateviewcount cron part from the access log | fetch( 'content', 'view_top_list', ... ) |
| Request logs | requests with timing, for operations | Request logs |
| Shop statistics | orders and revenue | shop/statistics, the Store dashboard |
| Audit trail | who changed what in the administration | Audit trail |
These answer operational questions ("what do visitors search and not find", "which pages are popular"). They are not a replacement for an analytics service.
Adding an analytics service
bcwebsitestatisticsadds the Google Analytics script to pages and can report shop orders through theezreceiptworkflow type; setUrchinto your own property insettings/override/bcwebsitestatistics.ini.append.php(bcwebsitestatistics).- Another service: add its script as a file through your design's script list (Stylesheets and scripts), with its settings passed in a JSON data block.
Privacy and consent
Analytics usually needs the visitor's consent in many jurisdictions. Load the script only after consent, describe it in the privacy page, and prefer services you can self-host or that do not set cookies when your audience expects it. This is not legal advice; ask whoever is responsible for data protection.
Under a Content Security Policy
An analytics script from another host must be allowed: AdditionalSources[]=script-src https://<host> and
connect-src for where it sends data, in [ContentSecurityPolicy] of the site
(Content Security Policy). Inline snippets the service suggests
must be moved into a file.
Related pages
- SEO basics for Exponential sites
- Measuring a project: KPIs
- Site search
- Free documentation: this page is free to copy, translate and improve under the GNU FDL 1.3.
Become an Exponential Partner
Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.