Skip to content
Notifications
Clear all

Has anyone integrated Fathom with HubSpot for lead tracking?

1 Posts
1 Users
0 Reactions
29 Views
(@derekf)
Reputable Member
Joined: 3 months ago
Posts: 285
Topic starter   [#15933]

I've been conducting an analysis of lightweight analytics platforms for a client operating a content-heavy marketing site, with a core requirement being the ability to pass qualified lead intelligence directly into their HubSpot CRM. Fathom Analytics, with its focus on privacy and simplicity, is a strong contender. However, its documentation on server-side event integration with CRM platforms like HubSpot is less detailed than I'd prefer for a production implementation.

My primary question is whether anyone in the community has successfully engineered a bi-directional integration where Fathom events (e.g., video plays, form interactions, or custom goal completions) are used to create or update contact records and deals in HubSpot. I'm particularly interested in the architectural patterns and any gotchas encountered.

From my initial research, I see three potential pathways, and I'm seeking validation or critique of these approaches:

1. **Fathom's Webhooks + HubSpot Automation:** Utilizing Fathom's `goal_converted` webhook to send a JSON payload to a middleware service (e.g., a serverless function), which then maps the data to the HubSpot Contacts API (`POST /crm/v3/objects/contacts`).
```javascript
// Example of a potential Netlify/AWS Lambda function handler
exports.handler = async (event) => {
const fathomEvent = JSON.parse(event.body);
const hubspotContact = {
properties: {
email: fathomEvent.email, // If captured via a form
last_page_viewed: fathomEvent.url,
fathom_goal_name: fathomEvent.goalTitle,
hs_lead_status: "NEW"
}
};
// POST to HubSpot API
const response = await fetch(` https://api.hubapi.com/crm/v3/objects/contacts`, {
method: 'POST',
headers: { 'Authorization': `Bearer ${process.env.HUBSPOT_API_KEY}` },
body: JSON.stringify(hubspotContact)
});
return { statusCode: response.status, body: await response.text() };
};
```
*Concern:* This relies on capturing an email address within the Fathom goal, which may not always be feasible or compliant with our data collection policy.

2. **HubSpot Tracking Code Overlap:** Running both the HubSpot Tracking Code and Fathom script concurrently, using HubSpot's native `identify` and `track` methods for lead-associated events, while using Fathom solely for aggregate, anonymous traffic analytics. This seems redundant and could lead to data disparity.

3. **Reverse Integration via HubSpot Workflows:** Querying Fathom's API (`GET /sites/[site_id]/events`) periodically from within a HubSpot Custom Coded Action to pull in recent goal conversions and associate them with known contacts. This feels like the least real-time option and introduces complexity in deduplication.

The specific hurdles I'm trying to preempt are:
* Session unification between an anonymous Fathom session and a known HubSpot contact later in the journey.
* Data mapping consistency, especially for custom Fathom goals to HubSpot contact properties.
* Maintaining compliance with GDPR/CCPA when passing data between systems, given Fathom's positioning as a privacy-first tool.

Has anyone implemented any of these patterns, or perhaps a fourth, more elegant solution? I am particularly interested in any performance impact observations, the reliability of the webhook delivery, and how you've handled error logging and retries for failed HubSpot API calls.


No free lunch in cloud.


   
Quote