Results 1 to 5 of 5

 

Thread: Where to Put Stats Code in WordPress

  1. #1
    accelerator's Avatar
    Online shopping rocks!

    Status
    Offline
    Join Date
    Nov 2004
    Location
    England
    Posts
    3,030
    Thanks
    54
    Thanked 183 Times in 164 Posts


    Hi Guys

    I need to add StatCounter and Google Analytics code to my shiny new WordPress blog, can anyone tell me where it should go?

    Ta Muchly

  2. #2
    Registered User

    Status
    Offline
    Join Date
    Feb 2010
    Posts
    1,390
    Thanks
    62
    Thanked 142 Times in 131 Posts
    there are plenty of plug-ins for adding analytics. The Yoast one is my weapon of choice.
    http://yoast.com/wordpress/google-analytics/

    For the statcounter or to hard code analytics select appearance, then editor and insert it into header.php or footer.php

  3. The Following User Says Thank You to dc000000 For This Useful Post:

    accelerator (30-11-10)

  4. #3
    Registered User

    Status
    Offline
    Join Date
    Jan 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    or you could place a text widget into the side bar and paste the HTML into there, I use statpress for all my stats

  5. #4
    babrees's Avatar
    Registered User

    Status
    Offline
    Join Date
    Feb 2007
    Location
    Norfolk
    Posts
    1,588
    Thanks
    142
    Thanked 101 Times in 89 Posts
    It depends upon your theme, but I would just put it int the footer.php

  6. #5
    jimbanks's Avatar
    Registered User

    Status
    Offline
    Join Date
    Oct 2007
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts
    If you are tracking Google Analytics then use the asynchronous version of their tag and place it in header.php rather than the footer, it won't stop the rest of the page loading as the old version used to do.

    You can use any number of plugins, and if that is your preferred route then I also would go with the Yoast version, but plugins slow your site down, and as the header appears on every page there is no harm in hard coding it....unless you change the WP theme in which case your header will change.



Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
To Top

Content Relevant URLs by vBSEO 3.5.0 RC2