webleaks 0 Report post Posted March 23, 2012 Google Analytics Introduction Google Analytics is a free web analytics service by Google that generates detailed statistics about the visitors to a website. Sign up with Google Analytics 1.First you need to create an account with Google Analytics.(visit Google Analytics Signup Page.) 2.You can use your existing gmail account to sign up with analytics.If you don't have a gmail account, you need to create one. 3.After Signing in with your gmail account you will be prompted to fill the required information about your website.After this you will need to provide your contact information. 4.Then you will be provided with a code to paste on your pages.Copy it in a safe location. Install Google Analytics in WordPress There are 3 ways to install Google analytics in WordPress. 1. Direct Pasting Copy the code that you got while signing up with google analytics ,and paste it in your theme’s footer.php right above the </body> tag. 2. Using Functions.php Add the foll. code to your theme's functions.php file <?php add_action('wp_footer', 'add_googleanalytics'); function add_googleanalytics() { ?> // Paste the Google Analytics code here <?php } ?> 3. Plugins Method There are many good WordPress plugins that can do the work for you.Such for google analytics in wordpress plugin repository and you will get a list of available plugins. Share this post Link to post Share on other sites
yordan 10 Report post Posted March 23, 2012 Please do not post copied text in our forum. Posting copied text is considered as plagiarism and can lead to a ban.RegardsYordan Share this post Link to post Share on other sites
Quatrux 4 Report post Posted March 26, 2012 It seems to be a very easy task to include google analytics in your page, but this tutorial could be a litle more specific, or maybe I am missing something, but whenever you add an action and create a function for this code, you need to set in the template where to place it? or it will place itself automatically, magically just before the body tag? Share this post Link to post Share on other sites