fix so that google analytics script are cached
(cherry picked from commit ddeba41638)
This commit is contained in:
@@ -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() {
|
||||||
|
|||||||
Reference in New Issue
Block a user