How to add Google analytics to my WordPress Site ?

78 views
asked Mar 4, 2013 in Website Builder by DinoGuy (2,130 points)
Hello

I have set up Google Analytics and now I want to add it to my wordpress site, but I am not sure how. Can anyone please  help?
Thanks

2 Answers

0 like 0 dislike
answered Mar 4, 2013 by tareq101 (4,880 points)
add this code to your functions.php file
<?php
    add_action('wp_footer', 'add_googleanalytics');
    function add_googleanalytics() { ?>
    // your Google Analytics code goes here
    <?php } ?>
0 like 0 dislike
answered Mar 4, 2013 by expert (14,380 points)
...