How to set it up for sub directory

I am using the subdirectory method of mult-site, with buddypress.

How to I set up Google Analytics? Google Analytics only provides an option for subdomains, but not sub directories.

Also, where do I paste the code in my site?

Dustin

  • DavidM
    • DEV MAN’s Mascot

    Hi Dustin,

    The plugin should work just as well with sub-directories. Could you provide a screenshot of the option area where you're only seeing the sub-domain possibility?

    Also, the code would be pasted in each site's Settings > Google Analytics options area. Are you not seeing that menu item?

    Thanks,
    David

  • dustinmattison
    • The Incredible Code Injector

    Please see attached to screenshots.

    1. Which option do I choose
    2. Is this where I paste the code? It doesn't fit.

    <script type="text/javascript">

    var _gaq = _gaq || [];
    _gaq.push(['_setAccount', 'UA-10559361-10']);
    _gaq.push(['_setDomainName', '.supply-networks-that-learn.com']);
    _gaq.push(['_trackPageview']);

    (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
    })();

    </script>

  • DavidM
    • DEV MAN’s Mascot

    Hi Dustin,

    I really don't know where that second screenshot is coming from, but you may want to take a look at your plugins list for another analytics plugin.

    Our Google Analytics plugin takes care of the code insertion for you, all you need to do is enter the tracking code, it handles the rest.

    As far as multisite usage, each site on your network should have that Settings > Google Analytics option page, as long as the plugin as the plugin is network activated.

    Could you check in your Network Admin > Plugins list that you've got the plugin network activated?

    Thanks,
    David

  • DavidM
    • DEV MAN’s Mascot

    Ah, I see. Your Network Admin > Settings > Google Analytics options page isn't displaying properly for some reason, which really is odd, especially since it looks like it displays just find in the Site Admin options.

    To start with, could you download a fresh copy of the latest version, delete the existing plugin folder and install the latest version via FTP?

    My best guess right now is that one of the files got corrupted somehow and that ought to fix it.

    Also, the UA code there is actually all that you need. You won't have to paste in that code anywhere, the plugin takes care of that for you. I thought that was a separate plugin at first, not realizing the screenshot was from the Google Analytics page itself. :slight_smile:

  • dustinmattison
    • The Incredible Code Injector

    I tried your suggestion, still the same problem with all that code crammed up on the top from when I previously pasted in the code there. I don't know why it is doing this since I deleted the plugin and followed your instructions to upload via FTP

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.