Unbounce Answers/Integrations/Google Analytics

Integrating with Google Analytics [VIDEO]

Oli Gardner
posted this on October 21, 2010 04:33 PM

The following video and article will teach you everything you need to know to embed Google Analytics tracking into your Unbounce landing pages.

 

What You Will Need

  • A Google Analytics Account
  • An Unbounce Account

 

  Embedding the Google Analytics Tracking Code

  1. Log in to your Google Analytics account
  2. Click the Admin button in the Google Analytics toolbar
  3. Select the Account you're working with
  4. Select the Property (site) you're working with
  5. Click  Tracking Info
  6. Enable Subdomain tracking and click Save (only necessary in classic Google Analytics - Universal Analytics does not require subdomain tracking)
  7. Select and copy the tracking code then return to Unbounce
  8. Paste the tracking code into your landing page's Javascript library (Select 'Head' for placement)
  9. If using a Form Confirmation Dialog, paste the tracking code into your confirmation dialog as well
  10. Save and republish your page

That's it!

Google Analytics will then begin tracking metrics for your landing pages. Note: Google can take up to 48 hours to start showing results within the Analytics dashboard.

Next Steps

Event Tracking

To enable event tracking in Unbounce, follow these steps.

 

Customizing Your Reports

Since the data collected from this integration is handled within your Google Analytics account, check Google's site for information on building customized reports.

 

Comments

User photo
Adam Riggs-Zeigen

A little confused on this:  You're recommending that it be placed "Before body end tag" but Google recommends placing within the <head> block and I notice that is an option in the drop down.  Why would Google recommend one thing and you guys another?

Thanks,

Adam

February 17, 2011 09:28 AM
User photo
Oli Gardner
Unbounce

Sorry Adam, that's an error. You should place it in the head as per Google and our first set of instructions at the top (for the Asynchronous method). We'll get this updated.

February 17, 2011 03:18 PM
User photo
Adam Riggs-Zeigen

Cool thanks for the quick feedback

February 17, 2011 04:06 PM
User photo
Wes Wilson

Just some feedback: If I'm using Google Analytics, chances are I'm using them on ALL variants, and perhaps ALL campaigns. It'd be so much nicer if I could add it on an account or campaign level, instead of having to do this for EACH page.

March 15, 2011 11:13 AM
User photo
Oli Gardner
Unbounce

Thanks for the feedback Wes. That's been a fairly common comment, so we'll definitely be considering it for a future update.

March 15, 2011 11:14 AM
User photo
Michelle Montgomery

Oli, do I need to change my analytics settings from "A single domain (default)"  to "One domain with multiple subdomains" ?  The top graphic shows a script that is set for the multiple subdomains.  thanks!

April 10, 2011 08:12 PM
User photo
Oli Gardner
Unbounce
April 11, 2011 09:43 AM
User photo
Jeff Weiss

Will adding Google analytics override the Unbounce conversion rate chart, or will they work in tandem?


April 29, 2011 08:00 AM
User photo
Oli Gardner
Unbounce

Hi Jeff - they will both work in tandem.

April 29, 2011 01:21 PM
User photo
Jared Chung

Will GA be able to distinguish between variants? Will GA just be showing me the average results for all variants at a single URL or will I be able to distinguish between the performance of each variants through GA?

August 02, 2011 10:37 AM
User photo
Carl Schmidt
Unbounce

Hi Jared!  Sorry we don't have a complete guide for customizing GA for use with Unbounce, that's definitely something we want to get around to.  If you want to track individual variants, you can customize your GA code, specifically the 'trackPageview' method, to include the variant information in the opt_pageURL parameter.  So, if you're using the async GA code, perhaps something like:

_gaq.push(['_trackPageview', '/my-unbounce-page/variant']);

The specific format will depend on how you're using GA and how you'd like your reporting to work.  Hope that helps!

September 21, 2011 11:07 AM
User photo
Fred Perrotta

