Verify Google Analytics client is accessible before sending events (#9887)

pull/9921/head
Ben 2018-08-20 10:42:37 -05:00 committed by k8s-ci-robot
parent 84abf8eacf
commit c2b26de572
1 changed files with 15 additions and 3 deletions

View File

@ -200,7 +200,11 @@ $( document ).ready(function() {
urlParamHash.set("level", null); urlParamHash.set("level", null);
// record Google Analytics event // record Google Analytics event
ga('send', 'event', 'user-journeys', 'click', 'path', type); try {
ga('send', 'event', 'user-journeys', 'click', 'path', type);
} catch (ignored) {
}
} }
@ -221,7 +225,11 @@ $( document ).ready(function() {
urlParamHash.set('persona', persona); urlParamHash.set('persona', persona);
// record Google Analytics event // record Google Analytics event
ga('send', 'event', 'user-journeys', 'click', 'persona', persona); try {
ga('send', 'event', 'user-journeys', 'click', 'persona', persona);
} catch (ignored) {
}
} }
// Use default level if not specified, in order to display the proper // Use default level if not specified, in order to display the proper
@ -250,7 +258,11 @@ $( document ).ready(function() {
urlParamHash.set('level', level); urlParamHash.set('level', level);
// record Google Analytics event // record Google Analytics event
ga('send', 'event', 'user-journeys', 'click', 'level', level); try {
ga('send', 'event', 'user-journeys', 'click', 'level', level);
} catch (ignored) {
}
} }