Unbounce Answers/Next Steps/Analytics, Stats & Conversions

Google Analytics for a subdomain

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

User photo
Stu Levin

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.

December 12, 2010 04:17 am
User photo
Tim Burgess

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 :)

March 03, 2011 02:57 pm
User photo
Wes Wilson

Is this info still valid if I'm using the asynchronous tracking method? I'm really confused.

March 15, 2011 10:48 am
User photo
Oli Gardner
Unbounce

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).

March 15, 2011 11:11 am
User photo
Brian Heying

Is there an easy way to setup goals for Google Analytics on the unbounce landing page?

March 22, 2011 05:32 am
User photo
Jason Murphy
Unbounce

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

March 22, 2011 03:59 pm
User photo
Herve Humbert

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é

June 05, 2011 11:25 pm
User photo
louis cleroux

Since the goal page is a jquery page how do I setup the goal inside google analytics?

 

Here my choices:

URL Destination
Time On Site
Page/Visit
Event
My logic told me to go with URL destination but the goal page doesn't have one so what's the solution?
February 16, 2012 06:25 pm
User photo
Ryan Engley
Unbounce

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.

May 08, 2012 04:26 pm
User photo
Andrew Ellis

Do you support Multiple Top Level Domains?   IE www.domain.com and www.domainxyx.com ?

June 25, 2012 05:31 pm
User photo
Brian Hansford

The link above no longer works. 

September 26, 2012 02:23 pm