How to track a specific link with Google Analytics?

Follow

Comments

9 comments

  • Avatar
    Francine Claustre

    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

    0
    Comment actions Permalink
  • Avatar
    Awesome Table

    Hello Francine,

    Actually, you just need to apply the code below in your template sheet. 

    <a href="{{Url}}" onclick="ga('send', 'pageview', '{{URL to track}}');">
    {{Link Text}}
    </a>

    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

     

    0
    Comment actions Permalink
  • Avatar
    Orly Tandazo

    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?

     

     

    0
    Comment actions Permalink
  • Avatar
    Nicolas Gauvin

    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:

    <div class="{{Brand}} content">
    <a href="{{Url}}" target="_top" onclick="ga('send', 'pageview', '{{URL}}');">
    <div class="date">{{Release Date}}</div>
    <div class="search">{{Search}}</div>
    <div class="description">{{Description}}</div>
    </a>
    </div>

    Please let me know if I was not clear enough.

    Nicolas

    1
    Comment actions Permalink
  • Avatar
    Orly Tandazo

    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?

    0
    Comment actions Permalink
  • Avatar
    Thomas Morin

    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

    0
    Comment actions Permalink
  • Avatar
    D-S Marketing

    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

    0
    Comment actions Permalink
  • Avatar
    Nicolas Gauvin

    Hello D-S Marketing,

    This is not possible right now.

    Feel free to add this to our feature request page.

    Nicolas

    0
    Comment actions Permalink
  • Avatar
    D-S Marketing

    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,

    0
    Comment actions Permalink

Please sign in to leave a comment.