Google Analytics question

Bed & Breakfast / Short Term Rental Host Forum

Help Support Bed & Breakfast / Short Term Rental Host Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.

Morticia

Well-known member
Joined
May 22, 2008
Messages
17,771
Reaction score
685
After all that talk about what guests will click on...Availability, Book Now, Calendar, etc, I made a change to a couple of top pages just to test which phrase works better. Well, lo and behold, GA doesn't track any links that go off site to show which links got clicked. Something I didn't realize before. Yes, it will show that the guest went off site and where they went but it doesn't show which link they clicked on the overlay.
Glad I didn't expend a lot of time making changes i can't track. (Some of my older off site links do have the GA code in them, most do not. None of them show on the overlay.)
Any hints on if I'm doing something wrong here or if this is just the way it is?
Of course I also realized after I tried to look at this data that I had no comparison data so I kicked myself for not testing this months ago.
 
Analytics can track outgoing links. You just need to set an extra bit of code up on the outgoing link.
http://www.google.com/support/googleanalytics/bin/answer.py?hl=en&answer=55527.
I did that a long time ago. None of those links that are still in there show either. Well, now I'm going to have to go root one up to prove it to myself.
.
Maybe you were using the wrong version of the code. (see the note in the page I linked to)
Also if you use that method you have to put the link to the analytics script up in the head rather than in the footer as is usually suggested.
 
Analytics can track outgoing links. You just need to set an extra bit of code up on the outgoing link.
http://www.google.com/support/googleanalytics/bin/answer.py?hl=en&answer=55527.
OK, that is NOT the same code I installed eons ago.
I have this and this isn't tracking:
Code:
onClick="javascript:urchinTracker('/outgoing/dining');"
yes, it will show that there are outgoing clicks to 'dining' but not
which link on my page got clicked. Does that make sense? So, are you
saying that if I use the 'page tracker' code it will show on the
overlay which link got clicked? I want it to show up on the overlay.
 
Analytics can track outgoing links. You just need to set an extra bit of code up on the outgoing link.
http://www.google.com/support/googleanalytics/bin/answer.py?hl=en&answer=55527.
I did that a long time ago. None of those links that are still in there show either. Well, now I'm going to have to go root one up to prove it to myself.
.
Maybe you were using the wrong version of the code. (see the note in the page I linked to)
Also if you use that method you have to put the link to the analytics script up in the head rather than in the footer as is usually suggested.
.
Arrrgh! Why does asking one simple question involve updating every single page on the website? So, I should put this new code in at the top and then put in the page tracker code anywhere I want to track which booking link gets clicked? And it will show up on the overlay. (Did I mention I want to see this visually on the overlay?
wink_smile.gif
)
 
Analytics can track outgoing links. You just need to set an extra bit of code up on the outgoing link.
http://www.google.com/support/googleanalytics/bin/answer.py?hl=en&answer=55527.
OK, that is NOT the same code I installed eons ago.
I have this and this isn't tracking:
Code:
onClick="javascript:urchinTracker('/outgoing/dining');"
yes, it will show that there are outgoing clicks to 'dining' but not
which link on my page got clicked. Does that make sense? So, are you
saying that if I use the 'page tracker' code it will show on the
overlay which link got clicked? I want it to show up on the overlay.
.
Oh that's an easy one. I do that all the time. Lets say you have two different links..both leading to the same place (your reservation system) but one is "book now" and the other is "reservation"
on the book now link put onClick="javascript: pageTracker._trackPageview('/outgoing/booknow');"
and on the reservation link put
onClick="javascript: pageTracker._trackPageview('/outgoing/reservation');"
Analytics doesn't care..or even know that both links are going to the same place. It just records the click associated with the fake path you tell it.
(again adjust these for whatever version of analytics you are using.)
After this is all set up, make two goals, one for /outgoing/reservation and one for /outgoing/booknow
 
Analytics can track outgoing links. You just need to set an extra bit of code up on the outgoing link.
http://www.google.com/support/googleanalytics/bin/answer.py?hl=en&answer=55527.
OK, that is NOT the same code I installed eons ago.
I have this and this isn't tracking:
Code:
onClick="javascript:urchinTracker('/outgoing/dining');"
yes, it will show that there are outgoing clicks to 'dining' but not
which link on my page got clicked. Does that make sense? So, are you
saying that if I use the 'page tracker' code it will show on the
overlay which link got clicked? I want it to show up on the overlay.
.
Oh that's an easy one. I do that all the time. Lets say you have two different links..both leading to the same place (your reservation system) but one is "book now" and the other is "reservation"
on the book now link put onClick="javascript: pageTracker._trackPageview('/outgoing/booknow');"
and on the reservation link put
onClick="javascript: pageTracker._trackPageview('/outgoing/reservation');"
Analytics doesn't care..or even know that both links are going to the same place. It just records the click associated with the fake path you tell it.
(again adjust these for whatever version of analytics you are using.)
After this is all set up, make two goals, one for /outgoing/reservation and one for /outgoing/booknow
.
So I can keep what I've got for code and just add those bits of code. But, to get them to show up on the overlay will require changing to the new code?
 
