Posted By

xavsio4 on 07/06/11


wordpress functions

Versions (?)

Wordpress Add Google Anamytics in function

 / Published in: PHP

Simply paste the code below and insert your Google Analytics where it says paste your Google Analytics. You can paste the code once in your functions.php file and never have to worry about it again. We are adding an action to the wpfooter, so it will automatically insert adsense codes wherever on all pages you have the wpfooter string.

  1. <?php
  2. add_action('wp_footer', 'add_googleanalytics');
  3. function add_googleanalytics() { ?>
  4. // Paste your Google Analytics code from Step 6 here
  5. <?php } ?>

Report this snippet  

You need to login to post a comment.