Universal Analytics and Google Ads

Find out how Leadtosale integrates with Google Analytics and Google Ads.


What is the purpose of this integration

Lead generation marketers use Google Analytics and Google Ads to optimise their online marketing. Leadtosale lets you:

  1. Speed up your conversion tracking implementation through our auto event tracker, form tracker and custom tracker.
  2. Broaden your conversion tracking to non-online sources, through our call and raw tracker.
  3. Deepen your conversion tracking with revenue data from closed leads by connecting to your CRM through our Zapier integration.

Having this data in Google Analytics and Google Ads allows you to make better decisions about your online marketing. Also, it allows Google to optimise your bids for you through automated bidding strategies, and target potential customers using audience creation.

How the integration works

We send events from our server directly to Google Analytics through measurement protocol. In order to send these events, we need Google Analytics’ user identifier, the Google Analytics client ID.

For on-site events, like auto-events, form leads and custom leads, we get the client ID directly from the browser.

For call events, and raw events, we associate leads with the last user who visited a page with the tracker. There are some additional features which improve the accuracy of this matching for call trackers:

  1. We only reconcile calls with website visits where the phone number was on the page. If a page with a phone number was not viewed by a user, they are not eligible to be matched to a call.
  2. We can use multiple phone numbers per tracker. Each call will be associated with the last user to who visited a page with that number.
  3. We can limit the channels you show your numbers for, like Google Ads only. You can use multiple call trackers per container. For example, you may want to track Google Search Ads and Google Display Ads separately.

No matter how much traffic you get, we can use the above three features to accurately match phone calls to users on your website.

In addition to the client ID, we also record the referrer, any UTM tags, IP address and gclids for that visit.

If you’re tracking Google Ads, make sure auto-tagging is turned on in your Google Ads account. This should automatically be turned on when you link Google Analytics to Google Ads.

Once we’ve matched a user to a lead, then we can use that information to send events to Google Analytics.

Google Analytics events

This integration requires you to add your Google Analytics property ID to your container before events can be sent.

Curly braces represent dynamic values, which depend on the tracker type, and whether it’s a new lead or sale event.

The Google Analytics events for new leads have the following format:

Category: {{tracker type all lower case, this can be call, form, raw or custom}}
Action: {{submitted for all leads except call leads, which is called}}
Label: Lead {{Tracker name}}
Value: 0

For example, a new event for a call lead on a call tracker called ‘Google Ads’ would be:

Category: call
Action: called
Label: Lead Google Ads
Value: 0 (in Google Analytics select “use the Event value”)

A new event for a custom lead on a custom tracker called ‘Form Workaround’ would be:

Category: custom
Action: submitted
Label: Lead Form Workaround
Value: 0

The Google Analytics events for leads that are processed as sales have the following format:

Category: {{tracker type all lower case, this can be call, form, raw or custom}}
Action: {{submitted for all leads except call leads, which is called}}
Label: Sale {{Tracker name}}
Value: {{value entered when processing lead as sale}}

There are no Google Analytics events for leads that are processed and are not sales.

Note: the auto event tracker tracks on-site interactions in Google Analytics and are not counted as leads. You can see how these events are formatted in the auto event tracker documentation.

Use this to configure your Goals in Google Analytics. Once these are goals, you can them import them into Google Ads as conversions.

Google Ads conversions

To import your Google Analytics goals into Google Ads, you’ll need to make sure you’ve linked Google Ads and Google Analytics.

Once that’s done, you’ll need to follow these instructions to import your Google Analytics goals as conversions.

Viewing Keywords in Leadtosale

By default you can keywords that delivered calls in Google Analytics. In order to view the same keywords in Leadtosale or other CRM systems we recommend configuring your Google Ads account as follows.

In Google Ads go to Settings then Account Settings, make sure Auto-tagging is set to Yes and add the following Final URL Suffix under Tracking.

Auto tagging: Yes
Tracking: Final URL suffix: utm_source=google&utm_medium=cpc&utm_term={keyword}

Google Analytics features we do not support

We currently do not support:

  1. Named Google Analytics trackers.
  2. Renamed Google Analytics _ga cookies.

If you’d like us to support these features, send us a message in the chat.

Sending offline calls to Google Analytics

We do not send events for calls that aren’t matched to web visits by default, as they do not have client IDs (Google Analytics’ user identification mechanism).

Therefore, any events sent to Google Analytics will need a made up client ID, and this event will not be associated with any other web visit information.

To do this, you’ll need to set this up in Zapier as follows:

  1. Create a New lead trigger from Leadtosale. Check our Zapier article for more information on this.
  2. Create a filter that only matches call leads without a client ID (see image below).

Set up the POST action, and set:

  1. The URL to https://www.google-analytics.com/collect
  2. The payload type to Form
  3. The following data fields (the order of these do not matter):

v = 1
cid = whatever you want (we suggest using the Leadtosale lead ID - make this unique per call)
tid = your UA ID (e.g. UA-12345-1)
t = event
ec = your event category (only category is required)
ea = your event action
el = your event label
ev = your event value
cs = your utm_source (only source is required)
cm = your utm_medium
cn = your utm_campaign
ck = your utm_term
aip = 1 (anonymises the IP address so it doesn’t show Zapier’s server location - this is optional)

Make sure your filters aren’t stopping your event from being shown (e.g. hostname include filters).