Oli Gardner
posted this on October 21, 2010 04:44 pm
Many of our customers want to track their Unbounce-hosted landing pages as part of their overall funnel. You will need to set up modified Goggle Analytics scripts on your website as well as on your landing pages.
This section of the Google Analytics instructions deals specifically with tracking your primary domain and subdomains.
To provide some insight into how your final script might look, here's how the version we use at Unbounce looks:
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-XXXXXXXX-1']);
_gaq.push(['_setDomainName', '.unbounce.com']);
_gaq.push(['_setAllowHash', false]);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
This resides on our website and is also inserted into the HEAD section of each of our landing pages. Instructions for adding the script to your landing page can be found here.
Comments
Thanks for posting this. This topic is very, very important, from my vantage. The whole point of testing landing pages is to use intelligence to optimize the website for better results. This requires eventually reviewing the funnel. Therefore, Unbounce, with its subdomain approach, must be incorporated into the Google Analytics sales funnel.
Reading above that this is not easy to do is not a good thing. Unbounce should, in my opinion, be making the sales funnel as easy as possible for customers to implement, and then they should promote this is possible.
I wish I had looked here first - spent most of yesterday piecing this together from Google Analytics site, but this is a much clearer explanation. Thanks :)
Is this info still valid if I'm using the asynchronous tracking method? I'm really confused.
Hi Wes, Yes this is the code for the asynchronous method (not Urchin). If you have any specific problems getting set up - your best bet would be to email support@unbounce.com - or you add your comment to our GetSatisfaction page (which is handled by the Unbounce developers).
Is there an easy way to setup goals for Google Analytics on the unbounce landing page?
Hello Brian
If I understand your question correctly this should just be a matter of dropping your GA script into your Unbounce page in the normal way, then specifying your goals on the GA end of things.
This thread deals with how set-up GA for subdomains. There is some more general info on how to implement GA elsewhere in the knowledgebase here:
http://support.unbounce.com/entries/307637-how-do-i-add-google-anal...
If this hasn't adequately answered your question for you, please drop an email to support@unbounce.com and we will do our best to help you out further.
JM
Hello Oli,
Any reason you have the _gaq.push(['_setAllowHash', false]);. GA doesn't generate this for me and there seem to be some discussion out there whether there is value in using it or not.
Tks, Hervé
Since the goal page is a jquery page how do I setup the goal inside google analytics?
Here my choices:
Hello Louis - the goal page is actually its own landing page and does have its own URL. If you visit our Google Analytics set up article and scroll down to the comment section, there is some information on how to find the URL of your thank you confirmation dialog.
Do you support Multiple Top Level Domains? IE www.domain.com and www.domainxyx.com ?
The link above no longer works.