hey

Thursday, June 23, 2016

How to Track Google Spreadsheet Views with Google Analytics

How to Track Google Spreadsheet Views with Google Analytics

you have got been using Google Analytics to song traffic (or page perspectives) on your internet site however did you already know that the equal analytics service can also be used for tracking perspectives interior Google Spreadsheets. You insert a touch snippet of monitoring code inner your spreadsheet and when a person opens the sheet, that visit will be recorded completely to your Google Analytics account

Google Analytics offers a JavaScript snippet that can be inserted into web templates for monitoring visits. You cannot insert JavaScript within the cells of a Google Spreadsheet but we will use the photo characteristic blended with a few Apps Script to allow tracking inside spreadsheet. The visit is recorded as an “event” and now not a “web page view” and thus your spreadsheet opens will no longer artificially inflate your Google Analytics reports.

To get began, visit your Google Analytics dashboard and make a notice of the Google Analytics monitoring identification that's a string like UA-12345-sixty seven. This web tutorial explains how you can discover the id internal your Analytics dashboard.

Now open any Google Spreadsheet which you desire to tune and go to tools, Script Editor and copy-paste the following code. that is a custom Google Spreadsheet characteristic so that it will embed the 1×1 monitoring GIF photo in our spreadsheets.

/**
 * song Spreadsheet views with Google Analytics
 *
 * @param string gaaccount Google Analytics Account like UA-1234-56.
 * @param string spreadsheet name of the Google Spreadsheet.
 * @param string sheetname name of character Google Sheet.
 * @return The 1x1 monitoring GIF picture
 * @customfunction
 */

characteristic GOOGLEANALYTICS(gaaccount, spreadsheet, sheetname)
 
  /**
  * Written by way of Amit Agarwal
  * web: www.ctrlq.org
  * email "Sheet")
  ].be a part of("");
 
  go back imageURL;



store the code, close the Apps Script editor window and go back to the spreadsheet.

click on an empty cell and insert the subsequent system. The mobile may be blank however it includes an embedded photograph. you could need to alternate the heritage color so it is easy to parent out which cell within the spreadsheet includes the monitoring formulation.

The GOOGLEANALYTICS() formula takes three parameters – the analytics id, the spreadsheet call and the sheet name. This helps in case you would like to one by one tune character sheets internal a spreadsheet.

Now open the spreadsheet in a new browser window and visit Google Analytics, actual Time, assessment to check if the tracking is working. it is able to occasionally take a minute to file the go to. if you would really like to peer all the visits, visit conduct – events – overview and click at the Google Spreadsheets category.
The tracking would work even if the person has enabled ad blockading and that’s because Google Spreadsheets, like Gmail, serves photos thru a proxy server. The drawback is that you will in no way know the area of the traveller because all visits will be display up as u.s.a. (the region of Google servers)

No comments:

Post a Comment