From d7ca851c272c2a9bd319279b65d6ff5d14955744 Mon Sep 17 00:00:00 2001 From: miriani Date: Tue, 29 Oct 2019 16:19:46 +0400 Subject: [PATCH] Add alertMessage option to display custom alert message --- GaOpOut.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/GaOpOut.php b/GaOpOut.php index aee6fcf..e38b64e 100644 --- a/GaOpOut.php +++ b/GaOpOut.php @@ -25,6 +25,9 @@ class GaOpOut extends Widget //element selector with link to jsoutput public $elementSelector = '[href="#jsgaoptout"]'; + //Alert message on disable + public $alertMessage = 'Google Analytics tracking has been deactivated in your browser for this website.'; + /** * @var bool */ @@ -41,7 +44,8 @@ public function init() optOutCallEvent: '{$this->optOutCallEvent}', elementSelector: '{$this->elementSelector}', debug: " . ($this->debug ? 'true' : 'false') . ", - showAlterAfterDeactivate: " . ($this->showAlterAfterDeactivate ? 'true' : 'false') . " + showAlterAfterDeactivate: " . ($this->showAlterAfterDeactivate ? 'true' : 'false') . ", + alterMessage: '{$this->alertMessage}' }); "); }