How to auto-send Form Data to Google Analytics

Ok, so this a quick post to show you how you can use Popcorn Metrics to set up Google Analytics event tracking in under 5 minutes.

Let's face it - writing Google Events code isn't fun. So, I'm going to show you can use Popcorn Metrics to capture events and form data entered by users and send that data to Google Analytics in real-time without having to write google events code.

With minimal effort you can capture things like:

  • specific user behaviours (clicks on images, buttons, in page items)
  • what people are searching for (search box entries)
  • data people enter in a form
  • part filled forms (when a user gives up and cancels a form)
  • user events (like when people login, add stuff to their cart, etc)

And you view those events in Google Analytics - both in real time and historically!

We think this is really cool - which is why we built Popcorn Metrics so you could do this kind of stuff without needing to write code. :)

So, here's a real life example…

FoodAdo is an online marketplace for foodies, where people can discover and buy artisan foods direct from the producer. Now, here’s the scenario: what FoodAdo wanted to know was:

"What products are people searching for but can't find?"

Why did they want to know this? Because if they knew what people were searching for (i.e. peoples needs) this insight would help them build their online business.

In this case, they could invite specific food makers to join their platform ("Hey awesome food producer, we KNOW that people are searching for Purple Cheese, and you make Purple Cheese. So join our platform because customers want to buy your products.")

Of course this is applicable to all kinds of on site search.

If you rent or sell bicycles or ice cream, you can do the same to find out what products are people searching looking for on your site.

I’ve put some screen shots to make it easy to follow. Here’s the landing page of FoodAdo.com. They have two search bars, and we’re going to track the search bar at the top of the page.

STEP 1: First, they signed up for a free trial account to track user event data with Popcorn Metrics.

STEP 2: Then they loaded up their page using Popcorn Metrics Event Tracking Tool, and right clicked on the part of the page they wanted to track - in this case the search bar at the top of the page (see below).

STEP 3: Next they named the event (this is how the event will be named in Google Analytics events).

Notice a couple of things: Popcorn Metrics automatically captures all form data to send to Google Analytics (in this case txtSearch1) and you can rename these fields.

Also we selected Apply to all pages checkbox, because we’ll want to track this event on all pages.

STEP 4: They selected a tool to send the data.

(In this example they were sending to Google Analytics. Notice, they also selected Mixpanel, and also there are options to send to KISSmetrics or segment.io.)

STEP 5: Finally, to publish the changes, they just clicked the red Save and Publish button (in the top right corner).

(See the image below for steps 4 and 5.)

It takes 10-15 minutes for the tracking code to be distributed across the internet, so after publishing there's time to go grab a coffee and by the time you get back, the events tracking is live and real user data will start appearing in Google Analytics events. :)

Search data displayed in Google Analytics - in real-time.

Now when a customers search for anything in the search box, your customer data is immediately sent to Google Analytics events. Let’s search for Purple Cheese.

To see live events in Google Analytics(i.e. users on the site right now and during the past30 mins), log in to Google Analytics, and select Real-Time > Events.

To see older events in Google Anaytics, select Behaviour > Top Events.

NOTE: it can take several hours (up to 24 hours) for historical data to appear here. Don’t ask me why, ask Google!! :)

To drill in and see all the data captured for that specific event, click on the event, in this case that would be Top Menu Search Bar.

And now that you have captured this event data, you can of course use the power of Google Analytics to dig deeper. There’s loads more you can do with Popcorn Metrics, but I hope this helps.

NOTE: Google doesn’t like you to save personal data. According to Google Analytics terms of service you may not save “any data that personally identifies an individual (such as a name, email address or billing information)”. See their Privacy terms here: http://www.google.com/analytics/terms/us.html)

If you want to capture the kind of personal data (names, email adresses etc) that Google Analytics prohibits, you can use awesome analytics tools like Mixpanel or KISSmetrics. We can send data to these tools also :)

If you want to start tracking your own users to Google Analytcs events, click here to get started.

Was this post helpful? Please let me know your thoughts in the comments section below.