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.
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="ga('send', 'pageview', '{{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.
Comments
11 comments
Hello, could you please give an example and show how it must be displayed in the datasheet and the template sheet: where to paste the code (new column ?) and which keyword to add in the parameter line n°2 of the datasheet? Thank you
Hello Francine,
Actually, you just need to apply the code below in your template sheet.
It is not mandatory to use a template sheet with Awesome Table but you can use it if you want to enhance and customize your view.
Here is an article that could be useful in your case. For example, the template sheet in this example allows you to understand how to use a "<a href=""> </a>" attribute.
Kind regards,
Thomas
I am using the one of the Templates provided by awesome sheets as was wonder if this looks correct. In my tempate i have
<div class="{{Brand}} content">
<a href="{{Url}}" target="_top" onclick="ga('send', 'pageview', '{{URL to track}}');">
<div class="date">{{Release Date}}</div>
<div class="search">{{Search}}</div>
<div class="description">{{Description}}</div>
</a>
</div>
So all the content inside that Brand div is the link.
example of a link is
http://app.kravet.com/emails/curated-kravet/ExploreCurated-January2019.htm
I have that in a column labeled Url. Im just confused with the Url to Track part. Do i need to make another column name URL to track and put the urls in there again?
Hello Orly Tandazo,
The "URL" column is where you want your users to go.
The "URL to Track" column is the data you want to send to your Google Analytics. Let's take an example:
If you have a website (yourwebsite.com) with a home page displaying an Awesome Table and with a bunch of pages like "yourwebsite.com/profile" or "yourwebsite.com/contact". It can often be practical to just send "/profile" or "/contact" to Analytics as it can make it easier to analyze in the dashboard.
If you do not mind sending the whole URL, you can just use this code:
Please let me know if I was not clear enough.
Nicolas
Thanks, that makes sense. For the Google Analytics Tracking Code I just put in our ID there correct? I have multiple awesome tables that i will be using. Will that code just be the same for all of them or do i need a different one for each table?
Hello Orly Tandazo,
If you use one specific ID for each of your views, it will allow you to know specific information about one view. Otherwise, your analytics will track this same information for all of your views.
Thank you.
Thomas
Hello, will it track general usage of awesome table views?
For instance if we link to an url like this: https://view-awesome-table.com/AT-ID-HERE/view
I know it is a completely different domain from our website and different analytics js.
So as far as i tested it can not send pageviews(just browsing the url) to our google analytics property for just displaying the url.
Will it be possible in anyway eventually?
Also Thanks for a great product!
Best regards
Thomas Nielsen
Hello D-S Marketing,
This is not possible right now.
Feel free to add this to our feature request page.
Nicolas
Hi Nicolas,
Thanks for quick response.
That is okay, did not think it would be possible, just wanted to hear :-)
I just added a feature request.
Thanks,
Is it possible to track user ID with this as well?
Hi Tom,
For now, it is not possible on Awesome Table to do such tracking.
Thanks for your understanding
Please sign in to leave a comment.