diff options
author | Ben Burgess <88810029+bx80@users.noreply.github.com> | 2022-09-09 07:08:01 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-09 07:08:01 +0300 |
commit | 178c87bdba89ec714805e346d97fdda7af79498c (patch) | |
tree | 94522a17183c1f3517be02596fa12abfadce091c /plugins/CoreAdminHome/Controller.php | |
parent | 437dfd2e2b21d3aa875d33d4a095ff784a26a310 (diff) |
Improved opt out (#19528)
* New opt out UI, self-contained code - WIP
* Updated translation
* built vue files
* Added OptOutJS functionality, code improvements, show custom guide link on UI
* Rebuild Vue
* built vue files
* Fix typo
* Default iframe out-out to show intro, minor code tidy, updated UI test screenshots
* built vue files
* Replaced let with var
* Improved warning when opt-out content div is missing, added info box to recommend testing
* built vue files
* Update UI test screenshots
* Show intro parameter show as zero if not set, hide opt out complete message if not showing intro, added additional opt out url exclusions, reverted incorrect regex adjustments
* built vue files
* Annotated new core home embed code methods as internal
* Simplify code
Co-authored-by: Stefan Giehl <stefan@matomo.org>
* Updated parameter name, added trailing url trimming
* Added language choice selection for self-contained opt-out code
* Increased test_TotalPiwikFilesSize_isWithinReasonnableSize size from 58MiB to 60MiB
* Adjust layout
* Update UI test screenshot
* Prevent session start for optOutJS controller method
* Fix conflicts
* Fix for vue error
* built vue files
* Added content type and cache control headers when serving the opt out javascript
* Added option to apply styling (disabled by default), improved reminder box visibility, updated developer log, added what's new, added title to opt-out developer guide section
* built vue files
* Fix typo
Co-authored-by: Justin Velluppillai <justin@innocraft.com>
* Update tests
* Update UI test screenshot
* Moved inline CSS style to less
* built vue files
* Update UI test screenshot
* Update test reminder section style
* built vue files
* Update UI test screenshot
* Accept cookie path and cookie domain as URL parameters, revert loading (incorrect) cookie settings from config
* Bump to retry random test fail
* Local vue build
* built vue files
* Added blog post link to the what's new notification
* Update UI test screenshot
* Update "What's New?" link url
Co-authored-by: bx80 <bx80@users.noreply.github.com>
Co-authored-by: Stefan Giehl <stefan@matomo.org>
Co-authored-by: Justin Velluppillai <justin@innocraft.com>
Diffstat (limited to 'plugins/CoreAdminHome/Controller.php')
-rw-r--r-- | plugins/CoreAdminHome/Controller.php | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/plugins/CoreAdminHome/Controller.php b/plugins/CoreAdminHome/Controller.php index 20283d6d4c..4af369a7ae 100644 --- a/plugins/CoreAdminHome/Controller.php +++ b/plugins/CoreAdminHome/Controller.php @@ -255,11 +255,24 @@ class Controller extends ControllerAdmin } /** - * Shows the "Track Visits" checkbox. + * Shows the "Track Visits" checkbox - iFrame (deprecated) */ public function optOut() { - return $this->optOutManager->getOptOutView()->render(); + return $this->optOutManager->getOptOutViewIframe()->render(); + } + + /** + * Shows the Javascript opt out + * + * @return string + * @throws Exception + */ + public function optOutJS(): string + { + Common::sendHeader('Content-Type: application/javascript; charset=utf-8'); + Common::sendHeader('Cache-Control: no-store'); + return $this->optOutManager->getOptOutJS(); } public function uploadCustomLogo() |