Available Since: V1.0.0
The cookieconsent::consentGiven function can be used by modules and snippets to query if consent has been given by the user to set cookies on their browser e.g.
1 2 3 | if (cookieconsent::consentGiven()) { // Consent given so output Google Analytics code } |