mirror of
https://github.com/logto-io/logto.git
synced 2024-12-30 20:33:54 -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';
|
||||
/** The data domain to aggregate the data for Plausible. */
|
||||
export const plausibleDataDomain = 'logto.io';
|
||||
|
||||
const logtoProductionHostname = 'logto.io';
|
||||
|
|
|
@ -3,7 +3,6 @@ import debug from 'debug';
|
|||
import { useEffect } from 'react';
|
||||
import { type RouteObject, useLocation } from 'react-router-dom';
|
||||
|
||||
import { plausibleDataDomain } from '@/components/Conversion/utils';
|
||||
import { getRoutePattern } from '@/utils/route';
|
||||
|
||||
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
|
||||
window.plausible?.('pageview', {
|
||||
u:
|
||||
appendPath(new URL('https://' + plausibleDataDomain), prefix, routePattern).href +
|
||||
appendPath(new URL('https://' + window.location.hostname), prefix, routePattern).href +
|
||||
window.location.search,
|
||||
});
|
||||
}, [pathname, prefix, routes]);
|
||||
|
|
Loading…
Reference in a new issue