Google Analytics and Wordpress Question

by 5 replies
6
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
#programming #analytics #google #google analytics #question #wordpress
  • 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.
    • [ 1 ] Thanks
    • [1] reply
    • 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
  • 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!
    • [ 1 ] Thanks
    • [1] reply
    • Don't know why I didn't think of that...but thank you!

      Kenneth

  • @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

Next Topics on Trending Feed