Requirement: Statamic v2.x
Version: 1.0.4
Add Google Analytics support to Statamic 2 and configure tracking from the Control Panel
- Rename the folder
GoogleAnalytics
and copy it to yoursite/addons
folder
- Use the settings to configure your tracking id and other Google Analytics settings or create a settings file in
site/settings/addons/google_analytics.yaml
tracking_id: UA-*******-*
async: false
beacon: false
display_features: false
link_id: false
track_uid: false
ignore_admins: false
debug: false
trace_debugging: false
disable_sending: false
- Manually add the tag to your theme layout file just before your close
</head>
tag.
{{ google_analytics }}
- Use Statamic's built in environment specific settings to specify different settings for Google Analytics in development or testing.
- There is a slight bug with this. See statamic/v2-hub#846 and statamic/v2-hub#1073
- uBlock Origin, and possibly other addons of this type can cause the settings not to save properly for this addon. If you disable the plugin for your domain the settings should save fine.
Made with ❤️ by JRC9 Design Studio