mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-07-21 14:08:53 -04:00
Feature - Google Analytics - Use Regex to validate UA as per https://support.google.com/analytics/answer/9310895
This commit is contained in:
parent
99c0b8cb71
commit
2b3a3895b3
2 changed files with 8 additions and 2 deletions
|
@ -7,6 +7,7 @@ const Database = require("../database");
|
|||
const apicache = require("../modules/apicache");
|
||||
const StatusPage = require("../model/status_page");
|
||||
const { UptimeKumaServer } = require("../uptime-kuma-server");
|
||||
const googleAnalytics = require("../modules/google-analytics");
|
||||
|
||||
/**
|
||||
* Socket handlers for status page
|
||||
|
@ -163,7 +164,7 @@ module.exports.statusPageSocketHandler = (socket) => {
|
|||
statusPage.custom_css = config.customCSS;
|
||||
statusPage.show_powered_by = config.showPoweredBy;
|
||||
statusPage.modified_date = R.isoDateTime();
|
||||
statusPage.google_analytics_tag_id = config.googleAnalyticsId;
|
||||
statusPage.google_analytics_tag_id = googleAnalytics.isValidTag(config.googleAnalyticsId) ? config.googleAnalyticsId : "";
|
||||
|
||||
await R.store(statusPage);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue