Commit 28781e7d by Marcus Efraimsson Committed by GitHub

Merge pull request #11736 from grafana/11735_ga

fix so that google analytics script are cached
parents 1dd4f031 ddeba416
...@@ -7,7 +7,11 @@ export class Analytics { ...@@ -7,7 +7,11 @@ export class Analytics {
constructor(private $rootScope, private $location) {} constructor(private $rootScope, private $location) {}
gaInit() { gaInit() {
$.getScript('https://www.google-analytics.com/analytics.js'); // jQuery shortcut $.ajax({
url: 'https://www.google-analytics.com/analytics.js',
dataType: 'script',
cache: true,
});
var ga = ((<any>window).ga = var ga = ((<any>window).ga =
(<any>window).ga || (<any>window).ga ||
function() { function() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment