Forum Moderators: rogerd & travelin cat

Message Too Old, No Replies

How to implement Google Analytics into Wordpress?

         

intouch01

5:22 am on Nov 26, 2014 (gmt 0)



How we can put anaytic code in wordpress site?

lorax

11:46 am on Nov 26, 2014 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Hello and welcome to WebmasterWorld intouch01.

It depends upon the theme you're using. Some themes provide a tool/form field that you can drop your GA code into. Other themes require you to edit a file and add your code there. Check the theme's documentation or forums and you should find an answer there.

[edited by: lorax at 9:31 pm (utc) on Nov 28, 2014]

intouch01

5:16 am on Nov 28, 2014 (gmt 0)



Thanks for your great reply Sir.

TechBuddy

7:03 am on Dec 3, 2014 (gmt 0)



First you would need to create a Google Analytics account . with your gmail account and adjust setting there. and put this function in header.php after <body> tag

write this code in function.php

<?php
add_action('wp_footer', 'add_googleanalytics');
function add_googleanalytics() { ?>
// Paste your Google Analytics code
<?php } ?>