# Google Analytics Connector

**URL:** <https://community.hubspot.com/t/google-analytics-connector/12017>\
**Category:** APIs & Integrations\
**Tags:** developer-tools\
**Created:** [October 10, 2018, 4:53am UTC](https://community.hubspot.com/t/google-analytics-connector/12017 "2018-10-10T04:53:13Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/system/32/124_2.png) [@system](https://community.hubspot.com/u/system)\
**Post date:** [October 10, 2018, 4:53am UTC](https://community.hubspot.com/t/google-analytics-connector/12017/1 "2018-10-10T04:53:13Z")

</div>

Hi all,

We work for a digital marketing agency and a lot of our clients and ourselves use HubSpot.

Does anyone have the answer to the “holy grail” that is end to end tracking with the end outcome being a sale within Google Analytics?

At the moment we can track:

User clicks paid ad  
Goes to website  
Fills out form  
Lead generated in CRM (name, number, email, channel) - can we track keyword or ad?  
Lead generated in Google Analytics and therefore in the marketing platform e.g. Adwords

That’s it … up to a marketing qualified lead, this is all we can optimise for, whether it’s good or bad.

Once the lead turns into a sale we can see this in the CRM but not Google Analytics or any marketing platform (whichever the lead was generated from)

What we need is a CRM - Google Analytics API (connector) that can push a sale from the CRM into Analytics.

I have been doing some digging and it looks like Measurement Protocol could be a way forward? Capturing the unique user CID

![](https://d2qpr2jzcazej7.cloudfront.net/original/3X/6/4/640d0438c07387f9987491e75ff2a26fcdf23a82.jpeg) [UpBuild – 7 Jun 17](https://www.upbuild.io/blog/crm-data-google-analytics-measurement-protocol/#comments)

 ![c50bf9aa2eaac489bd00acdc2b9bcfccd4540dfe.jpeg](https://d2qpr2jzcazej7.cloudfront.net/original/3X/8/7/87575b0eb9d7b76a01e4edeb0269f643b54c8a40.jpeg)

### [Inject CRM Data into Google Analytics w/Measurement Protocol | UpBuild](https://www.upbuild.io/blog/crm-data-google-analytics-measurement-protocol/#comments)

Integrating CRM data with Google Analytics is the “Holy Grail” of web analytics. Here’s how to make that dream a reality using the Measurement Protocol.

I believe this is a headache for everyone, has it been solved yet? If so how?

Thanks,

Colin

---

<div class="post-metadata">

**Author:** ![system](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/system/32/124_2.png) [@system](https://community.hubspot.com/u/system)\
**Post date:** [October 10, 2018, 11:05am UTC](https://community.hubspot.com/t/google-analytics-connector/12017/2 "2018-10-10T11:05:14Z")

</div>

Hey Colin,

I think the easy answer for this is to get the Google Ads upgrade for HubSpot.

 ![](https://d2qpr2jzcazej7.cloudfront.net/original/3X/7/1/712386564286833e709734f195bd99e24b93819a.png) [hubspot.com](https://www.hubspot.com/products/marketing/ads)

### [Start Tracking Ads Today | HubSpot Marketing Software](https://www.hubspot.com/products/marketing/ads)

The easiest way to create, measure and leverage ads for inbound marketing.

Have you looked into that product? I think it’d meet your needs and save you the hassle of jumping in and out of GA.

Nick

---

<div class="post-metadata">

**Author:** ![system](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/system/32/124_2.png) [@system](https://community.hubspot.com/u/system)\
**Post date:** [October 10, 2018, 10:26pm UTC](https://community.hubspot.com/t/google-analytics-connector/12017/3 "2018-10-10T22:26:02Z")

</div>

Hi Nick,

Thanks for this idea but it wouldn’t work.

We need outcomes within the marketing platforms themselves so that the platform AI can optimise towards conversions.

The only way to do this getting the outcome within Analytics so that we can then set it up as a conversion within the marketing platforms.

Thanks,

Colin

---

<div class="post-metadata">

**Author:** ![IsaacTakushi](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/isaactakushi/32/70387_2.png) [@IsaacTakushi](https://community.hubspot.com/u/IsaacTakushi)\
**Post date:** [October 12, 2018, 12:47pm UTC](https://community.hubspot.com/t/google-analytics-connector/12017/4 "2018-10-12T12:47:37Z")

</div>

Hi [@Colin.W](https://community.hubspot.com/u/colin.w),

As [@NickMontagu](https://community.hubspot.com/u/nickmontagu) notes, HubSpot can certainly track visitors eventually converting to customers, but involving Google Analytics does complicate matters.

A few other users have worked on this challenge and claim to be able to capture the GA `clientId` most of the time. Have you reviewed [this topic](https://integrate.hubspot.com/t/is-the-google-anaytics-client-id-in-hubspot-somewhere/4802) and [this topic](https://integrate.hubspot.com/t/how-to-get-client-id-through-a-hidden-field-in-a-hubspot-form/10772)?

---

<div class="post-metadata">

**Author:** ![system](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/system/32/124_2.png) [@system](https://community.hubspot.com/u/system)\
**Post date:** [October 14, 2018, 11:45pm UTC](https://community.hubspot.com/t/google-analytics-connector/12017/5 "2018-10-14T23:45:29Z")

</div>

Hi Isaac,

Thanks for this, that explains how to get the client ID from a form, this then will need to go into Hubspot itself.

The next bit is the hard bit, once a sale has been completed how to then push that client id into Google Analytics?

Thanks again,

Colin

---

<div class="post-metadata">

**Author:** ![IsaacTakushi](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/isaactakushi/32/70387_2.png) [@IsaacTakushi](https://community.hubspot.com/u/IsaacTakushi)\
**Post date:** [October 15, 2018, 1:28pm UTC](https://community.hubspot.com/t/google-analytics-connector/12017/6 "2018-10-15T13:28:40Z")

</div>

Hi [@Colin.W](https://community.hubspot.com/u/colin.w),

You could get this data _out_ of HubSpot by using either the [Contacts API](https://developers.hubspot.com/docs/methods/contacts/contacts-overview), the [Contact Lists API](https://developers.hubspot.com/docs/methods/lists/get_list_contacts) (e.g. pulling an [active list](https://knowledge.hubspot.com/articles/kcs_article/lists/create-active-or-static-lists) of all customers with a `clientId` value), or a [workflow webhook](https://knowledge.hubspot.com/articles/kcs_article/workflows/how-do-i-use-webhooks-with-hubspot-workflows) (`POST`ing the data of enrolled contacts to one of your own endpoints).

You could then parse and format the data as needed before sending it into Google Analytics with their [Measurement Protocol](https://developers.google.com/analytics/devguides/collection/protocol/v1/). The [Google Analytics Solutions Community](https://www.en.advertisercommunity.com/t5/Google-Analytics/ct-p/analytics_category) will be your best resource regarding more specific implementation questions regarding Measurement Protocol.

---

<div class="post-metadata">

**Author:** ![system](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/system/32/124_2.png) [@system](https://community.hubspot.com/u/system)\
**Post date:** [October 15, 2018, 9:48pm UTC](https://community.hubspot.com/t/google-analytics-connector/12017/7 "2018-10-15T21:48:46Z")

</div>

Thanks for this Isaac,

We decided to a test internally on a test site, using our own forms and database. Once end to end has been achieved and works we are then going to test on Hubspot and our own website.

Thanks for the help.

---

<div class="post-metadata">

**Author:** ![lquessenberry](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/lquessenberry/32/27794_2.png) [@lquessenberry](https://community.hubspot.com/u/lquessenberry)\
**Post date:** [August 31, 2020, 6:51pm UTC](https://community.hubspot.com/t/google-analytics-connector/12017/8 "2020-08-31T18:51:37Z")

</div>

Is this working now? I would love to know what you did.

---

<div class="post-metadata">

**Author:** ![ralphioooo](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/ralphioooo/32/48852_2.png) [@ralphioooo](https://community.hubspot.com/u/ralphioooo)\
**Post date:** [September 15, 2020, 9:50pm UTC](https://community.hubspot.com/t/google-analytics-connector/12017/9 "2020-09-15T21:50:47Z")

</div>

We have just created a HubSpot APP called Analytics Amplifier that helps you do this + push offline events to Google Analytics when they happen.

Check it out here:

> **[HubSpot Marketplace](https://ecosystem.hubspot.com/marketplace/apps/marketing/analytics-data/google-analytics-amplifier-222008)**

---

<div class="post-metadata">

**Author:** ![Danylo](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/danylo/32/43872_2.png) [@Danylo](https://community.hubspot.com/u/Danylo)\
**Post date:** [September 30, 2021, 11:22am UTC](https://community.hubspot.com/t/google-analytics-connector/12017/10 "2021-09-30T11:22:05Z")

</div>

Hey. If you’re about to track offline sales and/or offline conversions in GA, the CID field is by far not a single one you need to track to bypass GA filter as well as to send a proper GEO of a user, not a server. We’ve created custom Google Tag Manager tag to inject GA CID and all the rest needed hidden form fields into Non Hubspot Forms, that can be still tracked by HubSpot. Than you need to just use connector (Zapier fails to to it preperly) for sending offline even to GA with all the contact data.

---

<div class="post-metadata">

**Author:** ![ralphioooo](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/ralphioooo/32/48852_2.png) [@ralphioooo](https://community.hubspot.com/u/ralphioooo)\
**Post date:** [September 30, 2021, 8:15pm UTC](https://community.hubspot.com/t/google-analytics-connector/12017/11 "2021-09-30T20:15:54Z")

</div>

@Danylo would you mind sharing your GTM tag ? Keen to see how that works.

---

<div class="post-metadata">

**Author:** ![Danylo](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/danylo/32/43872_2.png) [@Danylo](https://community.hubspot.com/u/Danylo)\
**Post date:** [September 30, 2021, 8:38pm UTC](https://community.hubspot.com/t/google-analytics-connector/12017/12 "2021-09-30T20:38:54Z")

</div>

Well, @ralphioooo, as far as I understand your AnalyticsApplifier does almost the same, but costs $50/month. Not sure if I want to improve your commercial product for free or w/o any interest. However both you and direct HubSpot clients are welcome to DM me, if any potential cooperation is possible.

---

<div class="post-metadata">

**Author:** ![ralphioooo](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/ralphioooo/32/48852_2.png) [@ralphioooo](https://community.hubspot.com/u/ralphioooo)\
**Post date:** [September 30, 2021, 9:02pm UTC](https://community.hubspot.com/t/google-analytics-connector/12017/13 "2021-09-30T21:02:56Z")

</div>

@Danylo fair enough.  
We already have a non-HS sollution but yours sounded like a neat way to approach it.
