Google Analytics Conversion Tracking

Before you add the conversion tracking code, you'll need the Google Analytics tracking code as well as the event tracking snippet.

When you are finished, you should have two pieces of code:

Google Analytics embed code

<!-- Google Analytics -->
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),

ga('create', 'UA-XXXXX-Y', 'auto');
ga('send', 'pageview');
<!-- End Google Analytics -->

Google Analytics Event Tracking Snippet

ga('send', 'event', 'event_category', 'event_action'); 

This snippet should be encased in a script tag, like this:

<!-- Google Analytics Event Tracking Start -->
ga('send', 'event', 'event_category', 'event_action'); 
<!-- Google Analytics Event Tracking End -->

You should now have two pieces of code. Whichever method you choose for placing this code, the Embed Code should always be added before the event tracking snippet.

Conversion Tracking in SharpSpring Landing Page funnels

  1. Open your SharpSpring landing page
  2. Click on the Code button on the left pane
  3. Select "All Pages" at the top
  4. Click on the "Head" button
  5. Add the Google Analytics tracking code
  6. Switch to the page that will be viewed after conversion (after filling out the form)
  7. Click on the "Head" button
  8. Add the conversion tracking snippet

Conversion Tracking in SharpSpring Forms

These instructions only apply if you are using the built-in Thank You page with the SharpSpring form. If you redirect the contact to another page after filling out the form, you should place the event tracking snippet on that page.

  1. Go to Content > Forms
  2. Select your form on the left hand side (you might need to click View All to see it)
  3. Click the top right gear button, select Edit Form
  4. Go to the General tab
  5. Click the edit button next to the option "Use Custom "Thank You" page"
  6. Place both pieces of code inside of the Head tag, make sure that the tracking code is first, and the event snippet second.

Written By: Sam Koekemoer