How to setup Google Analytics and Tawk.TO
-
Hi,
Does anyone have experience with setting up Google Analytics and Tawk.to within the plugin?
I can not setup this. For Analytics I have set a cookie with the name _ga and created a consent with the name analytics, the consent is not requireed and the cookie is not always active.
In the functions.php I have placed the following code:
add_action (‘wp_head’, ‘my_google_opt_out’);
function my_google_opt_out () {
??if (! has_consent (‘analytics’) ||! is_allowed_cookie (‘_ga’)) {
?????>
????<script>
??????window [‘ga-disable-UA-mycode-1’] = true; // Do not forget to replace X for your actual UA numbers.
????</ script>
????<? php
??}
}But the standard analytics code is also in the header, I want the analytics to work as standard and that the user can disable it and not the other way around. How could I set all this?
For the Tawk.to chat I do not get it working at all, does anyone have any experience with setting up the plug-in for Tawk.to and Analytics?
Thanks in advance.
The page I need help with: [log in to see the link]
- The topic ‘How to setup Google Analytics and Tawk.TO’ is closed to new replies.