• Resolved ArtGoddess

    (@artgoddess)


    Hello!

    I’m using GA Google Analytics plugin with this plugin: https://ww.wp.xz.cn/plugins/password-protected/

    The password-protected page doesn’t include the Google Analytics tracking code, because it does not output the general wp_footer but login_footer instead.

    In fact, I have temporarily tested wp_footer and Google Analytics works.

    So, can you please let me know which is the function I have to call from my child theme functions.php in order to make Google Analytics work in the password-protected page?

    I want to maintain the default plugin behaviour and have a different footer in the password-protected page.

    function my_password_protected_footer() {
       // Call to GOOGLE ANALYTICS FUNCTION
     }

    add_action('login_footer', 'my_password_protected_footer');

    Many thanks for your assistance!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Jeff Starr

    (@specialk)

    Glad to help. To include Universal Analytics in your custom function, use

    ga_google_analytics_universal()

    Or to include Global (gtag) Analytics use

    ga_google_analytics_global()

    Thread Starter ArtGoddess

    (@artgoddess)

    Perfect, solved! Many thanks!

    Plugin Author Jeff Starr

    (@specialk)

    You are very welcome!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Track password-protected page’ is closed to new replies.