24-02-2011, 00:09
Cytat:How to Install Google Analytics in WordPresshttp://www.wpbeginner.com/beginners-guid...wordpress/
There are 3 ways to install Google analytics in WordPress. Direct paste, functions.php, and plugins.
Direct Paste Method
Copy the code that you received in Step 6, and paste it in your theme’s footer.php right above the </body> tag.
Functions.php Method
Add the following code in your theme’s functions.php file and don’t forget to paste your Google Analytics code from Step 6 here.
<?php
add_action('wp_footer', 'add_googleanalytics');
function add_googleanalytics() { ?>
// Paste your Google Analytics code from Step 6 here
<?php } ?>
Plugins Method
There are tons of plugins available to add Google Analytics to your site. The two that we recommend are:
Google Analytics for WordPress by Joost de Valk
Google Analyticator by Ronald Heft