From 72176279f544d8e2da510116089637a28e4e52a8 Mon Sep 17 00:00:00 2001 From: SukkaW Date: Sat, 18 May 2019 18:57:24 +0800 Subject: [PATCH] Feat: enable perfops for analytics program --- resources/views/material/admin/footer.tpl | 13 +++++++++++++ resources/views/material/footer.tpl | 13 +++++++++++++ resources/views/material/user/footer.tpl | 13 +++++++++++++ 3 files changed, 39 insertions(+) diff --git a/resources/views/material/admin/footer.tpl b/resources/views/material/admin/footer.tpl index b3146ea7..2a2dc917 100644 --- a/resources/views/material/admin/footer.tpl +++ b/resources/views/material/admin/footer.tpl @@ -13,6 +13,19 @@ var hostDomain = window.location.host || document.location.host || document.domain; ga('set', 'dimension1', hostDomain); ga('send', 'pageview'); + + (function () { + function perfops() { + var js = document.createElement('script'); + js.src = 'https://rum.perfops.net/rum3.min.js'; + document.body.appendChild(js); + } + if (document.readyState === 'complete') { + perfops(); + } else { + window.addEventListener('load', perfops); + } + })(); diff --git a/resources/views/material/footer.tpl b/resources/views/material/footer.tpl index 60861f83..0f7cb5eb 100644 --- a/resources/views/material/footer.tpl +++ b/resources/views/material/footer.tpl @@ -17,6 +17,19 @@ It will not impact the appearance and can give developers a lot of support :) var hostDomain = window.location.host || document.location.host || document.domain; ga('set', 'dimension1', hostDomain); ga('send', 'pageview'); + + (function () { + function perfops() { + var js = document.createElement('script'); + js.src = 'https://rum.perfops.net/rum3.min.js'; + document.body.appendChild(js); + } + if (document.readyState === 'complete') { + perfops(); + } else { + window.addEventListener('load', perfops); + } + })(); diff --git a/resources/views/material/user/footer.tpl b/resources/views/material/user/footer.tpl index aee6df8d..3ebe17b0 100644 --- a/resources/views/material/user/footer.tpl +++ b/resources/views/material/user/footer.tpl @@ -13,6 +13,19 @@ var hostDomain = window.location.host || document.location.host || document.domain; ga('set', 'dimension1', hostDomain); ga('send', 'pageview'); + + (function () { + function perfops() { + var js = document.createElement('script'); + js.src = 'https://rum.perfops.net/rum3.min.js'; + document.body.appendChild(js); + } + if (document.readyState === 'complete') { + perfops(); + } else { + window.addEventListener('load', perfops); + } + })();