Skip to content

Commit

Permalink
Merge pull request #1 from apolloeleven/custom-message-option
Browse files Browse the repository at this point in the history
Add alertMessage option to display custom alert message
  • Loading branch information
mirushaki authored Oct 29, 2019
2 parents f914aa9 + d7ca851 commit 1deec5f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion GaOpOut.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand All @@ -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}'
});
");
}
Expand Down

0 comments on commit 1deec5f

Please sign in to comment.