Skip to main content

Is there a way to use Google Analytics to track table views?

Hi @Steven_Kryger,

that’s really nice question. At the moment I don’t know if is there any ability like this. But for sure in front dev tools which use Airtable as a data base you can for sure.

Thanks


As @Dimitris_Goudis intimated, you must define “table views”. If it’s a view in an iFrame on a web page - yes, this is how to do it.

If it’s a view being perused by named users in the Airtable web client, you could encourage tracking analytics through some sort of innocuous action on records and cells. For example, a button that users are likely to click to see more information or perform some task would allow you to implement a tracking action that could send analytics to Google using its API.


As the others hinted, the feasibility depends on exactly how your "table views" are being consumed, but there are definitely solutions for both scenarios they mentioned.

For tracking views of an Airtable base embedded in an iframe on a webpage, you can often use the standard Google Analytics implementation already on that parent webpage, but to get specific data about interactions within the iframe, you may need to look into cross-domain tracking or firing specific events from the iframe content itself if you have control over the embedded code.

For tracking views within the Airtable web client by named users, this is where a server-side approach becomes necessary and is arguably the most robust long-term solution.

You can’t directly add the Google Tag Manager (GTM) container code to Airtable since it doesn't support hosting the GTM script.

However, you can use the Airtable API to trigger an action - perhaps a button click or a status change that users perform to indicate they've "viewed" the table or record, or even an automation that runs when a specific view is loaded or a field is updated.

This action can send data via a webhook to a server-side environment like Google Cloud Platform or a service like Stape, which hosts your server-side GTM container.

The combination of the Airtable API, server-side tracking via GTM, and a platform like Stape or Google Cloud Platform is a good solution because it decouples the tracking from the user's browser, making the data collection more reliable and resistant to browser-based tracking prevention.

The Airtable API acts as the data source, securely sending the interaction data (like the record ID, view name, user ID, etc.) to a server endpoint.

GTM, running server-side, then processes this incoming data and transforms it into the format required for Google Analytics 4 (GA4).

It can then send an event, such as a custom event named table_view, along with parameters like the table ID and user role, to the GA4 Data API.

This method ensures accurate, first-party data collection and provides far more control over the quality and privacy of the data being sent compared to traditional client-side tracking, allowing you to accurately track meaningful user actions within Airtable even though you can't host the GA tracking script there directly.

You could also use integration platforms like Make (formerly Integromat) or Tray as a bridge between the Airtable API webhook and the server-side GTM or the GA4 Data API, which can simplify the setup if you prefer a low-code approach.