Web App Metrics
with
Google Analytics
Romain Vialard
Product Manager, Revevol - Google Developer Expert
YetAnotherMailMerge
An example with...
Email campaigns with Gmail and Google Sheets
Key numbers
�Total number of installations: 600K+
�Monthly Active Users: 80K+
Monthly nb of emails sent: 40M+�
Preview of YAMM interface
Analytics set-up
Usage - what should we track?
Google Analytics - from web sites to web apps
On web sites you mainly track page views
On web apps you mainly track events
Compare usage month-over-month
Campaigns
Emails sent
Emails sent / campaign
Many reports available: eg. Geo
By emails sent
… or by users
Sending events to Google Analytics 1/3
ga('send', 'event', 'Add-on installed', 'First campaign sent');
ga('send', {
hitType: 'event',
eventCategory: 'Add-on installed',
eventAction: 'First campaign sent'
});
All parameters available when sending data to GA
Sending events to Google Analytics 2/3
ga('send', {
hitType:'event',
eventCategory:'Email_Sent',
eventAction:'Standard',
eventLabel:'',
eventValue:DATA.nbOfEmailsSent,
dimension5:DATA.trackEmail,
dimension6:(DATA.chosenAttachmentColumn) ? 'true' :'false',
dimension7:DATA.selectedDraftSize,
dimension9:DATA.overallMXStatus,
dimension10:DATA.spf_found,
dimension13:DATA.selectedDraftId,
dimension15:DATA.templateHasMarkers,
metric1:DATA.nbOfEmailsSent,
metric2:DATA.nbOfRecipients
});
This send command uses custom dimensions & metrics fields that we will see later on
Sending events to Google Analytics 2/3
function google_analytics() {
var payload = {};
payload.v = '1'; // version
payload.tid = 'UA-88349571-1'; // Tracking ID
payload.cid = Session.getTemporaryActiveUserKey(); // Client ID (cookie)
payload.z = Math.floor(Math.random()*10E7); // Cache Buster
payload.t = 'event';
payload.ec = 'Campaign';
payload.ea = 'Email sent';
payload.el = '';
var options = {
'method' : 'post',
'payload' : payload
};
UrlFetchApp.fetch('https://ssl.google-analytics.com/collect', options);
}
Sending events from server side with UrlFetch
Track user growth & behavior
User growth / Monthly Active Users (MAU)
+38%
Monthly Active Users �between January & September 2016
See all actions for a single user...
User install the app
Lists recipients
Start sending emails
… and reach free quota
… or monitor common behavior
30% install but don’t do anything after
Client vs User ID
A unique identifier In order for Google Analytics to determine that two distinct hits belong to the same user, a unique identifier, associated with that particular user, must be sent with each hit. Visits and user are associated The analytics.js library accomplishes this via the client ID field, a unique, randomly generated string that gets stored in the browser’s cookies, so subsequent visits to the same site can be associated with the same user. Identification across sessions Using cookies allows analytics.js to identify unique users across browsing sessions, but it cannot identify unique users across different browsers or devices. |
Client ID
User ID
Identification across devices The User ID lets you associate engagement data from multiple devices and different sessions with unique IDs. More accurate user count Each unique User ID is considered to be a unique user in Google Analytics, so you get a more accurate user count in your reports. Client ID vs User ID While Client ID is usually automatically generated by Google Analytics, the User ID needs to be generated on server side, by you. |
Issue specific to Apps Script:
Cookies aren’t persistent. The Google Analytics cookie will be recreated each time a user re-opens your dialog or sidebar, with a new client ID every time.
�G Suite Developers Blog:
Google Apps Script: Tracking add-on usage with Google Analytics
Feed Google Analytics �with your own attributes
Custom dimensions & metrics
Include non-standard data in your reports
Custom dimensions and custom metrics are like default dimensions and metrics in your Analytics account, except you create them yourself. You can use them to collect and analyze data that Google Analytics doesn't automatically track.
Monitor adoption of your features
63% of users have markers in their template
84% are tracking who opened the emails sent
… over time
In January 2016, 60% of our users were tracking emails sent
Now 84% are using this feature
Tag users with specific attributes
Paying customers represent a growing part of our Active Users
And build custom reports
In Google Analytics we are not allowed to track personally �identifiable information (PII) �such as names, email addresses or billing informations
Why Analytics for your add-on?