this would be the easiest way to track all your sites with one GA code.
http://wpmututorials.com/plugins/how-to-hook-into-the-footer/
hmm Is this code correct?
<?php
/* google analytic for all subfolder site */
/*
Plugin Name: GA subfolder
Description: analytic tracking code
Author: noobbgodlike
Version: 1.0
Author URI: www.guide4gamers.com
*/
function GA_SUBFOLDER () { ?>
/* TRUE or NOT^^^^^. */
<p><em>This blog is provided by <a href="<?php get_settings
('www.guide4gamers.com'); ?>"><?php get_settings('guide4gamers'); ?
></a>.</em></p>
/* site url is main site,isn't it ?? what about sitename?, is it case sensitive or anything? */
<?php }
/* We opened up our php again. we have to tell WPMU something important. */
add_action('wp_footer', GA_SUBFOLDER');
/* Now, Where I put my google analytics code?? Thank you Andrea */
?>
I don’t have 2500 subfolder maybe only about 3-5. :D. Which tracking code that I need to use?? (Single domain, one domain with subdomain, multiple top level domain??Sorry if this sound stupid, probably the answers is single domain but just wanna to make sure ..T T)
Where do I need to put this code (IN PLUGIN FOLDER??)??How to create thht .php file?? (Am I only need to rename the .txt file into plug-in.php).What I should name the plug in?? Is it must be the same as function name?GA_SUBFOLDER.PHP?? or what?
Put the file into your mu-plugins folder — if you don’t have one, it’s a folder named ‘mu-plugins’ in the same level as your plugins folder – you get this:
wp-content\plugins
wp-content\mu-plugins
wp-content\themes
As for your code, you’re on the right track 🙂 The siteurl stuff actually is putting WP data, so you keep those as is IF you want them. If not, just put your GA code where I put the [GOOGLE CODE HERE!] thing 😀 Replace that.
function GA_SUBFOLDER () { ?>
<p><em>This blog is provided by <a href="<?php get_settings('siteurl'); ?>"><?php get_settings('sitename'); ?></a>.</em></p>
[GOOGLE CODE HERE!]
<?php }
add_action('wp_footer', GA_SUBFOLDER');
?>