Inserting Analytics tracking code
In addition to simply inserting Google Analytics tracking code in your pages, sh404SEF has more otions to help you deal with common situations:
Enable data collection
As seen on the Getting started page, there are currently 2 options to use Google Analytics: the regular Analytics called
Universal (as they can be used for web sites, but can also track mobile apps usage for instance), while the second option is
Google Tags manager.
Google Tag manager
sh404SEF can insert for you the
Google Tag Manager code, you only need to select this option in the
Enable data collection drop-down, and paste in your Google Tags manager ID in the corresponding field.
sh404SEF provides a few other options to improve your use of Google Analytics:
Please be sure to check your locally applicable law to decide if you need this or not.
Enable Display features
Enhanced link attribution
The enhanced link attribution plugin is another Google Analytics plugin which may improve the accuracy of click tracking on your pages. It is useful in case you have multiple links to the same URL on the same page as it allows differentiating clicks on each link, thus allowing you to fine-tune or improve your pages.
As per the documentation linked above, using the Enhanced link attribution plugin may require that you also make some changes to the links you want to track (they must have their own individual html id). The plugin must also be enabled in your Google Analytics account settings.
A common issue with Analytics is to get reliable data about your visitors, but only about your visitors. On some sites, visits from your company staff or other unwanted sources can become a bias. You can list here multiple IP address (IPV4) that should be excluded from Analytics. When a request comes from one of those IP addresses, sh404SEF will NOT include the Analytics snippet in the page, and they won't be counted at all.
Enable/disable for access levels and groups
Another option to exclude some visitors from the stats is to discount users from certain groups or for pages that require specific access levels. You can achieve this with sh404SEF using the
Enable for access levels ,
Enable for groups and
Disable for groups select lists. This will allow you to discount from analytics traffic all Super users, for instance, or maybe support staff.
By default, the
Enable for access levels setting includes the
Public level. It means that all visitors will be accounted for. Be sure to check your site still has this access level (it should unless extreme customizatio was done during the site construction).
To avoid interfering with users groups attribution, we often create a specific group, called
No-Analytics, and we put all users that should not be included in Analytics stats in that group. You can also do the same with access levels.
Custom Analytics tracking code
/your_template/html/layouts directory. Please read the Joomla! JLayout documentation for more details.
The source layouts are located in:
The JLayout path that you may want to override are the following ones:
com_sh404sef.analytics.snippet_ga com_sh404sef.analytics.snippet_gtm com_sh404sef.analytics.snippet_uga