You can connect your Awesome Table with Google Analytics to keep track of your app's usage. In this article, you will learn how to update Analytics whenever a user clicks a link.
warning On July 1, 2023, Universal Analytics will stop processing data. If you still rely on it, we recommend that you upgrade to Google Analytics 4. Learn more
info For already configured apps, you can simply update a Universal Analytics Tracking ID to a Google Analytics 4 Tracking ID in the app settings without needing to make changes to your spreadsheet template.
In the settings tab, make sure you specify your Google Analytics Tracking ID.
Now in your templates, write the links to track with the following syntax:
<a href="{{Url}}" onclick="gtag('event', 'pageview', {page_location: '{{URL to track}}',
});">
{{Link Text}}
</a>
Markers:
- {{Url}}
The header of the column containing the URL - {{URL to track}}
The header of the column containing the partial URL you want to record in Google Analytics. For example if you want your viewers to download http://www.example.com/files/download.zip you can use the partial URL: /files/download.zip - {{Link Text}}
The header of the column containing the link text.
info Learn more: Header templates.
Previous Universal Analytics code (deprecated)
<a href="{{Url}}" onclick="ga('send', 'pageview', '{{URL to track}}');">
{{Link Text}}
</a>