Introduction to - edit

In order to make this process as easy and flexible as possible, we're going to utilize one of my favorite tools; is a tag manager, that allows you to perform frequent adjustments to analytics code only one time, and syndicate the events to all of your analytics and marketing services.

Even if you are only going to use Google Analytics, I highly recommend using to set it up. In the future you may want to add additional services, and this will make sure to keep your code well organized and synchronized.

Before we set anything up, let's make an outline of our objectives in this book, and where all of our conversion gates are.

I like to think of conversion events as slalom gates in that old Nintendo 64 game wave race. What I mean by that is there are two types of checkpoints, those that are above the surface of the water. These are our javascript conversion events, and those that are below the surface of the water. These are our server side conversion events.

The really important thing to keep in mind, is that not all conversion events are given the same importance. There is one conversion event, the very first identify call, that is the most important conversion event of them all. That is because it ties our anonymous visitors that are currently being tracked by a cookie, and assigning them a user id. Once we have that user id, we can associate any recurring events that take place on the server (for example a monthly bill is paid) with that User-ID. This allows us to build out a list of the most important metrics, and associate them to a particular channel.

What I mean by that is, you shouldn't consider your funnel "complete" when a user signs up for your service, especially if you have a free trial. Truly your users are finished passing through your funnel when they have canceled their service with you for the very last time.

However, the conventional "end of the funnel," a signup, is a crucial point in tracking our users, since it is the point when we can associate our anonymous front of the house (javascript) efforts with our back of the house (serverside) efforts.

Mapping out our conversion plan.

Enough theory. Let's dive into the practical. The first thing we need to do is install on every page of our site/app. Head on over to and sign up for an account if you haven't already. Create a new project and grab the tracking snippet that's provided for you. Mine looks like this:

<script type="text/javascript">||[],["identify","group","track","page","pageview","alias","ready","on","once","off","trackLink","trackForm","trackClick","trackSubmit"],{return function(){var;return a.unshift(t),,}};for(var i=0;i<;i++){var[i];[key]}{if(!document.getElementById("analytics-js")){var a=document.createElement("script");a.type="text/javascript","analytics-js",a.async=!0,a.src=("https:"===document.location.protocol?"https://":"http://")+""+t+"/analytics.min.js";var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(a,n)}},"2.0.9","[YOUR_KEY_HERE]");;

Once you have installed on every page of your application, let's turn Google Analytics on to make sure that everything looks good. Navigate to the integrations tab and flick the switch on for GA.

Turn on Google Analytics from inside your integrations page.

Head on over to Google Analytics and grab your property ID, you're going to want to paste this inside the Google Analytics settings in



I like to turn on Double Click Remarketing, Display Ads, and Demographic Reports to try and slice my user data as fine as possible.

After hitting save and enable, visit your website and check that you can see a visitor in Google Analytics real-time reporting.


If you don't see yourself inside the Google Analytics realtime dashboard then there are 2 possible errors. You have misconfigured the Google Analytics settings inside, or worse, you have misconfigured installing the tracking snippet. Fortunately provides a nifty debugging tool to make sure it isn't the latter.


If you are performing events (pageviews are fine) on your page, and the events aren't showing up, then the error is most likely with your tracking configuration. If the events are showing up, then good news! Your code is probably fine and you have misconfigured Google Analytics. Go back to the settings and make sure there aren't any typos.


Very cool. Go make yourself a margarita. Configuring over 100 service providers just got a whole heck of a lot easier, and more coordinated.

<-- Table of Contents | Chapter 2: Universal Analytics -->