|
How can I add Google Analytics to my web site?I keep hearing from you and others that I really need to be tracking how people use my Web site and that I should be collecting "aggregate traffic statistics" and such. I've heard that Google Analytics is good - and the price, free, is great - but I'm not really clear how to use it and add it to my site. Can you please step me through the process, Dave? Thanks! You have received good advice! Regardless of the level of complexity of your Web site, whether it's a huge blog with thousands of articles - as mine is - or a five page brochureware billboard for your service business, it's critically important and darn useful to be able to know how many people are visiting your site, from where, how, and what they do once they're on the site. As a simple example, let's say that you offer three different services through your company and you have three pages on your little Web site that highlights those, one per page. Which gets more traffic? What can you conclude about the appeal of your business based on that? Which of those converts into the potential customer picking up the phone and calling you or clicking on "contact us" and emailing in a query? Without feedback you're in the dark. With feedback you can continually refine your pages and your business both, growing smart and effective. Google Analytics is a bit tricky to set up too, so I'm not surprised you've a bit of trepidation about doing so. It involves copying and pasting some pretty complicated code. The good news, though, is that you don't need to understand the HTML and JavaScript you cut and paste, you just need to not mess it up! Start by going to Google Analytics and either signing up for a new account or signing in to your Google account. The button you seek is this: ![]() Once you've signed up you'll see an overview page which won't be very exciting since you don't have any collected data as of yet. On the right you'll see this, however: ![]() Click on the "+ Add new profile" link and you'll be able to specify the URL of your site: ![]() Here you can see that I'm actually stepping through the process of adding the analytics code to my film blog, Dave On Film. Confusingly, the system then gives you an error message that there's no data to show: Well, duh, there's no data because we just set up this account. You'd think Google would be a bit smarter about this step of the process! Scroll down a bit on this page and you'll see the following: All you need to do now is basically copy and paste the complicated-looking HTML code that's in the box. Click anywhere in the box, which should select all of the content. Now type Ctrl-C, or Cmd-C or choose File --> Copy (depending on PC or Mac). Open up another browser window or a new tab and get to the source code for your own Web pages. If you have a blog, you're in luck: just open up the appropriate template or templates so you can access the skeletal contents of the site. Move to the bottom of the source page and before any sort of </body> or </html> simply paste the block of code from Google Analytics. Save the new pages, rebuild your blog if appropriate. If you have a site where you're managing the pages manually, then you want to paste the analytics code onto every single page you'd like it to track and analyze for you. If you skip some, it won't know about them and your reporting data could be skewed. Now that you're done adding the code, refresh the page on Google Analytics and instead of getting the earlier error, you should see this: Great. Now it's just a matter of sitting back and relaxing, waiting for some traffic to show up so you'll have analytic data. In the meantime, this is what it'll look like: ![]() Remember that unlike many other services, Google Analytics is not real time, so if you reload a page, don't expect to instantly see that traffic reflected in your reports. Generally I find that analytics is about 12 hours behind. Now your challenge is to drive traffic to your site and to remember to at least occasionally go and look at the Google Analytics data!
Categorized:
CGI Scripts and Web Site Programming
,
HTML and CSS
(Article 8910,
Written by Dave Taylor)
Tagged: blogging, film blog, google analytics, web site traffic Previous: How do I erase and reformat an Apple Time Capsule? Next: How do I display filename suffixes in Windows Vista? Subscribe!
I'm glad this came up because I have a couple of follow-up questions (I already have Analytics on my company's 1-year "new" website): Thanks for the tip, Dave. That made it easy. I'll try it out. Posted by: Eric Savage at June 11, 2009 9:59 PMYou can actually change the date range in the URL so that the current day's data is included in some (maybe all) of the analytics reports. Sitemeter is good for instant gratification. Posted by: Kosmo @ The Casual Observer at June 17, 2009 3:10 PMThank you. I'm going to try this. Posted by: Val Reimer at October 23, 2009 10:37 PMThanks, Dave. You saved me once again! Posted by: Jeannine C at April 22, 2010 10:14 AMHi Dave, Just a quick one do google provide support for google analytics, in case they do ( are they charging for the same)??? Posted by: pamsy at May 13, 2010 12:54 AMExcellent information. But Now days Google Analytical advise add Code in between Head Section. Posted by: Vincent at June 16, 2010 4:26 AM oh! Many thanks to you !!!! This a very good information to all. I am adding Google Analytics tool to day. Thankyou. Posted by: Vidaso Valee at July 22, 2010 1:29 PMHi Dave, A wonderfull, very simple explanation about tracking email/HTML campaign. I was struggling to understand how it works. Now am very much clear. I have few questions and i would appreciate if you answer these for me 1) In the article it is mentioned google analytics code to be copied and pasted in the template(s)(service providing). How do I generate the new url for each services as I will be using the same template for displaying different services? 2) Is the procedure for google analytics tracking on social media campaigns (facebook, twitter etc) same as email campaign? Like generate code in GA, copy and paste in the templates etc. 3) Is there any way where I can track my SMS campaign also? 4) As I am planning implement all the three in my application, do I need to create three different GA accounts? If you could give me your mail id, I would like to discuss more on this. If you dont mind. Thanks in Advance first of all very good tutorial and secondly i want to show this information on my own webiste how can i do this. i dont want to go google analytics account. is there any way to do this? Posted by: shani at January 7, 2011 8:43 AMhi, i am desperately trying to add google analytics to this iweb site. I am really struggling, I have an Analytics profile and can copy the code it gives me but don't know how to successfully attach it to my site. i have tried snippets with iweb and the iweb seo tool. is this just not possible or advisable? Helen. Posted by: Helen at February 28, 2011 11:50 AMIt Allows usage of custom variables in Google Analytics to track meta data on pages. Thanks for your support will try soon. Posted by: Avenir at April 28, 2011 4:56 AMI have something to say, now that you mention it, but ...
I do have a comment, now that you mention it!
|
Recommended
Recent Entries
Search
I Need Help!
Apple iPad Help
Articles and Reviews Auctions and Online Shopping Blogs and RSS Feeds Building Web Site Traffic Business and Management CGI Scripts and Web Site Programming Computer and Internet Basics d) None of the Above Facebook Help Google Plus Help HTML and CSS Industry News and Trade Shows iPhone and Cell Phone Help iPod, Sony PSP and MP3 Player Help Mac OS X Help Pay Per Click (PPC) Advertising Search Engine Optimization (SEO) Shell Script Programming Tech Support Video Help The Writing Business Twitter, LinkedIn and Social Network Help Unix and Linux Help Video Game Tips and Help Windows PC Help WordPress Help |