Since the lead-gen landing pages have a pop-up "Thank You" message and do not redirect to a different page, how do you set up Goals in Google Analytics?

September 27, 2011 03:46 PM
User photo
Oli Gardner
Unbounce

Hi Fred,

If you click on the form (not the button) you'll be able to choose where to go next (you can redirect to a different URL if you like) - just set it in the dropdown in the right-hand panel. This will let you set up a path of pages for your GA goals.

September 27, 2011 04:00 PM
User photo
Carl Schmidt
Unbounce

Hey Fred, I should add that the "Thank You" message is served up as a separate URL.  Just right-click and "View Frame Information" to see the URL that is requested.  You can either use that as your goal, or you can customize the GA script you embed on the form confirmation page...

September 29, 2011 11:38 AM
User photo
Owen McGab Enaohwo

How do I push to Google Analytics when someone clicks on a button in unbounce?

January 11, 2012 11:26 AM
User photo
Slan Dizier

Hi Owen,

Here are a couple steps you can take to track button clicks using Google Analytics.

1. You will need the button id, from the editor click on the button and on the right panel near the bottom in advanced you will see the id. For example it should look something like #lp-pom-button-66

2. Now we need to add a small code snippet to the button, to do this click on the Javascript tab in the footer of the page builder and add a new script with the following code.

<script>
$( '#lp-pom-button-66' ).click( function() {
    _gaq.push(['_trackEvent', 'Form', 'Submit', 'Email Submit Form']);

});
</script>

Make sure you replace what is inside the $() with your button id that you collected for step 1.

That should about do it.

If your not sure what the labels mean inside the push function a good article can be found at http://code.google.com/apis/analytics/docs/tracking/eventTrackerGuide.html

Let me know if that helped

Slan

January 11, 2012 12:47 PM
User photo
Zeb Couch

Hey folks - 

So according to Unbounce analytics, I have a few views so far. According to GA, however, I don't have any. Why is that?

 

Zeb 

January 23, 2012 07:53 PM
User photo
Slan Dizier

Hi Zeb,

It could be that Google did not publish the report  yet, It may take up to 24 hours to update.

http://support.google.com/googleanalytics/bin/answer.py?hl=en&answer=55541

January 23, 2012 09:14 PM
User photo
Ryan Engley
Unbounce

All you should need to set it up is the URL of your thank-you page which by default is the form confirmation dialog.

Your page's form confirmation URL is based on the page's variant letter but is otherwise the same for any of your pages.  For example, if you had two variants, A and C, the URLs for each page's form confirmation dialog would be:

  • /a-form_confirmation.html and
  • /c-form_confirmation.html
Hope that helps configure Google Analytics goal tracking with your landing page and as always, if you have any other questions just let us know.
 
February 23, 2012 04:49 PM
User photo
Joel Simon

Hi there,

I need to track across multiple domains. My shopping cart is on another domain.

For my links going to my cart, I need to use the following structure:

<a href="http://www.my-example-blogsite.com/intro"
   
onclick="_gaq.push(['_link', 'http://www.my-example-blogsite.com/intro.html']); return false;">
   See my blog
</a>

How can I do it with Unbounce?

Thanks

August 06, 2012 10:17 PM
User photo
Joel Simon

I fund a way, I just forgot to re-publish the page :) (newbie mistake)

http://www.seomoz.org/ugc/google-analytics-cross-domain-tracking-ma...

It functions and we are now able to track the across multiple domain.

August 07, 2012 12:44 AM
User photo
Adriel Michaud

You guys should crank out one of these how to's for adding the Google ReMarketing code for Adwords. Should be similar.

August 07, 2012 09:44 AM
User photo
Ryan Engley
Unbounce

@Joel - glad to hear you were able to puzzle it out.  Thank you for letting us know!

@Adriel - We're always looking for ways to improve our resources and appreciate your feedback.  Thank you!