Analytics can track outgoing links. You just need to set an extra bit of code up on the outgoing link.
http://www.google.com/support/googleanalytics/bin/answer.py?hl=en&answer=55527.
OK, that is NOT the same code I installed eons ago.
I have this and this isn't tracking:
Code:
onClick="javascript:urchinTracker('/outgoing/dining');"
yes, it will show that there are outgoing clicks to 'dining' but not
which link on my page got clicked. Does that make sense? So, are you
saying that if I use the 'page tracker' code it will show on the
overlay which link got clicked? I want it to show up on the overlay.
.
Oh that's an easy one. I do that all the time. Lets say you have two different links..both leading to the same place (your reservation system) but one is "book now" and the other is "reservation"
on the book now link put onClick="javascript: pageTracker._trackPageview('/outgoing/booknow');"
and on the reservation link put
onClick="javascript: pageTracker._trackPageview('/outgoing/reservation');"
Analytics doesn't care..or even know that both links are going to the same place. It just records the click associated with the fake path you tell it.
(again adjust these for whatever version of analytics you are using.)
After this is all set up, make two goals, one for /outgoing/reservation and one for /outgoing/booknow
.
So I can keep what I've got for code and just add those bits of code. But, to get them to show up on the overlay will require changing to the new code?
.
Bree said:
So I can keep what I've got for code and just add those bits of code.
Errr...only because I am not sure what that means, I am going to answer "maybe"
confused_smile.gif

But, to get them to show up on the overlay will require changing to the new code?
When you have it tracking properly, the overlay will show it correctly regardless of which version of the code you are using. The only requirement is that the version of the outbound link code and the version of the analytics script have to match.
 
Analytics can track outgoing links. You just need to set an extra bit of code up on the outgoing link.
http://www.google.com/support/googleanalytics/bin/answer.py?hl=en&answer=55527.
OK, that is NOT the same code I installed eons ago.
I have this and this isn't tracking:
Code:
onClick="javascript:urchinTracker('/outgoing/dining');"
yes, it will show that there are outgoing clicks to 'dining' but not
which link on my page got clicked. Does that make sense? So, are you
saying that if I use the 'page tracker' code it will show on the
overlay which link got clicked? I want it to show up on the overlay.
.
Oh that's an easy one. I do that all the time. Lets say you have two different links..both leading to the same place (your reservation system) but one is "book now" and the other is "reservation"
on the book now link put onClick="javascript: pageTracker._trackPageview('/outgoing/booknow');"
and on the reservation link put
onClick="javascript: pageTracker._trackPageview('/outgoing/reservation');"
Analytics doesn't care..or even know that both links are going to the same place. It just records the click associated with the fake path you tell it.
(again adjust these for whatever version of analytics you are using.)
After this is all set up, make two goals, one for /outgoing/reservation and one for /outgoing/booknow
.
So I can keep what I've got for code and just add those bits of code. But, to get them to show up on the overlay will require changing to the new code?
.
Bree said:
So I can keep what I've got for code and just add those bits of code.
Errr...only because I am not sure what that means, I am going to answer "maybe"
confused_smile.gif

But, to get them to show up on the overlay will require changing to the new code?
When you have it tracking properly, the overlay will show it correctly regardless of which version of the code you are using. The only requirement is that the version of the outbound link code and the version of the analytics script have to match.
.
I really should not take NyQuil and then sit here typing...
What I have now is the old code for my outgoing links, the one that has 'UrchinTracker' in it, not the 'page tracker' that is on the help page you linked to. The Urchin is compatible with what I have for the GA script at the bottom of my page. However, that doesn't show on the overlay as everything is set up now. It does show me in the reports that those links were clicked. ie- the 'outgoing_dining' will show that someone clicked that link x number of times, but the link itself does not show on the overlay.
My confusion lies in that fact. The code is compatible as set up years ago. I'm thinking I have to change to the new code altogether.
Soooo, can I have 2 different codes running on different pages and not blow the whole GA reporting up? ie- I change out all my upper level pages and leave all the lower level pages as is. Will GA still report on all of the pages, some of the pages, none of the pages?
 
