How-To: Set up Goals in Google Analytics


#1

Hi friends,

As some of you might know, Google Analytics (“GA”) is not the MOST user-friendly UX.  It can be difficult understanding how to properly track the right data, how to set up Goals, and what Events are actually being sent to GA.  

I have not found any good documentation on UnBounce (“UnB”) regarding Setting up Goals in GA (i.e. measuring conversions in GA).  So…I decided to paste what I have learned here!  Please note that I am new to GA, and definitely welcome commentary if you have suggestions to my methodology.  

Setting up Goals in Google Analytics

Most importantly: you must begin by inserting the GA scripts on every desired page via The Script Manager.  This is under the Settings  menu on the left-hand side.  This is the ideal method for establishing GA because it inserts the JavaScript (“JS”) needed to define Events on your landing pages.  Once you have Events defined, you can establish in GA which Events = a Goal/Conversion.  

So, when you use the Script Manager, UnB inserts analytics.js to every page.  

This script sends data to GA with the following parameters:

  • ga(‘send’, ‘event’, [eventCategory], [eventAction], [eventLabel], [eventValue], [fieldsObject]);

The first two parameters are set, they will not change. 

Now in GA, go to Admin > Goals (under View).  When tracking a Custom Goal in GA, you can define the Goal by the following.  When all conditions are met, a Goal is Completed.

  • eventCategory
  • eventAction
  • eventLabel
  • eventValue
    So now you might be wondering - well what do I type into the above fields?  This is not very clear, and required me to dig into the analytics.js script.  Here is what I found:

Setting up Form Submission as a Custom Goal in GA

  • eventCategory [equals to] “Form”

  • eventAction [equals to] “Submit”

  • eventLabel [equals to] “lp-pom-form-73”

    • Yours will be different.  Check the Object ID for your form in Page Builder
  • eventValue [leave blank]

Setting up Clicking An Email Link as a Custom Goal

  • eventCategory [equals to] “Email”

  • eventAction [begins with] “hello@”

    • Yours will be different.  Use the specific email handle.  I use [begin with] because I tag on some UTM-like codes at the end of the href URL.
  • eventLabel [leave blank] 

  • eventValue [leave blank]

I hope this was helpful to you all!  If you have more tips, please post them to this thread!

Happy Converting,
Johnny


Tracking form submissions in Google Analytics
#2

Nice…we always had luck if you’re using the UB thank you page following a form submission creating a “Destination” based goal using the url regular expression: /[a-z]-form_confirmation.html (this captures the url string following any variant of a UB landing page.)


#3

Great thought, SG!  My form button sends the user to another page on my domain.  Your solution is another way I could have tackled this. 

If I was using your method, I would make sure to set my GA Goal as a [begins with] condition.  The reason for this is that I use a multi-step form, and appended to my referral URL are the answers to my first two form fields.  


#4

Nice of you to document this for everybody, John.  

Well done,

Joe


#5

Hi,

So just to be certain I am doing this right,

My landing page is http://www.snapmarketing.net/overseas… so in my “Destination Equal To” box in Google Analytics I enter /overseas-real-estate/[a-z]-form_confirmation.html

Is that correct?

Thanks

Dez


#6

Hi Dez,

Make sure you have the native Google Analytics Script installed via unbounce on all your pages. Once that has been integrated, my favorite method of tracking form completions is by using events. I’m not a fan of using Thank You pages, but that’s just me!

Have a look at my Contact Form Completions goal on Google Analytics.

Let me know if you need anymore help!


#7

Hi Stefano,

Thanks for the tip, I have now done that.

Cheers,

Dez


#8

Awesome :slight_smile:


#9

Hi SG,

Struggling with my goal conversions, I would be most grateful if you could show me the steps to implement your “destination” based goal for tracking conversions using the "thank you " page

Kind Regards

Barrie


#10

Hi Stefano,
What if more than one landing pages have been created by cloning. How can I track goal completions separately for all such landing pages?