Display Analytics data with sh404SEF
After setting up an Analytics tracking code, Google will start collecting data about your site visitors, and you can view those stats on Google Analytics website.
At the moment, Google Analytics version 4 does not allow displaying reports.
sh404SEF can display synthetic stats in multiple places:
- on your main control panel:
- on the dedicated Analytics manager page, with much more detailed data, and with selectors for date range to display:
Displayed data includes:
- `Global stats` - `Visits and page views` - `Page load time per device type` - `Traffic sources` - `Devices (mobile, desktop, tablets,...)` - `Social networks traffic sources` - `Page on your site that are viewed most` - `Web sites that send you most traffic`
- on the frontend:
This provides easy access to non-technical users, or users who don't need to have backend access but requires traffic data access:
Some configuration is required before sh404SEF can access your Google Analytics data:
Most settings are self-explained, and be sure to check the tooltips provided with each one to get more information. The main configuration required is Google authorization.
We switched to using version 4 of Google Analytics API in sh404SEF version 4.20. After installing this version, Google requires that you peform again the authorization procedure.
Google Analytics authorization
You must grant sh404SEF an authorization to access your Analytics data. This is a simple procedure, and you only need to do it once:
We also created a short video demonstrating this procedure. Find it here.
Click on the
Authorization required! Click to startbutton
The display will change slightly, and a new window will open, prompting you to login to your Google account:
You must use here the same Google account you used to create your Google Analytics account.
After entering username and password, you'll be prompted for an authorization:
A long authorization code will then be displayed: copy it, we're going to paste it at next step
Paste this code into the
Google authorizationinput field displayed in sh404SEF configuration:
Save & Closebutton to save sh404SEF configuration.
Done! When you save configuration, you'll be taken back to the control panel, and if authentication and authorization succeeded, you'll see the Google Analytics reports display, similar to:
In case you used the wrong Google account, you can always open again the analytics configuration page and
Renew authorization. This will restart the same authorization procedure with Google.
You can use the
Clear authorization button to prevent sh404SEF to access your analytics data in the future. Use this if you don't want your site users to view stats any longer.
You can optionally enable access to the Analytics data on the frontend of your site. Users can view analytics by accessing this unique URL:
NB: the URL can be modified as needed in case of conflict, please contact support for details
Enabling Frontend access
After enabling frontend access, users can visit
https://yoursite.url/stats: they will be prompted to log-in if not connected yet and granted access if they belong to a group for which you have enabled Analytics access.
Enabling frontend access without log-in
It is possible to access Analytics data without any account. This is done with a secret key added to the URL, similar to:
Here are the steps to follow:
Frontend access with keyto
- Save configuration
- Open back the configuration window
- The full URL is displayed next to the setting, with a copy button
- Click the button to copy the URL and share it with the users that should access analytics data
NB: To disable frontend access with key, set the option back to
No and save configuration. If you enable it back later, a new key will be generated and users can no longer access the page with the previous key.