Google Analytics and Wordpress Question

5 replies
Hi,

I have 2 separate installs of Wordpress on a single domain...one in the root and the other one in a subdirectory (I have a specific reason for this).

I installed Google Analytics for the root install and I see that it won't track anything in the subdirectory (where I have the other install).

So here are my questions:

1. Is there a problem here or is it normal that GA is not tracking the subdirectory?

2. Assuming I need to install GA for the Subdir do I accomplish this by creating a new Property in GA or a new account?

Any help on this would be greatly appreciated.

Thanks.

Ken
#analytics #google #google analytics #question #wordpress
  • Profile picture of the author TommyGeek
    Hi Kenneth,

    judging from what you wrote I assume that you installed GA code only in one WordPress instance? If that's the case, then, of course, it's no surprise that you're not getting data for the other instance.

    But anyway, you should at least create separate properties for different WordPress installations to keep your data organized. You can also create another account but still you will need to create a new property in that account. Accounts in Google Analytics is just a higher organizational layer. For example, in the past you could assign other users only to the account level, but now you can do it in the property level as well.
    {{ DiscussionBoard.errors[9532819].message }}
    • Profile picture of the author Kenneth Holland
      Hi Tommy,

      That's what I thought...but wanted to make sure I didn't make an error.

      Since both installs are on the same domain, I'll just create another property.

      Thanks for your input.

      Kenneth
      Signature

      'A real friend will stab you in the front'

      {{ DiscussionBoard.errors[9532822].message }}
  • Profile picture of the author FreedomBlogger
    You should be able to track both Wordpress blogs under the same domain. All you need to do is Paste the exact same GA Code in both WP Sites.

    Or you can also do what the above reply explained

    I hope this helps!

    I wish you the best of the best!

    Cheers!
    Signature
    At the beginning, I thought making money online with a blog was super super hard. Not anymore. Learn the art of making money online blogging - step by step - HERE.
    {{ DiscussionBoard.errors[9532842].message }}
    • Profile picture of the author Kenneth Holland
      Don't know why I didn't think of that...but thank you!

      Kenneth

      Originally Posted by FreedomBlogger View Post

      You should be able to track both Wordpress blogs under the same domain. All you need to do is Paste the exact same GA Code in both WP Sites.

      Or you can also do what the above reply explained

      I hope this helps!

      I wish you the best of the best!

      Cheers!
      Signature

      'A real friend will stab you in the front'

      {{ DiscussionBoard.errors[9533007].message }}
  • Profile picture of the author mralexanderca
    @OP, you need to make sure that the GA code is added to the sub-directory as well, without it GA has no way of knowing to track the sub-directory as well, as this is a separate install.

    You can either do this via editing the footer.php file of the theme in your sub-directory or, recommended, install a GA plugin for the install @ sub-directory and add your GA tracking code.

    You can add the same tracking code if its the same website or create a new one, your choice.

    Hope this helps.

    Mr Alexander
    Signature

    Mr Alexander

    Web Developer & Consultant with extensive experience, since 1998

    Websites.Consulting

    {{ DiscussionBoard.errors[9548269].message }}

Trending Topics