1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to add google analytics to a site?

Discussion in 'Web Hosting' started by amdcpus, Apr 12, 2014.

  1. amdcpus

    amdcpus BANNED BANNED

    Joined:
    Nov 9, 2013
    Messages:
    435
    Likes Received:
    31
    I started getting a fair amount of traffic so I want to start tracking it. I got a google analytics code but not sure where to put the code?
     
  2. abhi007

    abhi007 Jr. VIP Jr. VIP

    Joined:
    Aug 31, 2010
    Messages:
    5,305
    Likes Received:
    3,741
    Location:
    snip.li/TubH
  3. borris101

    borris101 Registered Member

    Joined:
    May 18, 2012
    Messages:
    50
    Likes Received:
    8
    The code normally goes in the head section of every page you want to track.
     
  4. V

    V Elite Member

    Joined:
    May 18, 2012
    Messages:
    2,113
    Likes Received:
    2,543
    Occupation:
    Student
    Location:
    /tmp
    better create a function and call it using the footer, so it gets imported in every page of your site :) many WP themes have this feature, and some need some work! :) let me know if you need any help! ;)
     
  5. amdcpus

    amdcpus BANNED BANNED

    Joined:
    Nov 9, 2013
    Messages:
    435
    Likes Received:
    31
    Sorry for not specifying but the site is made up of many php files.
     
  6. SEOnetic

    SEOnetic Senior Member

    Joined:
    May 21, 2012
    Messages:
    995
    Likes Received:
    120
    copy code from Analytics and past it to your root. That's it.
     
  7. gogreen

    gogreen Power Member

    Joined:
    Jan 23, 2014
    Messages:
    601
    Likes Received:
    87
    Posts the tracking code to all pages you want track according to Google.
     
  8. V

    V Elite Member

    Joined:
    May 18, 2012
    Messages:
    2,113
    Likes Received:
    2,543
    Occupation:
    Student
    Location:
    /tmp
    are you using WordPress? If yes, you can paste the code in the footer.php file. If you're using something else, you must have a function for footer, paste the code in that file and you'll be good to go! ;) :)
     
  9. pxoxrxn

    pxoxrxn Supreme Member

    Joined:
    Dec 21, 2011
    Messages:
    1,397
    Likes Received:
    2,066
    Create a function in your head tags and called the script with that.
     
  10. JournoNick

    JournoNick Jr. VIP Jr. VIP Premium Member

    Joined:
    Feb 11, 2014
    Messages:
    613
    Likes Received:
    309
    Location:
    on the frontline
    Just drop it in header.php before the </head> tag