feat: Add support for GA4 measurement IDs in GOOGLE_ANALYTICS_ID

This commit is contained in:
Tom Moor
2023-05-08 12:01:35 -04:00
parent a0df79ea5a
commit 1cf597aca7
3 changed files with 24 additions and 19 deletions

View File

@@ -16,7 +16,6 @@ import {
IsIn,
IsEmail,
IsBoolean,
Contains,
MaxLength,
} from "class-validator";
import { languages } from "@shared/i18n";
@@ -344,9 +343,8 @@ export class Environment {
public RELEASE = this.toOptionalString(process.env.RELEASE);
/**
* A Google Analytics tracking ID, supports only v3 properties.
* A Google Analytics tracking ID, supports v3 or v4 properties.
*/
@Contains("UA-")
@IsOptional()
public GOOGLE_ANALYTICS_ID = this.toOptionalString(
process.env.GOOGLE_ANALYTICS_ID