Analytics can track outgoing links. You just need to set an extra bit of code up on the outgoing link.
http://www.google.com/support/googleanalytics/bin/answer.py?hl=en&answer=55527.
OK, that is NOT the same code I installed eons ago.
I have this and this isn't tracking:
Code:
onClick="javascript:urchinTracker('/outgoing/dining');"
yes, it will show that there are outgoing clicks to 'dining' but not
which link on my page got clicked. Does that make sense? So, are you
saying that if I use the 'page tracker' code it will show on the
overlay which link got clicked? I want it to show up on the overlay.
.
Oh that's an easy one. I do that all the time. Lets say you have two different links..both leading to the same place (your reservation system) but one is "book now" and the other is "reservation"
on the book now link put onClick="javascript: pageTracker._trackPageview('/outgoing/booknow');"
and on the reservation link put
onClick="javascript: pageTracker._trackPageview('/outgoing/reservation');"
Analytics doesn't care..or even know that both links are going to the same place. It just records the click associated with the fake path you tell it.
(again adjust these for whatever version of analytics you are using.)
After this is all set up, make two goals, one for /outgoing/reservation and one for /outgoing/booknow
.
So I can keep what I've got for code and just add those bits of code. But, to get them to show up on the overlay will require changing to the new code?
.
Bree said:
So I can keep what I've got for code and just add those bits of code.
Errr...only because I am not sure what that means, I am going to answer "maybe"
confused_smile.gif

But, to get them to show up on the overlay will require changing to the new code?
When you have it tracking properly, the overlay will show it correctly regardless of which version of the code you are using. The only requirement is that the version of the outbound link code and the version of the analytics script have to match.
.
I really should not take NyQuil and then sit here typing...
What I have now is the old code for my outgoing links, the one that has 'UrchinTracker' in it, not the 'page tracker' that is on the help page you linked to. The Urchin is compatible with what I have for the GA script at the bottom of my page. However, that doesn't show on the overlay as everything is set up now. It does show me in the reports that those links were clicked. ie- the 'outgoing_dining' will show that someone clicked that link x number of times, but the link itself does not show on the overlay.
My confusion lies in that fact. The code is compatible as set up years ago. I'm thinking I have to change to the new code altogether.
Soooo, can I have 2 different codes running on different pages and not blow the whole GA reporting up? ie- I change out all my upper level pages and leave all the lower level pages as is. Will GA still report on all of the pages, some of the pages, none of the pages?
.
Hmmm I just took a look at some of my sites using the legacy code and others using the newer code. Neither of them display the traffic to the outbound links using the overlay. The clicks are recorded and goals tracked, but apparently neither are tied into the overlay feature.
I tend not to use the overlay feature as it is gives misleading info. (its cute to view it but you have to understand its limitations) For internal links, If you have two links on a page to the same place, it will show the same value for both links. It can't differentiate which one was clicked on and which wasn't.
Goals will give you a much more accurate view of the numbers...just without the pretty overlay ;)
Sorry, I've never tried running both legacy and new code on the same site, so I can't say whether it will work or not.
 
Analytics can track outgoing links. You just need to set an extra bit of code up on the outgoing link.
http://www.google.com/support/googleanalytics/bin/answer.py?hl=en&answer=55527.
OK, that is NOT the same code I installed eons ago.
I have this and this isn't tracking:
Code:
onClick="javascript:urchinTracker('/outgoing/dining');"
yes, it will show that there are outgoing clicks to 'dining' but not
which link on my page got clicked. Does that make sense? So, are you
saying that if I use the 'page tracker' code it will show on the
overlay which link got clicked? I want it to show up on the overlay.
.
Oh that's an easy one. I do that all the time. Lets say you have two different links..both leading to the same place (your reservation system) but one is "book now" and the other is "reservation"
on the book now link put onClick="javascript: pageTracker._trackPageview('/outgoing/booknow');"
and on the reservation link put
onClick="javascript: pageTracker._trackPageview('/outgoing/reservation');"
Analytics doesn't care..or even know that both links are going to the same place. It just records the click associated with the fake path you tell it.
(again adjust these for whatever version of analytics you are using.)
After this is all set up, make two goals, one for /outgoing/reservation and one for /outgoing/booknow
.
So I can keep what I've got for code and just add those bits of code. But, to get them to show up on the overlay will require changing to the new code?
.
Bree said:
So I can keep what I've got for code and just add those bits of code.
Errr...only because I am not sure what that means, I am going to answer "maybe"
confused_smile.gif

But, to get them to show up on the overlay will require changing to the new code?
When you have it tracking properly, the overlay will show it correctly regardless of which version of the code you are using. The only requirement is that the version of the outbound link code and the version of the analytics script have to match.
.
I really should not take NyQuil and then sit here typing...
What I have now is the old code for my outgoing links, the one that has 'UrchinTracker' in it, not the 'page tracker' that is on the help page you linked to. The Urchin is compatible with what I have for the GA script at the bottom of my page. However, that doesn't show on the overlay as everything is set up now. It does show me in the reports that those links were clicked. ie- the 'outgoing_dining' will show that someone clicked that link x number of times, but the link itself does not show on the overlay.
My confusion lies in that fact. The code is compatible as set up years ago. I'm thinking I have to change to the new code altogether.
Soooo, can I have 2 different codes running on different pages and not blow the whole GA reporting up? ie- I change out all my upper level pages and leave all the lower level pages as is. Will GA still report on all of the pages, some of the pages, none of the pages?
.
Hmmm I just took a look at some of my sites using the legacy code and others using the newer code. Neither of them display the traffic to the outbound links using the overlay. The clicks are recorded and goals tracked, but apparently neither are tied into the overlay feature.
I tend not to use the overlay feature as it is gives misleading info. (its cute to view it but you have to understand its limitations) For internal links, If you have two links on a page to the same place, it will show the same value for both links. It can't differentiate which one was clicked on and which wasn't.
Goals will give you a much more accurate view of the numbers...just without the pretty overlay ;)
Sorry, I've never tried running both legacy and new code on the same site, so I can't say whether it will work or not.
.
I did notice that all of the identical links had the same %'s on them. So, yeah, it would not have worked. But, what you're saying is that I CAN set up each 'booking' link to have a different parameter and then track that as a goal, correct? ie- outgoing_booknow vs outgoing_availability.
But, I think I'm already tweaking it to the advantage of 'book now' because that is at the top of the page. No one ever gets to the bottom of the page, right?
wink_smile.gif

BUT, a good one to try would be which ROOM gets the clicks!
I do know guests get to the bottom of some very long pages because I have an outgoing link to another B&B and they tell me they get referrals in their stats from me.
 
Analytics can track outgoing links. You just need to set an extra bit of code up on the outgoing link.
http://www.google.com/support/googleanalytics/bin/answer.py?hl=en&answer=55527.
OK, that is NOT the same code I installed eons ago.
I have this and this isn't tracking:
Code:
onClick="javascript:urchinTracker('/outgoing/dining');"
yes, it will show that there are outgoing clicks to 'dining' but not
which link on my page got clicked. Does that make sense? So, are you
saying that if I use the 'page tracker' code it will show on the
overlay which link got clicked? I want it to show up on the overlay.
.
Oh that's an easy one. I do that all the time. Lets say you have two different links..both leading to the same place (your reservation system) but one is "book now" and the other is "reservation"
on the book now link put onClick="javascript: pageTracker._trackPageview('/outgoing/booknow');"
and on the reservation link put
onClick="javascript: pageTracker._trackPageview('/outgoing/reservation');"
Analytics doesn't care..or even know that both links are going to the same place. It just records the click associated with the fake path you tell it.
(again adjust these for whatever version of analytics you are using.)
After this is all set up, make two goals, one for /outgoing/reservation and one for /outgoing/booknow
.
So I can keep what I've got for code and just add those bits of code. But, to get them to show up on the overlay will require changing to the new code?
.
Bree said:
So I can keep what I've got for code and just add those bits of code.
Errr...only because I am not sure what that means, I am going to answer "maybe"
confused_smile.gif

