The Analytics configuration page lets you set up rules to let you include analytics support for various analytics providers.
Using rules instead of a single code instance is at the same time very flexible and very easy. The main benefits are that you can use:
- any combination of analytics providers
- any provider on any page or any group of page
You can manually add custom code to any rule you define, on top of the built-in support.
4SEO automatically adds the correct code snippet in the desired pages for:
- Google Analytics Universal (version 3)
- Google Analytics version 4
- Google Tag Manager
- Matomo (Matomo server or your own)
- Facebook Pixel
For other providers
If your provider of choice is not on the list, you can include their code snippet on any page or any set of page by using a Raw code rule.
Custom analytics code
For each analytics provider, 4SEO will offer you a set of options, but most of them define an extremely large number of properties.
We have selected the most common and useful of them for easy creation, but if you want to include a less common property in your pages, you can do so by simply entering a raw
json code snippet. 4SEO will then insert this code exactly as is together with the other properties.
Please refer to your Analytics provider documentation to find out which exact custom code can be inserted, and the exact syntax to use. As always, make sure to test the result.
You can take advantage of custom fields to provide custom value per article or item, instead of having to create more rules.
Like most 4SEO features, you configure one or more Analytics provider support on your site by creating rules. You can learn more about creating and editing rules in general on the Rules page.