Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Google Analytics: Best place to put tracking code?

Featured Replies

I have used Google analytics with adsense for around a year or so now, the thing is, I have google analytics showing around 1000 pageviews a day but analytics is showing 550 pagieviews... I have the adsense and analytics code on all my pages used, so why are the figures different?

 

Does it matter where I put my analytics code? Google instructed to put it before the </body> tag at the bottom of my webpages but when analytics ussed to be "Urchin" (before the google buyout) their required it to be put into your head. I also see some errors in Firefox with urchin, not just on my ste but others. So do you think it would hurt putting it into the <head> of my document? Does anyone else do the same?

 

Thanks.

  • 4 months later...

Hey Paul :clapping:

 

I used to put my code at the bottom of my web page and found I also got inaccurate results, I then moved it into the head of my webpae and found more pageviews/hits etc being recorded. So I would suggest putting it into the head. Sometimes for whatever reason I guess the page doesn't load fully or people don't stick around to wait for it to. So having the Analytics code load up first then it's going to record the visit.

 

DK :)

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.