On this document you can find details about the Analytics tracking component available in Analytics Insights for WP. The Tag Manager tracking is not covered by this documentation page.
Google Analytics 4 tracking feature works out of the box, being functional immediately after plugin authorization, without requiring any additional configuration.
Beside Google Analytics 4 (GA4) tracking, Tag Manager tracking option is also available.
If you are an advanced analytics user or you have some particular tracking requirements, a complete tracking code customization is possible through plugin’s options.
To access the tracking options go to your WordPress Administration screen and select Analytics Insights -> Tracking Code.
Basic Tracking options
Using the Tracking Type option you can choose between two tracking methods: Google Analytics 4 (GA4) and Tag Manager, or you can disable the entire tracking component.
Disabled (not recommended) means you are disabling the tracking component. The tracking code will NOT be automatically generated and inserted in your pages.
Google Analytics 4 is what most of you will use. When the option is selected from Tracking Type list, the plugin will automatically generate the tracking code, which will be inserted in all your website’s pages.
With the help of Code Placement option you can change the tracking code location. You can move it from head section to body section (place it in footer).
With the help of Events you can track most of the user interactions with your content. This feature will allow tracking of events like:
- email clicks
- telephone clicks
- form submissions
- fragment identifiers, (# hashmarks)
- affiliates and outbound links
- page scrolling depths
You can also track your affiliate links when they are matching a specific pattern like: /out/, /redirect/, /go/ using the Affiliates Regex filter.
To see how deep the users are scrolling into your pages, enable the page scrolling depth feature. It monitors the 25%, 50%, 75%, and 100% scroll points of users browsing your website.
Custom dimensions allows you to group your data in new ways by applying values to sessions based on scopes you define.
With Analytics Insights for WP and its Custom Definitions feature you can further segment your data and track users’ engagement, editors’ performance, categories’ popularity, tags’ popularity, the most successful publication months by year and the most successful publication years. Here is a comprehensive tutorial about custom dimensions setup.
You can use the Exclude Tracking option to ignore traffic generated by certain logged-in users. Using this option the tracking code can be automatically removed for specific user roles.
Advanced Tracking options
When needed, you can also choose to anonymize IPs. This option will enable you to comply with some privacy protection laws available in different countries.
Depending on your needs, you can choose to include or exclude events in / from bounce-rate calculation. Use the exclude events from bounce-rate calculation option to setup your events accordingly.
Using enable enhanced link attribution you can track separate information for multiple links, on a page, all having the same destination. Using this feature you can also track page elements that have multiple destinations.
If you want to increase the events tracking accuracy enable the use hitCallback to increase event tracking accuracy option. This option applies to downloads and affiliate links only when the link target is not _blank. By default, the callback timeout is set to 100 ms. You can increase this value using the aiwp_analyticsevents_timeout filter. If you’re using scripts that are preventing the defaults for these link clicks you should test the functionality of this option before using it in production.
Cross-Domain tracking will allow you to track multiple TLD using a single Property. When needed, enable this feature and enter all other top domains in Cross Domains text field, separated by commas.
Use Cookie Domain, Cookie Name and Cookie Expires options whenever you need to customize the cookie settings.
In the Integration tab you’ll find a bunch of options meant to allow integration between this plugin and third-party plugins, themes, or features.
To track users on AMP, you should switch on enable tracking for Accelerated Mobile Pages (AMP). Find more about this feature and adding Google Analytics to AMP pages on WordPress.
Google Optimize is also supported. You can enable it by switching on enable Optimize tracking. To have it working, please make sure you enter the Optimize Container Id in its designated field. To mitigate the risk of page flicker, while loading Optimize, the Page-Hiding snippet can be enabled using the enable Page Hiding support option.
Please note that some advanced tracking options might not be available for all tracking methods.