src/extensions/appscript-extension.js
/**
   * Get tracking URL with event to Google Analytics
   * @param  {type} spreadsheetId description
   * @param  {type} action     description
   * @param  {type} label      description
   * @return {type}             description
   */
Get tracking URL with event to Google Analytics
@param  {type} spreadsheetId description
@param  {type} action     description
@param  {type} label      description
@return {type}             description
Get tracking URL with event to Google Analytics @param { type } spreadsheetId description @param { type } action description @param { type } label description @return { type } description
gaEventURL(spreadsheetId, action, label) {
    var cacheBuster = Math.round(Date.now() / 1000).toString();
    let clientEmail = this.clientEmail;
    var eventCategory =
        encodeURIComponent(spreadsheetId || 'Unknown Google Spreadsheets');
    var eventAction = encodeURIComponent(action || 'Unknown Action');
    var eventLabel = encodeURIComponent(label || 'Unknown Label');
    var trackingUrl = [
      'https://ssl.google-analytics.com/collect?',
      'v=1',
      't=event',
      'tid=' + this.gaAccount,
      'cid=' + clientEmail,
      'uid=' + clientEmail,
      'z=' + cacheBuster,
      'ec=' + eventCategory,
      'ea=' + eventAction,
      'el=' + eventLabel
    ].join('&');
    return trackingUrl;
  }
gaEventURL ( spreadsheetId , action , label ) { var cacheBuster = Math . round ( Date . now ( ) / 1000 ) . toString ( ) ; let clientEmail = this . clientEmail ; var eventCategory = encodeURIComponent ( spreadsheetId || 'Unknown Google Spreadsheets' ) ; var eventAction = encodeURIComponent ( action || 'Unknown Action' ) ; var eventLabel = encodeURIComponent ( label || 'Unknown Label' ) ; var trackingUrl = [ 'https://ssl.google-analytics.com/collect?' , 'v=1' , 't=event' , 'tid=' + this . gaAccount , 'cid=' + clientEmail , 'uid=' + clientEmail , 'z=' + cacheBuster , 'ec=' + eventCategory , 'ea=' + eventAction , 'el=' + eventLabel ] . join ( '&' ) ; return trackingUrl ; }
Get tracking URL with event to Google Analytics
 @param  {type} spreadsheetId description
 @param  {type} action     description
 @param  {type} label      description
 @return {type}             description
Get tracking URL with event to Google Analytics @param { type } spreadsheetId description @param { type } action description @param { type } label description @return { type } description
// Random ID to prevent browser caching. // Event Category set to Google Spreadsheets. // Set event action as functions, like runTest, amountBatchAutoTests, etc. // Set label as tested URLs