August 08, 2012 12:49 PM
User photo
Martin Eriksson

This really needs to be a lot easier - I thought the USP for Unbounce was that you didn't need to be technical to manage and create landing pages, but now to track it in GA I have to get our marketing team to remember to add the right tracking code to each new page, in the right place, and I can forget about getting them to customise the tag to track variants.

September 24, 2012 01:04 AM
User photo
Suzan Szollar
Intuit

Slan - I set up google analytics for the domain URL and I I added the code snippet above for button click tracking to all the sub-pages where I have buttons (in this case I'm using unbounce to guide people through a sequence of about 10 A/B tests), but I can't figure out how to set up the tracking in google analytics. I'm staring at the goals page and the event tracking guide but this will take me forever to figure out. What is the next easy step? 

September 27, 2012 09:12 AM
User photo
Slan Dizier

Hi Suzan,

Are you asking on how to set up goals in Google Analytics? I find that this step-by-step to be a good reference.  http://support.google.com/analytics/bin/answer.py?hl=en&answer=1032415.  If I have misunderstood your question or this did not help please let me know.

Slan

September 27, 2012 09:57 AM
User photo
Suzan Szollar
Intuit

Thx Slan, I read this page but what it doesn't help with is the specifics for goal tracking for button clicks. Up above in this thread you give instructions for how to add the code snippet on the unbounce side, what do I need to do on the GA side? I'm assuming I need to set up an event, but this is too generic to help me:

Event: Specify an Event as a Goal. In order to set this kind of goal, you must first set up Event Tracking. Under Goal Details, configure a combination of Event conditions (e.g., the Event Category, Action, Label, or Value). You must select at least one condition. Choose a Goal Value for the Event. The actual Event Value is the value you assigned to the Event when you set it up. The Constant Value can be entered manually in this field.

And this is too complex to help me: https://developers.google.com/analytics/devguides/collection/gajs/e... 

And I don't think the URL tracking will work because I use the same URL as the landing page across multiple variants of the same page, but I want to see the clicks by variant, not the total clicks to the URL.

Thx

September 27, 2012 03:26 PM
User photo
Slan Dizier

Hi Suzan,

I agree it is a bit confusing since there is so much on the GA side of things but once you get the hang of it I promise it's not so bad.  

So basically what you need to do is tell GA what type of goal you want to set up.  These can range from clicking on a link, to the amount of time that a user spends on your page and even specific events that happen such as submitting a form etc.  So within your account on the left side menu you will find goals by following that you can create a goal and Google will give you a few basic questions to set that up.  

It's hard for me to go into specifics since I am not sure what exactly it is you want to do.  What I recommend before you start is to ask your self what information it is that is important for you and your business to help you convert.  To me it sounds like what you need is to set up a funnel which is a part of goals that help you understand at what point your users are engaged and what part they drop off at.   I highly recommend getting familiar with this.  A very good and short read is this article

 http://analytics.blogspot.ca/2009/05/how-to-setup-goals-in-google-analytics.html 

It will help you understand the basics of setting up GA including funnels.

I hope that helps :)

Slan

 

 

 

September 27, 2012 09:28 PM
User photo
Aereo Marketing

Hey Guys - 

Let's say I want to track my unbounce pages, as subdomains, in GA. And I also want the reports to be aggregated into a single view, so that the hosted pages are a subdomain that are tracked in the same GA view. Is this doable? Is it a matter of setting up the right profiles in GA?

Thanks,
Matt 

October 08, 2012 02:53 PM
User photo
Michael Tsidulko

Hi team,

You guys are doing great work. I like your product but I'm very impressed with how dedicated you are to making Unbounce easy and user friendly. Keep it up!

Quick question: if using a custom domain name, while setting up GA do I use the unbounce or my custom domain?

Thanks,

Michael

December 13, 2012 01:15 AM
User photo
Ryan Engley
Unbounce

