APIs & Integrations

LChiappini
Participant

Bringing Google Tag Manager's data layer variables into HubSpot

SOLVE

Hi all!

We are using Google Tag Manager on our website's acquisition funnel in order to bring some data into Google Analytics.

I'm wondering: can I bring these variables also inside defined HubSpot's custom properties?

 

For example:

- user A begings the onboarding funnel

- I have "procedureId" both on HubSpot's contact and in data layer on website: maybe I can use this one to match the user and bring other data in? i.e. gclid, amount request, etc

 

Many thanks!

Luca

0 Upvotes
1 Accepted solution
webdew
Solution
Guide | Diamond Partner
Guide | Diamond Partner

Bringing Google Tag Manager's data layer variables into HubSpot

SOLVE

Hi @LChiappini ,


- You can't add json / embed code into the custom properties. 
-If you want to add code via api then try with this JSON.stringify("{'id':'123', 'age' : 10}")

Or

GTM manager event :
window.HubSpotConversations.on('conversationStarted', payload => {
dataLayer.push({'event': 'hs_chat_started'});
});

Hope this helps!

If we were able to answer your query, kindly help the community by marking it as a solution.

Thanks and Regards. 

View solution in original post

6 Replies 6
Danylo
Member

Bringing Google Tag Manager's data layer variables into HubSpot

SOLVE

Hey there. We use our own developement - Google Tag Manager tag to track all the needed data and inject them into the non Hubspot form hidden fields (to be still tracked by HubSpot). Btw, if you want to track offline conversions/sales, than GA CID is by far not a single parameter you need to send to GA in order to bypass its filter as well as to send a correct IP (geo) or not a server, but a user.

0 Upvotes
webdew
Solution
Guide | Diamond Partner
Guide | Diamond Partner

Bringing Google Tag Manager's data layer variables into HubSpot

SOLVE

Hi @LChiappini ,


- You can't add json / embed code into the custom properties. 
-If you want to add code via api then try with this JSON.stringify("{'id':'123', 'age' : 10}")

Or

GTM manager event :
window.HubSpotConversations.on('conversationStarted', payload => {
dataLayer.push({'event': 'hs_chat_started'});
});

Hope this helps!

If we were able to answer your query, kindly help the community by marking it as a solution.

Thanks and Regards. 

Josh
Recognized Expert | Platinum Partner
Recognized Expert | Platinum Partner

Bringing Google Tag Manager's data layer variables into HubSpot

SOLVE

Hi @LChiappini,

 

I haven't attempted exactly what you're looking to do, but would a webhook work?

 

Thanks for the ping @dennisedson 

 

 




Did this post help solve your problem? If so, please mark it as a solution.

Josh Curcio

HubSpot support and inbound marketing for OEMs, contract manufacturers, and industrial suppliers.
HubSpot Platinum Partner & HubSpot Certified Trainer

LChiappini
Participant

Bringing Google Tag Manager's data layer variables into HubSpot

SOLVE

How can I use a webhook in this way?

0 Upvotes
LChiappini
Participant

Bringing Google Tag Manager's data layer variables into HubSpot

SOLVE

Hi guys, do you have any clues for me? 🙂

0 Upvotes
dennisedson
HubSpot Product Team
HubSpot Product Team

Bringing Google Tag Manager's data layer variables into HubSpot

SOLVE

@Josh , @Kevin-C  can either of you offer some tips here?

0 Upvotes