New Feature: Integrate Google Analytics + Event Tracking with Script Manager


Hey folks!

Just wanted to give a quick update for those who might have missed this release a few months ago. Since the inception of Unbounce we’ve heard numerous requests for an easier integration with Google Analytics, including support for event tracking.

Needless to say we’ve made the process of implementing Google Analytics tracking on your landing pages super easy with the help of Script Manager. The added bonus? When you implement the Google Analytics tracking on your landing pages, it automatically creates event tracking for action items on your page as well.

You can read the full instructions in our documentation here, but if you want to dive right into it just follow these steps:

  1. Under Settings, click ÒScript ManagerÓ. A dialog box will open, allowing you to select ÒGoogle AnalyticsÓ from a dropdown menu.

  2. Enter your Website Tracking ID (found in Google Analytics)

  3. Click “Add Script Details”

  4. Two boxes will open, showing “Script Details” and “Script Usage”. From the “Script Usage” box, select which subdomains you’d like to apply the Google Tracking Script to.

  5. Click “Save and Publish Script”

That’s it! If you want to learn more about how action items on your page will display in Google Analytics event tracking, check out the full documentation article in our academy here

If there’s any further feedback on this integration, or if there’s something else that you feel we could add to make this even better, leave a comment below and let us know. :) 


8 replies

Hi,
Is it possible to get a look into the code and the thoughts and comments behind this?
Because we are an agency and have a couple of special needs, which we have so far solved with our own complex scripts:

  1. We track to multiple Analytics accounts in parallel
  2. We add inpage analysis and allow trackers accross several domains to our scripts
  3. We add different numbers to our conversions, so we can track and differentiate between different conversion goals in our google events reporting
  4. We add special tracking to videos, so we can see which videos on the page have been used and how
    I know of course all this can’t be added to the standard script, but we may benefit from using the new standard script as a base for our next version of our custom script.
    Thanks for allways developing Unbounce furhter…
    Best regards
    Lars

Hi Boost,

Can you provide any insight into the advanced tracking you value for your videos?  As an animated video studio we are always looking to learn new best practices 🙂

Thanks,

Joe

Hi Joe,
Sure. It’s a customization of a script by Lunametrics (which you can google many places). This script uses the youtube api which gives back info about youtube playstates.
Based on identifying and numbering all videos on a page the script starts listening for the Youtube events.
Then it transforms these events to Google Analytics events meaning you can see start, stop, buffering, pause etc per video id in Google Analytics.

A few important notes:

  • You need to add these parameters to your youtube links for it to send events back to your listening script : &enablejsapi=1
  • For some reason you can’t get the titles of the videos firing events, but you can get the youtube link and then extract the youtube id’s. We add these id’s to our Google events.

I hope this helps. Let me know if you need deeper info, as it will require some more digging into it for your specific setup.

Best regards
Lars

Very generous insights, Lars.  I look forward to sharing this information with our animated video customers 🙂

Thank you,

Joe

Hi, is this supposed to track buttons or links that scroll internally on the page? I have buttons set up to scroll to other sections of the page and I’d like to see which sections our clients are interested in. 

It sound like this integration should do that but I’m seeing 0 events in my real time console on GA.

Thanks!

Hey Lars,
I’m one of the developers who worked on the Script Manager feature here at Unbounce.

I’ll start by detailing how to get at the code yourself:
 - Add the GA Script to one of your domains and publish it.
 - Go to a page under this domain and navigate to the Unbounce Page Builder.
 - Click the “Javascripts” button in the bottom left.
 - When you bring up the Javascripts panel it should have a left sidebar with the title “Scripts on this Domain”. Select the Google Analytics script and you can see the code our GA script will publish to your pages.

We have designed the script to integrate with the features and components available in the Unbounce Page Builder out of the box.

We have set the script to track things like:
 - The page view, where the page variant id is included in the URL parameters for easy segmenting.
 - Form submissions.
 - Button clicks.
 - Image clicks.
 - Standard outbound link clicks.
 - Special click tracking identifiers for social links such as Facebook, Twitter, Linkedin, Google+, Emails, Phone Numbers, Downloadable links, and In-Page links.
 - Integration and support for all the same events in combination with more tools such as Fancybox, and SmoothScroll.

Hope that helps!

Hey Lars,
I’m one of the developers who worked on the Script Manager feature here at Unbounce.

I’ll start by detailing how to get at the code yourself:
 - Add the GA Script to one of your domains and publish it.
 - Go to a page under this domain and navigate to the Unbounce Page Builder.
 - Click the “Javascripts” button in the bottom left.
 - When you bring up the Javascripts panel it should have a left sidebar with the title “Scripts on this Domain”. Select the Google Analytics script and you can see the code our GA script will publish to your pages.

We have designed the script to integrate with the features and components available in the Unbounce Page Builder out of the box.

We have set the script to track things like:
 - The page view, where the page variant id is included in the URL parameters for easy segmenting.
 - Form submissions.
 - Button clicks.
 - Image clicks.
 - Standard outbound link clicks.
 - Special click tracking identifiers for social links such as Facebook, Twitter, Linkedin, Google+, Emails, Phone Numbers, Downloadable links, and In-Page links.
 - Integration and support for all the same events in combination with more tools such as Fancybox, and SmoothScroll.

Hope that helps!

Hey Drake,

The GA script is designed to track links that scoll internally on the page. Any link with an “#” anchor on the page should be tracked with an “In-Page” event. This also works with the SmoothScroll plugin we mention in our support documentation.

Cheers,

Reply