Hi Michael - thank you so much!  If you're using your own domain, be sure to configure GA to use your custom domain so it fits with your existing reports.  The only extra point is that if you're using a custom subdomain, you'll want to ensure you've selected the tracking for subdomains option in GA.

Matt - You sure can and yes, it's a matter of the configuration in GA.  Truthfully, I'm not familiar enough with that aspect of GA though I did track down a post about tracking multiple subdomains in GA that should coach you through it. 

December 13, 2012 04:10 PM
User photo
Wesley Blundy

I was pulling my hair out trying to get the GA goals working on the email form submission..... tried 

/a-form_confirmation.html

no luck..... anyway, I eventually got their in the end after a few hours. 

Make sure you add the GA code snippet to ALL pages, not just your main page. In this case, the success lightbox is a page, and thus needs the GA code added to HEAD, just like the front page. 

Hopefully this saves someone else some angst. 

Cheers

ps. Ryan - I love the site - thanks. 

May 22, 2013 02:56 AM
User photo
Ryan Engley
Unbounce

Hey Wesley - glad to hear it and thanks for the heads up. I'll update the video asap.

May 22, 2013 09:18 AM
User photo
Alban Sauvanet

Hello, thank you for the info. But I want to put a code, like a google event, when the customer click on the CTA button. How ?

June 06, 2013 12:54 PM
User photo
Ryan Engley
Unbounce

Hi Alban - You can tie a google event to your CTA using a little bit of javascript but don't worry, there's no programming required. Just check out this comment above from Slan on our product team. He explains exactly how to set it up.

June 06, 2013 01:35 PM
User photo
Alban Sauvanet

Thank you Ryan but there is no "script button" on my editor. I looked at the video and I can see them in the demo, on top, next to the delete button, but not on mine. Strange...

June 07, 2013 01:56 AM
User photo
Ryan Engley
Unbounce

Hey Alban - we released an update to our page builder just a couple weeks ago and you managed to catch outdated info in that comment. The Google Analytics integration steps are still the same but rather than clicking the Scripts button in the toolbar, you'll click the Javascript tab in the footer of the editor: http://support.unbounce.com/entries/513757-Can-I-use-custom-JavaScr...

...thanks for pointing out the issue. We'll hop in a fix it up ASAP.

June 07, 2013 09:39 AM
User photo
Kevin Starke

Do I put the event script Slan put in the comments into the Header, Before Body End Tag, or After Body Tag in the Javascripts section?

June 13, 2013 05:50 PM
User photo
Slan Dizier

Hi Kevin,

You'll want to put the code into the head tag.  Google does a great job making sure that it does not slow your page down by doing all its magic as your page is loading.

I hope that helps,

Slan

 

 

June 13, 2013 05:57 PM
User photo
Kevin Starke

Has the script that should be inputed changed since 2012? I have placed the code into the Header and changed the button code and set up the Google Event using the same fields (Form, Submit, Email Submit Form) but the events are not being tracked.

June 14, 2013 09:53 AM
User photo
Finge Holden

Lots of great advice in here! I wanted to be very specific. I want to track conversions (form submits) on my landing pages. What is the best way to track this in GA?

  1. Define a goal using the URL of the built in confirmation page?
  2. Define a goal based on an event? If so how do I define the goal in GA?

I know how to set up #1 using the "old" GA scripts. But how do I do that using the the new Universal Analytics script?  

June 20, 2013 01:16 AM
User photo
Ryan Engley
Unbounce

Hey Finge - I answered your question in our community forum thread but for folks who might not see that, I'm including the answer here too:

Your best bet is to track the form submit action as an event. To make this work with Unbounce and Google's Universal Analtyics, you'll use their jquery method to tie the action to your button. 

So, if, for example, your form's button ID were #lp-pom-button-16, then you'd replace #button in their example with #lp-pom-button-16, like this: 

<script>

$('#lp-pom-button-16').on('click', function() { 
ga('send', 'event', 'button', 'click', 'nav-buttons'); 
});

