| | |||||||
| |||||||
| New! Use your Facebook, Google, AIM & Yahoo accounts to securely log into this site, click logo to login | |
| Website Development Development concepts, scripts, sponsors and affiliate programs. |
![]() |
| | LinkBack | Thread Tools |
| | #1 (permalink) |
| NamePros Member | put Google Analytics in headers/footers? Anyone know if you're supposed to put the Google Analytics code in headers/footers that are IFrames? If you look at my front-page here, all of the links are in inline-frames (which themselves are their own HTML pages), and I'm not sure if they need their own Analytics code or not.
__________________ My site: Deefrag.com Last edited by Dario D.; 06-19-2009 at 02:04 PM. |
| | |
| | #2 (permalink) |
| NamePros Regular | I put it in the footer. Only place it once on your page, it will help. Always the best place.
__________________ PoliticsArea.Com - Now its your politics - Free Gaming - Daniel Leightley Photography |
| | |
| | #3 (permalink) |
| NamePros Regular | By putting in the footers, you ensure: 1. Your page content loads first. 2. The stats are counted only after a full page load.
__________________ --------------------------------------------------------------------------------------- Elite PHP Freelancers - You don't pay until we're done and we're not done until you are satisfied! |
| | |
| | #4 (permalink) |
| New Member | definitely put it in the footer - that is a best practice
__________________ Rise above the herd of mediocre domainers ™ -$$$- www.BeyondDomaining.com -$$$- Step by Step Illustrated Domain Development Guidebook |
| | |
| | #5 (permalink) |
| NamePros Member | Okay, thanks. But also, are you sure that'll properly report page hits? Is there a chance that putting the code in the footer will result in GA reporting a million footer visits, and nothing else?
__________________ My site: Deefrag.com |
| | |
| | #6 (permalink) |
| NamePros Member | Update: Okay, sure enough, GA now shows that people are visiting the footer IFrame like crazy (linkbar.html), but not any of the relevant site pages. ![]() Anyone know if there's a way to force the pageviews to reflect the master page, not the IFrame?
__________________ My site: Deefrag.com |
| | |
| | #7 (permalink) |
| Senior Member | did u try putting the code just in the footer of the original page (where u have the iframe code)? google has always been one smart cookie when it comes to anything, and id be VERY surprised if they didnt read/register content that was inside an iframe - try removing it from the actual iframe page and putting it only on the main page.
__________________ Hacksar.com - Your source for random computer tips and tricks! MySiteMemberships.com - Keep track of your site registration information! Like my post? Rep is appreciated! |
| | |
| | #8 (permalink) |
| NamePros Member | Yeah. When the code is in [main-page-name].html, everything works fine. But when I only have it in [footer].html (loaded on "main page" as an IFrame) GA says that all pageviews are for [footer].html, and I no longer see what's happening on "main page".
__________________ My site: Deefrag.com Last edited by Dario D.; 06-24-2009 at 07:31 PM. |
| | |
| | #9 (permalink) |
| Senior Member | I wouldn't put anything google related in an iframe
__________________ Car Insurance Quote | Gas Price Script | Gas Discussion | Nike Golf Clubs | Image Host | Check your stats |
| | |
| | #11 (permalink) |
| Senior Member | Google Suggest you to put in footer. Agree with Halycon.Spinste's post, you need to load your content first before google script
__________________ (\__/) [WTB] Space Banner 150 x 75 min. PR4 (='.'=) (")_(") Looking for Your Unused Domain HOT !!! .. ¦ ¦ Get Amazon and ASOS gift vouchers for free |
| | |
| | #12 (permalink) |
| Senior Member | people who say that you should put your code in the footer are not understanding your problem. let me see if i have it right: you have a design (homepage, example, is index.html) that consists of multiple parts displayed using iframes (such as main.html, header.html, and footer.html). your question is whether you should put the google analytics code in index.html or footer.html, NOT if you should put it in "the footer of the website" the code should be included at the bottom (right before the </body>) of your index.html page. (this way, your <iframe> tags are found ABOVE your analytics code). the individual pages (main.html, header.html, footer.html, etc) should NOT need the analytics code am i correct in interpreting your problem/question?
__________________ Hacksar.com - Your source for random computer tips and tricks! MySiteMemberships.com - Keep track of your site registration information! Like my post? Rep is appreciated! |
| | |