mirror of
https://github.com/logto-io/logto.git
synced 2025-01-13 21:30:30 -05:00
refactor(console): fix plausible hostname (#5968)
This commit is contained in:
parent
014d7f63c3
commit
d498086fdd
2 changed files with 2 additions and 2 deletions
|
@ -16,6 +16,7 @@ export enum GtagConversionId {
|
||||||
}
|
}
|
||||||
|
|
||||||
export const redditPixelId = 't2_ggt11omdo';
|
export const redditPixelId = 't2_ggt11omdo';
|
||||||
|
/** The data domain to aggregate the data for Plausible. */
|
||||||
export const plausibleDataDomain = 'logto.io';
|
export const plausibleDataDomain = 'logto.io';
|
||||||
|
|
||||||
const logtoProductionHostname = 'logto.io';
|
const logtoProductionHostname = 'logto.io';
|
||||||
|
|
|
@ -3,7 +3,6 @@ import debug from 'debug';
|
||||||
import { useEffect } from 'react';
|
import { useEffect } from 'react';
|
||||||
import { type RouteObject, useLocation } from 'react-router-dom';
|
import { type RouteObject, useLocation } from 'react-router-dom';
|
||||||
|
|
||||||
import { plausibleDataDomain } from '@/components/Conversion/utils';
|
|
||||||
import { getRoutePattern } from '@/utils/route';
|
import { getRoutePattern } from '@/utils/route';
|
||||||
|
|
||||||
const log = debug('usePlausiblePageview');
|
const log = debug('usePlausiblePageview');
|
||||||
|
@ -25,7 +24,7 @@ export const usePlausiblePageview = (routes: RouteObject[], prefix: string) => {
|
||||||
// https://plausible.io/docs/custom-locations#3-specify-a-custom-location
|
// https://plausible.io/docs/custom-locations#3-specify-a-custom-location
|
||||||
window.plausible?.('pageview', {
|
window.plausible?.('pageview', {
|
||||||
u:
|
u:
|
||||||
appendPath(new URL('https://' + plausibleDataDomain), prefix, routePattern).href +
|
appendPath(new URL('https://' + window.location.hostname), prefix, routePattern).href +
|
||||||
window.location.search,
|
window.location.search,
|
||||||
});
|
});
|
||||||
}, [pathname, prefix, routes]);
|
}, [pathname, prefix, routes]);
|
||||||
|
|
Loading…
Add table
Reference in a new issue