</script>


You'll add that code to your page's head using the Javascript tool and of course, you'll want to update event, button click etc. to match your own reporting. But that should do the trick!

June 20, 2013 10:40 AM
User photo
shuki mann

Hi,

If i host my landing page in unbouncepages.com - will the GA code works?

Your solution is only for subdomains but not for multi domains.

Am I worng?

July 09, 2013 03:28 AM
User photo
Ryan Engley
Unbounce

Hey Shuki - if you'll be adding GA tracking, I highly advise against leaving your pages on unbouncepages.com. That domain is really there for testing and if you're running a campaign, you should use your own domain. But, should you choose to stick with it anyhow, you can enable cross-domain tracking in GA.

July 09, 2013 10:58 AM
User photo
Jack Hughes

If you want to track a conversion event on GA and use multiple variants you come accross a problem that the success URL changes depending on the variant of the page used. Where you place the goal url in GA, instead of selecting the "Equals to" item in the Destination section, choose regular expression instead.

If your goal url is variant "/free-cooking-guide/a-form_confirmation.html" or another variant "/free-cooking-guide/b-form_confirmation.html"then the regular expression would be "^/free-cooking-guide/.+-form_confirmation\.html"

Basically what is happening there is that the regular expression is matching against any variant of form confirmation. That way you don't need to have seperate goals for your variants which would be a pain.

HTH

July 17, 2013 08:03 AM
User photo
Ryan Engley
Unbounce

That's *super* helpful Jack. Thank you so much for sharing that solution.

July 18, 2013 11:54 AM
User photo
Richard Heslop

Hi Slan / Ryan,

I hope you can help me - I've been in contact with Louise & Jacquelyn in my struggles to get the GA Event tracking to work.

I was originally using GA Universal and trying to get Ryan's code sample above work. However, the current supported version of jQuery (1.4.2) doesn't support the 'on' method, so the only way to get that to work would be to untick jQuery on all the scripts and manually include a newer version of jQuery (e.g. src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js).

I tried that... with no luck...

So I reverted my GA pagescript to GA Classic and have been trying to get Slan's code sample to work. 

In the GA Realtime view I can see the pageload Event when I preview my Unbounce page so the GA pagescript is loading fine, but when I click the button with the onclick event (ie. _gaq.push(['_trackEvent', 'Form', 'Submit', 'Email Submit Form']); ). , nothing shows on the GA Realtime view.

I've seen (on other GA implementations), that if the redirect to the href destination happens too quickly, then the JS doesn't have time to send the event to GA. In those cases, people include JS delays before handling the redirect. Have you ever seen anything like with Event tracking on  on Unbounce - provide any ideas? My ticket # is 31168.

Hope you can help :-)

-Richard

 

 

 provides here won't work 

August 29, 2013 12:59 PM
User photo
Rob Maclean

Hi.

A bit of a newbie, but love Unbounce already.

I've been through this thread and have implemented GA tracking of my UB pages by adding the Javascript code. I've also added the 


<script>

$('#lp-pom-button-16').on('click', function() { 
ga('send', 'event', 'button', 'click', 'nav-buttons'); 
});

</script>

 

Code to my "conversion" buttons (link to download app on App Stores). I've only just done this so I can't confirm these are flowing through as "Events" in GA. Assuming they are, how do I then make these events Goals in GA. Do I need to separately go through the Admin / Goals / Create a new Goal / ... process? If so what setting should I use given I'm using the above event definitions in the code?

As a separate question, if I get the above fixed, I should be able to import that goal from GA to AdWords to link performance from advert/keyword etc. to conversion right? Would be nice to be able to optimise AdWords for Conversions via UB...

Thanks in advance and keep up the good work!

Rob (Johannesburg)

September 03, 2013 02:47 AM
User photo
Rajesh Khanna

do you still have to paste code page by page or now only once for campaign/website

September 27, 2013 09:54 AM
User photo
Ryan Engley
Unbounce