But, to get them to show up on the overlay will require changing to the new code?
When you have it tracking properly, the overlay will show it correctly regardless of which version of the code you are using. The only requirement is that the version of the outbound link code and the version of the analytics script have to match.
.
I really should not take NyQuil and then sit here typing...
What I have now is the old code for my outgoing links, the one that has 'UrchinTracker' in it, not the 'page tracker' that is on the help page you linked to. The Urchin is compatible with what I have for the GA script at the bottom of my page. However, that doesn't show on the overlay as everything is set up now. It does show me in the reports that those links were clicked. ie- the 'outgoing_dining' will show that someone clicked that link x number of times, but the link itself does not show on the overlay.
My confusion lies in that fact. The code is compatible as set up years ago. I'm thinking I have to change to the new code altogether.
Soooo, can I have 2 different codes running on different pages and not blow the whole GA reporting up? ie- I change out all my upper level pages and leave all the lower level pages as is. Will GA still report on all of the pages, some of the pages, none of the pages?
.
Hmmm I just took a look at some of my sites using the legacy code and others using the newer code. Neither of them display the traffic to the outbound links using the overlay. The clicks are recorded and goals tracked, but apparently neither are tied into the overlay feature.
I tend not to use the overlay feature as it is gives misleading info. (its cute to view it but you have to understand its limitations) For internal links, If you have two links on a page to the same place, it will show the same value for both links. It can't differentiate which one was clicked on and which wasn't.
Goals will give you a much more accurate view of the numbers...just without the pretty overlay ;)
Sorry, I've never tried running both legacy and new code on the same site, so I can't say whether it will work or not.
.
I did notice that all of the identical links had the same %'s on them. So, yeah, it would not have worked. But, what you're saying is that I CAN set up each 'booking' link to have a different parameter and then track that as a goal, correct? ie- outgoing_booknow vs outgoing_availability.
But, I think I'm already tweaking it to the advantage of 'book now' because that is at the top of the page. No one ever gets to the bottom of the page, right?
wink_smile.gif

BUT, a good one to try would be which ROOM gets the clicks!
I do know guests get to the bottom of some very long pages because I have an outgoing link to another B&B and they tell me they get referrals in their stats from me.
.
But, what you're saying is that I CAN set up each 'booking' link to have a different parameter and then track that as a goal, correct? ie- outgoing_booknow vs outgoing_availability.
Yes 100% sure on that one.
 
I am trying to put GA on a site for a client. When I ran the "verify html" feature on my program it told me that <script> is not allowed in <html> elements. But I copied the code directly from the GA site. What exactly does that mean?
 
I am trying to put GA on a site for a client. When I ran the "verify html" feature on my program it told me that <script> is not allowed in <html> elements. But I copied the code directly from the GA site. What exactly does that mean?.
penelope said:
I am trying to put GA on a site for a client. When I ran the "verify html" feature on my program it told me that <script> is not allowed in <html> elements. But I copied the code directly from the GA site. What exactly does that mean?
Perhaps you installed it in the wrong place in the code? I did that and got no results, which is how I eventually figured out what was wrong. Altho I don't think I figured it out!
 
I am trying to put GA on a site for a client. When I ran the "verify html" feature on my program it told me that <script> is not allowed in <html> elements. But I copied the code directly from the GA site. What exactly does that mean?.
penelope said:
I am trying to put GA on a site for a client. When I ran the "verify html" feature on my program it told me that <script> is not allowed in <html> elements. But I copied the code directly from the GA site. What exactly does that mean?
Perhaps you installed it in the wrong place in the code? I did that and got no results, which is how I eventually figured out what was wrong. Altho I don't think I figured it out!
.
Phooey. Well, back to the drawing board.
 
I am trying to put GA on a site for a client. When I ran the "verify html" feature on my program it told me that <script> is not allowed in <html> elements. But I copied the code directly from the GA site. What exactly does that mean?.
penelope said:
I am trying to put GA on a site for a client. When I ran the "verify html" feature on my program it told me that <script> is not allowed in <html> elements. But I copied the code directly from the GA site. What exactly does that mean?
Perhaps you installed it in the wrong place in the code? I did that and got no results, which is how I eventually figured out what was wrong. Altho I don't think I figured it out!
.
Phooey. Well, back to the drawing board.
.
Without revealing who you are doing this work for, cut and paste the section where you installed the code so we can see where it is. Also, GA has the specific location the code must go in the 'web developer' section of their online help.
 
I am trying to put GA on a site for a client. When I ran the "verify html" feature on my program it told me that <script> is not allowed in <html> elements. But I copied the code directly from the GA site. What exactly does that mean?.
Google analytics code is a javascript and while typically some validation protocols say that javascripts should only appear in the <head> they are allowed in the <body> as well.
It may mess up validation of surrounding elements too. Example if you have something like <p> blah blah <script>somescript</script> </p> The validator may squawk and tell you that the tag is being closed that was not open. That is one of those errors that is usually safe to ignore. It is more a limitation of the validator than a problem with the code.
 
Okay, here is the watered down version:
</head>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "
https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-9194810-1");
pageTracker._trackPageview();
} catch(err) {}</script>

Here is my error message on the verification:
<script> is not allowed in <html> elements.
It is referring to lines 2 and 7
 
Okay, here is the watered down version:
</head>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "
https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-9194810-1");
pageTracker._trackPageview();
} catch(err) {}</script>

Here is my error message on the verification:
<script> is not allowed in <html> elements.
It is referring to lines 2 and 7.
Move the scripts up to come before the </head> and you you'll be fine.
 
Back
Top