Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author overclokk

    (@overclokk)

    Hi Agnes,
    you have 2 ways to do this:
    First of all you have to check the third checkbox from “Third part cookie block (beta)”
    then:
    – you can add the GA script into the “custom script” textarea
    or
    – you can select from the select box “script” the “analytics” value

    If you use the custom script box make shure you copy the exact snippet from your source page (ctrl + U).

    If you have any questions let me know.

    Thread Starter Agnes

    (@agneslesagegmailcom)

    Thanks for the response.
    I am interested in the 2nd option “you can select from the select box “script” the “analytics” value”.
    Can you confirm how and then:
    – That will block GA script in any case? Even if I have it activated through another plugin (like GA by Monsterinsights, ex-yeast?)
    – That will block the script unless user consents, and then activate it?
    Sorry to bother, I am in an environment test that does not make it easy to test such thing. And I believe this features interest other people, si it is good to make it clear ??
    Agnes

    Thread Starter Agnes

    (@agneslesagegmailcom)

    I am adding custom script in “script allowed in bodies”, byut they do not seem to be activated bhen the user accepts cookies. Do I get it wrong?

    It does not work with Google Tag Manager function (may be because it is not a script but P¨HP), but it does not work neither with a simple javascript alert.

    Do I get it wrong?
    Or is it that the script should be in the body anyhow, and will be simply accepted or blocked depending on plugin options?

    <---------SEP--------->
    if ( function_exists( 'gtm4wp_the_gtm_tag' ) ) { gtm4wp_the_gtm_tag(); }
    <---------SEP--------->
    alert("Message");
    Thread Starter Agnes

    (@agneslesagegmailcom)

    Sorry, I realize I made some mistakes above in the code.

    However, I still wonder if and how I should integrate GA tracking as a “opt in”, and check whether it will be activated upon acceptance of cookie policy, or only after user clicks on another page.

    I am testing with a simple js alert, and I dont get it to work, so I wonder if I place it in the right box.

    I have set:
    Third part cookie block (beta) > (Tick) Cookie from any embed in all body, except head and footer (Beta)

    And in “script to be blocked”: Custom

    <script type="text/javascript">
    document.write('test')
    </script>

    But after I accept cookie policy, of after I click another page, I expect this would show (it does if I put in in the same place in the header), but it does not.
    => Do I misubnderstand how the plugin is expected to work?

    Thanks, Agnes

    Plugin Author overclokk

    (@overclokk)

    Hi Agnes, sorry for my late,
    in custom script you have to write only the code or part of it without the tag container (<script>) and then you have to try.

    You can also select it from the select box “script”.

    Let me know if you have solved the problem.

    Regards

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Blocking Google Analytics?’ is closed to new replies.