It's still page by page Rajesh but our platform team is already working on some backend changes so we enable shared content between pages to make this easier.

September 27, 2013 10:10 AM
User photo
keith bohanna

Ryan, this from about comment string on March 15, 2011 11:14 am > "Thanks for the feedback Wes. That's been a fairly common comment, so we'll definitely be considering it for a future update." This from you Sept 27th 2013 "our platform team is already working on some backend changes so we enable shared content between pages to make this easier."

Both relating to single addition of GA to a campaign/website. Hard to take your feedback with any degree of seriousness given the lag in time and zero action.

Keith

October 17, 2013 07:36 AM
User photo
Ryan Engley
Unbounce

Hey Keith - I know. We haven't been moving as quickly as we'd like. I get that it looks like there's been zero action because a lot of the changes aren't visible but regardless, we want to move faster.  We've now got mock ups of the shared content UI and our developers have successfully tested different versions of dynamic content replacement. Our team's been pretty small for a long time but we recently went through a big growth spurt which has helped us gain momentum. For a more thorough update, check out this post from Carter Gilchrist, our Director of Product and User Experience. Thank you for keeping the faith and I hope you know we're as eager as you for these features to be released.

October 17, 2013 02:00 PM
User photo
keith bohanna

Thanks Ryan, good approach to answering, nicely handled :-)

Good that you have added to the team, must be helping the internal frustrations as well as the external ones.

K

October 18, 2013 01:01 AM
User photo
Carter Gilchrist
Unbounce

I can attest to that - we are noticing a world of difference in the last month having a bigger team. Thank you for hanging in there Keith.

October 18, 2013 11:50 AM
User photo
Mark Hamilton

In reply to what Jack Hughes said just a few comments above:

Will that work for Conversion Tracking in general, or only Events? I'm not too well-versed on GA so this question might actually be very stupid - but still. Currently, I'm running on free on unbouncepages.com and have 3 variants. I've pasted the GA Tracking code in all variants and their form completion dialog page and all thats left is for me to setup the goal in that part of GA and wondering if I can simply use that regex.

(Thanks Jack Hughes!)

November 11, 2013 01:15 PM
User photo
SurgeFront Marketing

The analytics dashboard is different now and there is no "Enable Subdomain tracking and click Save" under the Tracking Info Tab.

How do we enable Subdomains now???

November 11, 2013 04:01 PM
User photo
Lou Sturm
Unbounce

@Mark - The unbouncepages.com URL we give you on the Free Demo Account is really just for testing. If you're running any traffic to your pages you'll want to use your own domain. Why is this important? Google won't index your pages  on the unbouncepages.com URL and if you're running any PPC campaigns Google requires you use your own domain. You can add your own custom domain on any Paid Plan - then you can set up Event Tracking and Goals in GA.

@SurgeFront Marketing If you're using Standard Google Analytics you should still see the option to "Enable Subdomain tracking". However, if you've switched over to Universal Analytics you don't have to change the code to track users across sub-domains. If your "Thank You Page" is a unique page across all subdomains your goal should work properly. If it's not, you need to create a filter showing the full URL. Hope that helps!

 

 

 

November 12, 2013 09:25 AM
User photo
SurgeFront Marketing

Thanks for your help. The filter showing the full URL instructions must be for the old dashboard because I can't figure out how to follow them... 

November 12, 2013 03:49 PM
User photo
Lou Sturm
Unbounce

@SurgeFront Marketing  Behavior Flow is located under Reporting > Content. One thing to note, is you must have set up and started tracking Events before they'll appear in the Behavior Flow report.  Rest assured, Universal Analytics tracking works in Unbounce, however, I'd encourage you to stick with Classic Tracking if you can.  Universal Tracking is still in Beta and is bound to have some hiccups.

November 12, 2013 04:07 PM
User photo
Danil Lesovodskiy

