mirror of
https://github.com/XFox111/TabsAsideExtension.git
synced 2026-04-22 07:58:01 +03:00
25 lines
660 B
TypeScript
25 lines
660 B
TypeScript
import { googleAnalytics4 } from "@wxt-dev/analytics/providers/google-analytics-4";
|
|
import { WxtAppConfig } from "wxt/sandbox";
|
|
import { userPropertiesStorage } from "./features/analytics";
|
|
|
|
export default defineAppConfig({
|
|
analytics:
|
|
{
|
|
debug: import.meta.env.DEV,
|
|
enabled: storage.defineItem("local:analytics", {
|
|
fallback: true
|
|
}),
|
|
userId: storage.defineItem("local:userId", {
|
|
init: () => crypto.randomUUID()
|
|
}),
|
|
userProperties: userPropertiesStorage,
|
|
providers:
|
|
[
|
|
googleAnalytics4({
|
|
apiSecret: import.meta.env.WXT_GA4_API_SECRET,
|
|
measurementId: import.meta.env.WXT_GA4_MEASUREMENT_ID
|
|
})
|
|
]
|
|
}
|
|
} as WxtAppConfig);
|