mirror of
https://github.com/CompassConnections/Compass.git
synced 2026-04-04 06:51:45 -04:00
Clean posthog
This commit is contained in:
@@ -27,18 +27,18 @@ export async function track(name: string, properties?: EventIds & EventData) {
|
||||
|
||||
export function initTracking() {
|
||||
posthog.init(ENV_CONFIG.posthogKey, {
|
||||
api_host: '/ingest',
|
||||
ui_host: 'https://us.posthog.com',
|
||||
api_host: 'https://us.i.posthog.com',
|
||||
// ui_host: 'https://us.posthog.com',
|
||||
loaded: (posthog) => {
|
||||
posthog.debug(false)
|
||||
},
|
||||
// Below was a failed attempt to remove that error in the browser console:
|
||||
// Cookie “dmn_chk_01993ec4-8420-79ca-85d3-28fec41426c0” has been rejected for invalid domain.
|
||||
persistence: 'cookie',
|
||||
cross_subdomain_cookie: true, // top-level domain cookie
|
||||
secure_cookie: window.location.protocol === 'https:',
|
||||
cookie_expiration: 365,
|
||||
capture_pageview: true,
|
||||
// persistence: 'cookie',
|
||||
// cross_subdomain_cookie: true, // top-level domain cookie
|
||||
// secure_cookie: window.location.protocol === 'https:',
|
||||
// cookie_expiration: 365,
|
||||
// capture_pageview: true,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -23,22 +23,25 @@ module.exports = {
|
||||
experimental: {
|
||||
scrollRestoration: true,
|
||||
},
|
||||
rewrites: async () => {
|
||||
return [
|
||||
{
|
||||
source: '/ingest/static/:path*',
|
||||
destination: 'https://us-assets.i.posthog.com/static/:path*',
|
||||
},
|
||||
{
|
||||
source: '/ingest/:path*',
|
||||
destination: 'https://us.i.posthog.com/:path*',
|
||||
},
|
||||
{
|
||||
source: '/ingest/decide',
|
||||
destination: 'https://us.i.posthog.com/decide',
|
||||
},
|
||||
]
|
||||
},
|
||||
// rewrites: async () => {
|
||||
// if (isAppBuild) {
|
||||
// return []
|
||||
// }
|
||||
// return [
|
||||
// {
|
||||
// source: '/ingest/static/:path*',
|
||||
// destination: 'https://us-assets.i.posthog.com/static/:path*',
|
||||
// },
|
||||
// {
|
||||
// source: '/ingest/:path*',
|
||||
// destination: 'https://us.i.posthog.com/:path*',
|
||||
// },
|
||||
// {
|
||||
// source: '/ingest/decide',
|
||||
// destination: 'https://us.i.posthog.com/decide',
|
||||
// },
|
||||
// ]
|
||||
// },
|
||||
skipTrailingSlashRedirect: true,
|
||||
images: {
|
||||
unoptimized: isAppBuild,
|
||||
|
||||
Reference in New Issue
Block a user