I will have some troubles with setup tracking code from yandex metrika. Same problem that with GA.
I try all variants above it. Don't work.

I analyzed the code of pages generating by unbounce, and find work variant.

All targets in Yandex Metrika work with such code:

<script>lp.jQuery().ready(function() {
lp.jQuery("#lp-pom-button-40").click( function() {
yaCounter20636719.reachGoal('target');
});});</script>

You must paste you id button, and if you need track GA, change code in function.

November 26, 2013 01:29 AM
User photo
Kiran Kumar

Two things I want to bring to your notice.

  1. I am using Universal Analytics in GA so the part in the video about enabling subdomain tracking in GA is probably irrelevant since GA doesn't provide that option.
  2. Slan's answer about enabling event tracking doesn't mention where the tracking code should go in the Javascripts section in Unbounce, Head or Before Body End tag. 

Thanks.

December 10, 2013 11:59 PM
User photo
Kiran Kumar

Sorry I see the two points I made above are already addressed in the other comments. It would be simpler if the comments were threaded.

December 11, 2013 12:57 AM
User photo
Lou Sturm
Unbounce

Hey Kiran - no apologies needed! Customer Success is the first to admit we can improve the organization of comments. We're working hard on revamping our community and educational resources - expect to see some exciting improvements in the coming months!

December 11, 2013 09:04 AM
User photo
Mark Hamilton

Despite the answers above, I'm still having trouble putting in the new Universal Analytics tracker in. Is there a simpler way please without needing to assume if we're using the same thank you page or not. I have a couple variants and this is becoming far more confusing. Especially when we started including the filter URL stuff.

 

Thanks!

December 16, 2013 04:04 PM
User photo
Mark Hamilton

So basically, since UA doesn't allow us to create a subdomain, I skipped the additional of a subdomain and just created a Goal.

Destination = ^/promo1/.+-form_confirmation\.html

Not sure if this is the correct way, but let's imagine my subdomain is subdomain.website.com/promo1/a-form_confirmation.html -> the above Goal should *hopefully* fire off. 

December 16, 2013 04:18 PM
User photo
Anastasiya Dudik

Where in Unbounce do you plug in the Google Analytics Tracking ID code? 

January 06, 2014 04:54 PM
User photo
Anastasiya Dudik

Never mind! :)

January 06, 2014 05:03 PM
User photo
Lou Sturm
Unbounce

Sorry you beat us to the punch Anastasiya! For any other customers' scratching their heads, I'll let everyone know you paste the GA tracking code into your landing page's Javascript library (Select 'Head' for placement). Please keep in mind that it may take Google Analytics up to 48hrs to register the tracking code. Hope that helps!

 

January 06, 2014 05:07 PM
User photo
Greg Magnus

Any progress setting up a way to add the Google script to "one" library and have it serve all of the landing pages in the account? It appears that request was approached a few years back based on the comments above. I just finished adding the code to all of our landing pages one at a time after it appeared that was the only way?

January 23, 2014 01:21 PM
User photo
Mark Hamilton

Wow Greg, unbelievable. I was just thinking about it when I received an Unbounce notification about your comment and I come to check it out and wow. Freaky!

But yes, that means +1.  I lost some leads today on a small page because it skipped my mind to put the conversion code on the thankyou pages.

January 23, 2014 07:00 PM
User photo
Dominik Faber

Does anyone know why Google's URL tool for customized campaigns doesn't accept Unbounce landingapges/URLs (custom domains)???

January 27, 2014 05:38 AM
User photo
Johnny Opao
Unbounce

Hi Greg/Mark - While that feature is on our product roadmap, there's not ETA on when this may be introduced. As for now the script will have to be added manually to each page. In the meantime i've gone ahead and tagged both your accounts so you'll be notified about this feature closer to it's launch :)

January 27, 2014 03:30 PM
User photo
Johnny Opao
Unbounce

