Tracking Google Ads And Facebook Ads ROAS with Custom Form
SOLVE
What do I need to do for HubSpot to track ROAS from leads generated from Google Search ads or Facebook ads from a custom website form?
Currently I have the form setup to send our sales team the lead info and create a contact in the HubSpot CRM. We also have Google Tag Manager/Facebook Pixel sucsessfully setup and tracking conversions, but they are not reporting revenue from closed deals. I also have HubSpot tracking installed on the website as well. I can easily grab the Google gclid, but where exactly do I send that in the HubSpot CRM so it can calculate ROAS?
I'd like to clarify that I can NOT use HubSpot Forms and I do not want information about lead ads for Facebook and Google. This is for our custom configurator form. I cannot seem to find any documentation on where to send it in your system or what field to attach it to for contacts.
May 22, 20244:26 AM - edited May 23, 20246:05 PM
Member
Tracking Google Ads And Facebook Ads ROAS with Custom Form
SOLVE
Once I was in a similar situation, trying to connect all the dots between Google Search ads, Facebook ads, and HubSpot CRM.
What really helped me was exploring Google Data Studio. It's like having a magic wand that brings all your data together in one place, making it easier to analyze and draw insights. You can customize your reports to include metrics like revenue from closed deals, and even integrate HubSpot CRM data seamlessly.
So, my suggestion would be to dive into Google Data Studio and see how you can leverage it to track ROAS effectively. It might just be the missing piece of the puzzle you've been searching for!
Tracking Google Ads And Facebook Ads ROAS with Custom Form
SOLVE
That's a very common and challenging scenario when moving away from native form solutions and wanting server-side closed-loop reporting, but it's completely achievable.
The key to attributing the revenue in HubSpot for Google Ads is a default contact property called Google Ad Click ID, which has an internal property name of "hs_google_click_id" and is where you need to send the gclid.
For Facebook, there is no default property, so you'll need a custom single-line text contact property to store the Facebook Click ID ("fbclid") – something like "Facebook Ad Click ID" with an internal name like fbclid.
Since you are using a custom form and are already using a custom API to create the contact in HubSpot, the solution is to expand what data you pass in that API call.
When the user lands on your site from an ad, you need to use JavaScript to capture the "gclid" and the "fbclid" (if present) from the URL and store them securely, typically in a first-party cookie or local storage, to ensure they persist until the form submission.
Then, when the custom configurator form is submitted, your custom API endpoint needs to retrieve these stored IDs and include them in the JSON payload sent to the HubSpot Contacts API, mapping them directly to the appropriate property names: the "gclid" goes to "hs_google_click_id" and the "fbclid" goes to your custom property's internal name.
Once the deal is marked as "Closed-Won" and has a revenue value in HubSpot, the native integrations or an advanced solution will use that stored ID to attribute the revenue back to the original ad click for ROAS calculation.
Regarding a robust solution, the combination of Google Ads API + Facebook Conversions API + HubSpot API + Google Analytics Data API + a server-side solution like Stape or Google Cloud Platform offers the most accurate, reliable, and future-proof tracking, especially for calculating ROAS from closed deals.
The main advantage is that it shifts conversion tracking from the user's browser (client-side) to your server (server-side).
This bypasses browser-level limitations like ad-blockers, Intelligent Tracking Prevention (ITP) on Safari, and cookie expiration issues that often result in under-reporting revenue.
Here’s why that combination is so effective: the HubSpot API is used to send the "gclid" and "fbclid", along with an identifying piece of information like the lead’s email, directly into the HubSpot contact record, as you are planning.
When a deal closes, the HubSpot API can also be used to detect that "Closed-Won" event and grab the associated revenue and the attribution IDs (gclid, fbclid).
Your server-side solution (like Stape or Google Cloud Platform) then takes this server-side "Closed-Won" event data and uses the Google Ads API for "Offline Conversion Imports" and the Facebook Conversions API to send a server-side conversion event (like Purchase or Lead) with the exact ad-click ID and the revenue amount.
This method ensures maximum data accuracy because it's based on your definitive CRM data, not a fallible browser event.
Finally, the Google Analytics Data API can be used to pull comprehensive attribution and performance data into a unified reporting dashboard, giving you a complete, de-duplicated view of your ROAS across all channels based on the most reliable source: your closed-won revenue in the HubSpot CRM.
May 22, 20244:26 AM - edited May 23, 20246:05 PM
Member
Tracking Google Ads And Facebook Ads ROAS with Custom Form
SOLVE
Once I was in a similar situation, trying to connect all the dots between Google Search ads, Facebook ads, and HubSpot CRM.
What really helped me was exploring Google Data Studio. It's like having a magic wand that brings all your data together in one place, making it easier to analyze and draw insights. You can customize your reports to include metrics like revenue from closed deals, and even integrate HubSpot CRM data seamlessly.
So, my suggestion would be to dive into Google Data Studio and see how you can leverage it to track ROAS effectively. It might just be the missing piece of the puzzle you've been searching for!
Tracking Google Ads And Facebook Ads ROAS with Custom Form
SOLVE
Hey just touching base on this - @PamCotton do you have any insight into that last part about creating a custom report to calculate ROAS? The rest is setup, live and working.
Tracking Google Ads And Facebook Ads ROAS with Custom Form
SOLVE
Hey @TCarp21 thank you for posting in our Community!
Please make sure that your custom website form captures UTM parameters from the URLs of visitors coming from Google Search ads or Facebook ads. This includes parameters like utm_source, utm_medium, utm_campaign, and utm_term. In addition to capturing UTM parameters, you'll also need to capture the Google Click Identifier (gclid) for visitors coming from Google Search ads. This identifier helps in attributing conversions back to specific ad clicks.
In your HubSpot account, create custom contact properties to store the captured UTM parameters and gclid. These properties will be used to track the lead source and attribute revenue back to specific ad campaigns. After you can set up workflows to associate the captured UTM parameters and gclid with the corresponding contacts. This can be done based on form submissions or other triggers.
Once the information is associated with contacts, you can use custom reporting to calculate ROAS. This involves analyzing the revenue generated from closed deals attributed to specific ad campaigns and dividing it by the ad spend.
Tracking Google Ads And Facebook Ads ROAS with Custom Form
SOLVE
Hey! Thank you so much for your reply.
I have those custom properties setup for Contacts now and have confirimed it's passing the relevant parameters to the custom properties.
My last question is about the custom reporting to calculate ROAS: I keep looking through the HubSpot documentation and this help community and I can't find any information about this. Can you send me a link or give me a general overview on how to accomplish this?