mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-11-30 18:24:03 +00:00
Google Analytics - Simplified retrieving Tag ID from Status Page.
This commit is contained in:
parent
3ff0cbe311
commit
c08d8a5eaf
1 changed files with 6 additions and 8 deletions
|
@ -54,14 +54,12 @@ class StatusPage extends BeanModel {
|
|||
|
||||
const head = $("head");
|
||||
|
||||
await StatusPage.getStatusPageData(statusPage).then( (page) => {
|
||||
if (page.config?.googleAnalyticsId) {
|
||||
let escapedGoogleAnalyticsScript = jsesc(googleAnalytics.getGoogleAnalyticsScript(page.config.googleAnalyticsId), {
|
||||
if (statusPage.googleAnalyticsTagId) {
|
||||
let escapedGoogleAnalyticsScript = jsesc(googleAnalytics.getGoogleAnalyticsScript(statusPage.googleAnalyticsTagId), {
|
||||
"isScriptContext": true
|
||||
});
|
||||
head.append($(escapedGoogleAnalyticsScript));
|
||||
}
|
||||
});
|
||||
|
||||
// OG Meta Tags
|
||||
head.append(`<meta property="og:title" content="${statusPage.title}" />`);
|
||||
|
|
Loading…
Reference in a new issue