Hi Dominik - You shouldn't have a problem using the Google URL building tool. I've gone ahead and started a support ticket for you so we may dig in further. Look out for my email! I have some followup questions for you.

January 27, 2014 03:33 PM
User photo
Scott Robinson

Any tips for troubleshooting? I've done exactly this, yet somehow GA is not registering the visits...

April 03, 2014 12:20 PM
User photo
Quinn Omori
Unbounce

Hi Scott - I just took a quick look at one of your pages and it looks like the tracking is set-up properly. Sometimes it can take a short time for GA to start registering data, but I've gone ahead and opened up a support ticket for you, so we can troubleshoot this a little further. Look out for my email, shortly.

April 03, 2014 12:37 PM
User photo
Finge Holden

I just discovered a hickup when you ad the GA event tracking script (http://support.unbounce.com/entries/25939384-Tracking-Button-Clicks...) in combination with a lightbox. Befora adding the event tracking script the lightbox worked fine, but when added the content of the lightbox loads in the entire window instead.

I have expeirenced that the lightbox script sometimes does not play well with other scripts. The lightbox script used is found below.

<script>
$(document).ready(function() {
$('#lp-pom-button-85').fancybox({
type: 'iframe',
width: 800,
height: 1024
});
});
</script>

 

Anyone knows how to possibly solve this?

June 06, 2014 03:10 AM
User photo
Mark Wainwright
Unbounce

Hey Finge,

That's a really well-timed question! I've just released a new version of the script that really can't conflict with any other scripts you might have on your Unbounce landing page. Essentially, it'll send the Google Analytics event first, and then only run the other scripts you're using (like lightboxes, etc) once it's confirmed that the Analytics hit has gone through. This means you can be sure all your events will be tracked – but also sure that it won't prevent anything else on the page from working.

All you'd need to do is replace the script you're using with the version in the http://support.unbounce.com/entries/25939384 article.

June 06, 2014 05:01 PM
User photo
Finge Holden

I added back the script and placed it in head. Unfortunately it still does not play nice with the lightbox. Now it doesn't seem like the lightbox fires at all, just goest straight to the form that should be placed there. Please see a test page here http://kampanje.dbank.no/test/?kilde=Unbounceforum.

June 07, 2014 02:36 AM
User photo
Mark Wainwright
Unbounce

Hi Finge, sorry about that – that was a use case that I hadn't tested thoroughly enough. Please try replacing your script one last time with the version in that post, which should fix the lightbox issue.

June 09, 2014 03:50 PM
User photo
Finge Holden

Thanks, that worked :-)

June 09, 2014 10:22 PM
User photo
Zoli Gerő

Awesome featur, thanks a lot!

June 24, 2014 01:38 PM
User photo
Patrick Siki

hey! do I need to create a special filter in the new GA in order to track my unbounce page created on a subdomain? thanks!

June 30, 2014 04:19 AM
User photo
Quinn Omori
Unbounce

Hi Patrick - if you're using Universal Analytics, you won't need to do anything to your code to track your sub-domain. You can just place the same code on your Unbounce pages as you use for your main domain. Analytics will show stats for both domains by default though, so you will need a filter if you want to view your sub-domain traffic by itself. Here's a quick article that shows the filter to set-up: https://coderwall.com/p/ygzyfg

June 30, 2014 09:49 AM
User photo
Pachi Chen-Wong

Hi, I'm trying to figure out what I need to do to enable tracking for multiple variants (A/B). Do I just copy and paste the same tracking code for both? How will I distinguish the data from each page individually in Google Analytics?

September 03, 2014 12:48 PM
User photo
Johnny Opao
Unbounce

Hey Pachi - If you are using the latest version of Google Analytics, then simply replace this line in your code:

ga('send', 'pageview');

With this

ga('send', 'pageview', document.location.pathname + window.ub.page.variantId + window.location.search);

That will automatically detect what variant the visitor is on and append it to the URL in your analytics reporting

September 03, 2014 02:31 PM