• In the source code, the analytics tracking code is tied to admin_head action, not wp_head action, so it shows up only in the admin side of things.

    I would assume you’d want to ONLY track non-admin visits.

    Also, there should be a note that in the Google Analytics tracking code, you want to paste the entire <script>…</script> block provided by Google, not just the UA-XXXXXX-X code.

    https://wordpress.org/plugins/ws-google-webmaster-tools/

Viewing 3 replies - 1 through 3 (of 3 total)
  • i’ve had to change line 25 to
    add_action(‘wp_head’, array(&$this, ‘ws_add_js_scripts’), 5);
    an now it works fine

    journeyman_73 saves the day! That solution worked for me as well, and the GA code snippet now shows up in my web pages.

    If you add this code:
    add_action(‘wp_head’, array(&$this, ‘ws_add_js_scripts’), 5);
    What’s the matter when you update the theme?

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

The topic ‘Analytics tracking code doesn't work’ is closed to new replies.