Book corrections and typos
Google Analytics specific May 26th, 2008Many thanks to those who have provided feedback on the book so far. A couple of typo’s have slipped by me, so I wanted to post them here immediately. Please add if you find more. I will create a separate corrections page if needed.
- page 180, Differentiating Regional Search Engines:
The placement of this code has had to change due to recent updates in the GATC. See the following post: http://www.advanced-web-metrics.com/blog/2008/09/14/customising-the-list-of-search-engines-in-google-analytics/
- page 181/182:
The code pageTracker._addOrganic("images.google", "prev"); should be placed just before the line pageTracker._initData(); – Not after, as mentioned on page 178 (grey box, positioning of GATC hacks).
pageTracker._addOrganic("images.google", "prev"); pageTracker._initData();
- page 191, point a (referring to Figure 9.8a):
---The regular expression pattern should be: (?|&)(q|p)=([^&]*) as shown in Figure 9.8a. Note the change in position of *
Thanks to Bart Geerling, of Google Amsterdam for these two.
Related posts:






May 30th, 2008 at 10:53 pm
Page 205: 6th line of your Modified GATC code has a closed script tag. It should be removed since the script doesn’t end there!
June 2nd, 2008 at 10:19 am
Thanks Larry. You are of course correct.
June 2nd, 2008 at 9:51 pm
line 34- var pageTracker = _gat._getTracker(”UA-XXXXXX-X”)
is giving me an error “_gat is not defined” am I doing something wrong or is this an error in the code?
Yes I replaced the UA-XXXXXX-X with my GA account number.
Thanks,
-Lary
June 4th, 2008 at 4:22 pm
p. 51 figure 4.2 f) and g) in the diagram do not match f) and g) in the descriptions or discussion on p. 53.
p. 78 paragraph 2, line 6 “visitors not viewing the blog area spend spend slightly less time on the site(-20.45%” refers to figure 5.14 next page. This should be “less time on the page”.
Thanks for a great book.
Rita
June 4th, 2008 at 4:38 pm
Brian,
The first referrer code on page 205 is still not working. What is the deal here? Can you give us a working example somewher?
-Lary
June 8th, 2008 at 6:09 pm
Thanks Rita
Lary: I have been testing the script and saw the same error as you. I couldn’t understand why this was, so I simply modified the ’structure’ to remove the error and it now works.
Essentially I just grouped the js code into 3 script tags. The file is listed in: http://www.advanced-web-metrics.com/blog/ga-scripts/
Let me know if you get it working.
June 19th, 2008 at 2:14 pm
Hi there,
I am wondering about a detail of a graph in your book “advanced webmetrics”. On page 5 there is shown how to divide visitors in “bounced” and “nonbounced”. The “nonbounced” are divided into “conversions” and “abandoned” and there is some space left free. (the letters “oned” from abandoned are in that area) Is this accidently or has this space a name?
Thank you for help
June 21st, 2008 at 5:07 pm
Scatterplot: The space doesn’t have a name as this represents visitors who left the site. I agree its not clear with the word “abandoned” overlapping the boundary.
Abandoned in this chart represents those visitors that entered the conversion funnel but did not complete.
HTH. Brian
July 9th, 2008 at 7:28 am
I was wondering why the regexp is written with 3 groups?
You are only referencing one, the third ($A3). So to be more clear it should be written as [\?|&][q|p]=([^&]*) and the the $A3, should be changed to $A1 or am i missing something ?
July 10th, 2008 at 7:40 pm
Hi Brian,
Thanks for the wonderful book – a terrific job!
In page 131
pageTracker._setCampNameKey(”orig_campaign”); // default: utm_medium
I think you meant (default: utm_campaign)
pageTracker._setCampNameKey(”orig_campaign”); // default: utm_campaign
Thank you,
Allaedin
July 11th, 2008 at 2:23 pm
Mad.Photo.World:
Yes, yours will work just as good.
Allaedin: Thanks for the feedback. Well spotted for page 131. You are correct – the joys of cut&paste…
September 5th, 2008 at 5:33 pm
Dear Brian,
As most of the people have mentioned above, THANK YOU for this very useful book on GA. We were very excited with the sub-chapter on event tracking (noted in the book to be in BETA). When trying to implement the recommended technique in the book, we can’t seem to find some of what you speak of in GA. Have they discontinued event tracking? Are we missing something obvious? We did click to edit our profile and “enable” event tracking but this isn’t an option anywhere. We are using the new GA.
Thanks in advance if you have some insight!
–
Ziv
September 7th, 2008 at 3:35 pm
Ziv: Many thanks for the feedback.
At the time of writing the Event Tracking feature was in closed beta. It was expected that this would be available some time in Q2 but unfortunately it still hasn’t made it. Essentially I jumped the gun!
The feature will be released, however I am unable to say when. Fingers crossed its this year…
October 4th, 2008 at 1:10 am
Brian,
I’m trying to use your code on page 185 for Sessionizing Visitor Labels, but I’m just getting a load of javascript errors about not being able to find _udh or _uES and other variables.
Is there something that I should be doing to define these variables that isn’t clear in the book or has ga.js moved the goalpost and isn’t defining them any more?
Thank you
Alex
October 17th, 2008 at 6:58 pm
On page 121 (Using a Third-Party Payment Gateway) it shows two lines in the code as bold as follows …
pageTracker._setDomainName(“none”);
pageTracker._setAllowLinker(true);
I’m in the process of installing GA for just that purpose, took the basic GA code but noticed that it didn’t have the following line in it as shown in the book:
pageTracker._initData();
Does this mean that the line in the book should also be bold as it’s supposed to be added into the GA code as well as the other two lines in bold within the book?
Fantastic book – a real eye opener. Also thick enough to beat clients over the head when they STILL don’t get it that they need to strengthen their websites even after seeing statistical evidence!
October 19th, 2008 at 8:18 pm
Andy: The _initData(); call is now deprecated in the GATC so you don’t need to include this any more
November 17th, 2008 at 4:12 pm
Brian – are there any plans to update the book with the newly released Advanced Segments and Custom Reports?
November 18th, 2008 at 4:13 pm
Alex – it shoud be written in one continuous line:
document.cookie = “__utmv=”+_udh+”.”+_uES(labelVal)+”;path=”+_utcp+”; expires=”+date.toGMTString()+”;”+udo;
November 18th, 2008 at 5:10 pm
Emiel – yes, spot on and many thanks to both of you for the heads up. There should be a continuation arrow in the book (as per the code at the top of page 185). This is now oon my list
Anthony – yes, in fact I just discussed with the publisher last week. However, the time line is likely to be mid-2009. Essentially the new features (including Advanced Segments, API, Custom Reporting, Motion Charts) need to be fully released so I can build some real world examples. If you have any Advanced Segments who would like to share, please contact me directly.
January 7th, 2009 at 9:06 pm
Enjoying your book. Page 136(event tracking) includes a deprecated function”_createEventTracker”, I’d be happy to read how to do this. Note: This affects bounce rate(due to page load event.
January 8th, 2009 at 9:15 pm
Bill: Yes you are correct. When I wrote the Event Tracker section (Dec 07), it was still in beta and the exact syntax has changed.
Its not too dramatic though – just ignore the object creation in the GATC of page 132 and insert the Category name in the call to the _trackEvent function.
Essentially this is the same thing, as the object declaration is now handled within the _trackEvent function itself. Basically, now it is even easier to implement.
More details can be found at: http://code.google.com/apis/analytics/docs/eventTrackerGuide.html
BTW, if you use the syntax described in the book, event tracking still works in the same way.
March 13th, 2009 at 12:02 pm
To: * page 191, point a (referring to Figure 9.8a):
The regular expression pattern should be: (?|&)(q|p)=([^&]*) as shown in Figure 9.8a. Note the change in position of *
(?|&)(q|p)=([^&]*) is invalid regular expression
!
Regular expression pattern should be: (\?|&)(q|p)=([^&]*)
March 14th, 2009 at 2:28 am
Scott, really interested in the first/last referrer script starting on page 205. I grabbed the updated version from the site, but still can’t get it to work. It is not setting the variable. It looks as though the first check to see if it is a new visitor is not functioning, wondering if it is because pageTracker._initData(); is no longer necessary.
If I take out the if statement on the new visitor I can get the variable to set, but of course it simply resets upon the next visit since the new visitor function is no longer being called.
March 14th, 2009 at 6:24 pm
Mikhail: well spotted – I have started introducing typos into my typo corrections! the first / is in the book version and I have added to the original post.
Jennifer: Not sure who you are referring to (Scott!), but the removal of initData() call will have no effect. I am running this script on several sites without problems, so I would check your implementation – particularly ensuring javascript lines stay intact i.e. do not line wrap and standard quotes have not been converted into smart quotes. Also checkout:
http://www.Advanced-Web-Metrics.com/blog/2008/10/13/troubleshooting-tools-for-web-analytics/
March 30th, 2009 at 2:27 pm
Have only just started going through this book (very interesting, thanks).
I’m sure I am nitpicking but on your table of economic effects (page 8 – table 1.2) you mention that ‘non-marketing costs’ is ‘non-marketing profit margin’ times ‘total revenue’ but the actual calculation (as you did on your download) is the inverse of that. (1 – ‘non-marketing profit margin’) times ‘total revenue’.
March 31st, 2009 at 3:09 pm
Alex: Thanks – the download is correct and will be reflected in the second edition of the book.