• Resolved feith

    (@feith)


    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.

    • This topic was modified 6 years, 6 months ago by feith.

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘How to setup Google Analytics and Tawk.TO’ is closed to new replies.