0
Welcome Guest! Login
0 items Join Now

Google Analytics Script - Where should it go?

  • Google Analytics Script - Where should it go?

    Posted 17 years 7 months ago
  • Re: Google Analytics Script - Where should it go?

    Posted 17 years 7 months ago
    • It's just a small java script. You can put it at the bottom of the index.php file.

      It takes forever to start collecting data though (regardless of where you put it).
  • Re: Google Analytics Script - Where should it go?

    Posted 17 years 7 months ago
    • Would the script, if loaded on the index.php page, get loaded on all page views so I get a full picture of visitor activity?

      I also tried it on the index.php page, just before the last ?> tag, and the page failed to display. Where would it go? I don't know php and the script is supposed to be included somewhere on the page between the <body></body> tags.

      Thanks,
      Jason
    • Last Edit: 17 years 7 months ago by Jason A Shaw.
    • -Jason

      www.myperfectcolor.com
      www.breslow.com
      www.paintersource.com
      www.reusepaint.com
    • Tim2006's Avatar
    • Tim2006
    • Hero Rocketeer
    • Posts: 282
    • Thanks: 0

    Re: Google Analytics Script - Where should it go?

    Posted 17 years 7 months ago
    • Hi,

      You need to edit the index.php file for the template you are using. Place the script just before the </body> tag at the bottom.

      It tracks all the pages for the sites I use it in.

      Tim
    • Last Edit: 17 years 7 months ago by Tim2006.
  • Re: Google Analytics Script - Where should it go?

    Posted 17 years 7 months ago
    • urj2ic8's Avatar
    • urj2ic8
    • Hero Rocketeer
    • Posts: 421
    • Thanks: 0

    Re: Google Analytics Script - Where should it go?

    Posted 17 years 7 months ago
    • google recommends putting it right before the </head> tag
    • Billy Zoellers
    • Tim2006's Avatar
    • Tim2006
    • Hero Rocketeer
    • Posts: 282
    • Thanks: 0

    Re: Google Analytics Script - Where should it go?

    Posted 17 years 7 months ago
    • eh? you made me look...! Google analytics says just before the </body> tag when I look at their instructions...

      Copied from the analytics page in Google adwords....

      Copy and paste the code segment into the bottom of your content, immediately before the </body>


      Anyway, this place seems to work fine for me.
  • Re: Google Analytics Script - Where should it go?

    Posted 17 years 7 months ago
    • Jason A Shaw wrote:
      I also tried it on the index.php page, just before the last ?> tag, and the page failed to display.

      Yeah, don't place this inside of a php ( ?> ) tag. I put it immediately before the </body> tag. Since everything is displayed via the index.php page, it will capture all the info.
  • Re: Google Analytics Script - Where should it go?

    Posted 17 years 7 months ago
  • Re: Google Analytics Script - Where should it go?

    Posted 17 years 4 months ago
    • I never got data from google. I put the google script just before the </body> tag on the index.php file.

      Why wouldn't I get data from this? And wouldn't this provide incomplete site data? The index.php file only loads on the home page, true?

      Anyone have a good anwer on how to make google analytics work with the joomla template?

      Thanks,
      Jason
    • -Jason

      www.myperfectcolor.com
      www.breslow.com
      www.paintersource.com
      www.reusepaint.com

Time to create page: 0.056 seconds