Marketing Integrations

ONagel
Participant

Can Hubspot send event data back to ad networks (FB, Google Ads, LI)?

SOLVE

 

Hey there, 

So we've been updating our analytics in Hubspot, and I have a question. 

We run Facebook ads, Google ads, and LinkedIn Ads and I'd like to track pageviews and form submissions in two places: 

  1. HubSpot. It seems the native integration allows us to see pageviews and form submissions in HubSpot.
  2. Ad Networks (LinkedIn, Facebook, Google Ads). Let's say a user clicks an ad on Facebook, goes to a Hubspot landing page and fills in the form submission. Is this event sent back to Facebook? This way their algorithm can optimize around on-page conversions. Likewise with Google ads and LinkedIn Ads? Is there a way to solve this without setting up Google Tag Manager? 

Thank you!

0 Upvotes
1 Accepted solution
Leonard0
Solution
Contributor | Diamond Partner
Contributor | Diamond Partner

Can Hubspot send event data back to ad networks (FB, Google Ads, LI)?

SOLVE

Hi @ONagel ,

 

Tag Manager would make this a lot easier, just curious, why don't you want to use GTM?

 

You can send events to FB whenever you want without GTM if you use Javascript and/or HUBL. If you want to sent an event to FB, you could use HUBL for example. Add it to the head of your template: 

 

{% if request.full_url is string_containing "thank-you" %}

fbq('track', 'Purchase', {currency: "USD", value: 30.00});

{% endif %}

 

If you want to use javascript, see below:

<script type="text/javascript">
  window.addEventListener("message", function(event) {
    if(event.data.type === 'hsFormCallback' && event.data.eventName === 'onFormSubmitted') {
        var formID = event.data.id;

        if formID === '84933483-43-34344' {
          fbq('track', 'Purchase', {currency: "USD", value: 30.00});
        }


      });
    }
  });
</script>

 

Of course, you could combine both as well. If a form should only be tracked if it's on the contact page but it's on multiple pages.

 

I hope this helps or inspires you, if so, please mark as a solution.



Did my answer solve your issue? Help the community by marking it as the solution.

View solution in original post

9 Replies 9
SSamandary
Member

Can Hubspot send event data back to ad networks (FB, Google Ads, LI)?

SOLVE

Thanks a lot 

0 Upvotes
Aakar
Key Advisor

Can Hubspot send event data back to ad networks (FB, Google Ads, LI)?

SOLVE

@ONagel Were you referring to conversion tracking? Have you used Events in HubSpot? It's in Marketing inside Ads: Marketing > Ads > Events. You can create an event and pass that data back to the Ads platform. 

We have been using this feature to pass the data back to Google Ads, which helps optimize the campaign & conversion. 

Thanks.

Aakar Anil
Marketing Technologist
aakar.me | @aakarpost | in/aakarpost
karstenkoehler
Hall of Famer | Partner
Hall of Famer | Partner

Can Hubspot send event data back to ad networks (FB, Google Ads, LI)?

SOLVE

Hi @ONagel,

 

Google Tag Manager is not needed here but you would have to install pixels from the ad networks, you can find the documentation here: https://knowledge.hubspot.com/ads/install-pixels-from-external-ad-networks

 

Hope this helps!

Karsten Köhler
HubSpot Freelancer | RevOps & CRM Consultant | Community Hall of Famer

Beratungstermin mit Karsten vereinbaren

 

Did my post help answer your query? Help the community by marking it as a solution.

ONagel
Participant

Can Hubspot send event data back to ad networks (FB, Google Ads, LI)?

SOLVE

Sorry, my initial post wasn't clear enough. I revised it to make it clearer. Feel free to take a look at the revised post and I'd be curious to hear what you think. Essentially, I would like to send form submission data BACK to the ad networks. How is this achieved without using Google Tag Manager? 

0 Upvotes
Leonard0
Solution
Contributor | Diamond Partner
Contributor | Diamond Partner

Can Hubspot send event data back to ad networks (FB, Google Ads, LI)?

SOLVE

Hi @ONagel ,

 

Tag Manager would make this a lot easier, just curious, why don't you want to use GTM?

 

You can send events to FB whenever you want without GTM if you use Javascript and/or HUBL. If you want to sent an event to FB, you could use HUBL for example. Add it to the head of your template: 

 

{% if request.full_url is string_containing "thank-you" %}

fbq('track', 'Purchase', {currency: "USD", value: 30.00});

{% endif %}

 

If you want to use javascript, see below:

<script type="text/javascript">
  window.addEventListener("message", function(event) {
    if(event.data.type === 'hsFormCallback' && event.data.eventName === 'onFormSubmitted') {
        var formID = event.data.id;

        if formID === '84933483-43-34344' {
          fbq('track', 'Purchase', {currency: "USD", value: 30.00});
        }


      });
    }
  });
</script>

 

Of course, you could combine both as well. If a form should only be tracked if it's on the contact page but it's on multiple pages.

 

I hope this helps or inspires you, if so, please mark as a solution.



Did my answer solve your issue? Help the community by marking it as the solution.

ONagel
Participant

Can Hubspot send event data back to ad networks (FB, Google Ads, LI)?

SOLVE

Thank you, this is very helpful!

 

Out of curiosity do you know how to implement a solution WITH Google Tag Manager? 

0 Upvotes
Leonard0
Contributor | Diamond Partner
Contributor | Diamond Partner

Can Hubspot send event data back to ad networks (FB, Google Ads, LI)?

SOLVE

Great! Yes, most of the time I use GTM so I can manage everything at one place, I can easily re-use tags and triggers for multiple websites and it's more structured. 

 

After form submission there are multiple options in GTM. You could use the build in GTM 'form submission' trigger. But you should test if it works. You could track build-in  (thank-you) page views as wel. But what I always do is fire a form listener on every page view. If a submission if fired with a certain ID, then a marketing tag is being fired. If you want to track a form submission, you could use the same trigger and send the information to FB, LI and G-ADS in multiple tags.



Did my answer solve your issue? Help the community by marking it as the solution.

ONagel
Participant

Can Hubspot send event data back to ad networks (FB, Google Ads, LI)?

SOLVE

Thank you!

 

Out of curiosity then, how do you navigate the Facebook Conversion API? Do you have it set up with HubSpot or exclusively with Google Tag Manager? https://knowledge.hubspot.com/ads/share-event-and-website-data-with-facebook-with-the-conversions-ap... 

0 Upvotes
Leonard0
Contributor | Diamond Partner
Contributor | Diamond Partner

Can Hubspot send event data back to ad networks (FB, Google Ads, LI)?

SOLVE

If it's possible to do natively, then I try to do it in Hubspot. The exeptions are integrations like GA3, GA4 and Tagmanager. Because they all are labeled as marketing cookies and executed after marketing consent. I also send a lot of events to GA so I want to cluster it in GTM. Conversion tags for ad networks are also done in GTM because it's not easy to do in Hubspot alone. Events like specific form submissions, chat, calendar and so on. 

 

I connected G-Ads, LI and FB in Hubspot, just like the pixels. They need to be executed before the listener, otherwise JS would throw an error that 'fbq' is undefined.

 

It's quite a while ago, so I'm not sure if it works with this setup, I haven't tested it recently.



Did my answer solve your issue? Help the community by marking it as the solution.

0 Upvotes