nswdpc / silverstripe-analytics-chooser
Analytics chooser extensions for site settings.
Package info
github.com/nswdpc/silverstripe-analytics-chooser
Type:silverstripe-vendormodule
pkg:composer/nswdpc/silverstripe-analytics-chooser
Requires
Requires (Dev)
- cambis/silverstan: ^2
- cambis/silverstripe-rector: ^2
- friendsofphp/php-cs-fixer: ^3
- nswdpc/ci-files: dev-v-4
- phpstan/phpstan: ^2
- phpstan/phpstan-phpunit: ^2
- phpunit/phpunit: ^11
- rector/rector: ^2
Suggests
- nswdpc/silverstripe-csp: Nonce attribute value support
README
Provides a basic set of analytics services, to choose within the site settings administration area.
Currently supported:
- GA4
- GTM
- GTM (with CSP nonce support)
Developers can provide their own service by creating a class that implements the abstract service.
Installation
composer require nswdpc/silverstripe-analytics-chooser
Usage
Once installed, your theme will need to include the templates provided by this module:
Document <head>
<% include NSWDPC/AnalyticsChooser/Implementation %>
Document <body>
Apply an iframe if using GTM:
<% include NSWDPC/AnalyticsChooser/GTMIframe %>
You can override these templates in your project theme, in the usual Silverstripe way.
License
Documentation
Configuration
None, currently
Maintainers
- PD Web Team
Bugtracker
We welcome bug reports, pull requests and feature requests on the Github Issue tracker for this project.
Please review the code of conduct prior to opening a new issue.
Security
If you have found a security issue with this module, please email digital[@]dpc.nsw.gov.au in the first instance, detailing your findings.
Development and contribution
If you would like to make contributions to the module please ensure you raise a pull request and discuss with the module maintainers.
Please review the code of conduct prior to completing a pull request.