Skip to content

Commit

Permalink
fingerprintjs dynamic import함 (#1505)
Browse files Browse the repository at this point in the history
서버사이드에서 fingerprintjs 임포트 하지 않음
  • Loading branch information
devunt committed Nov 23, 2024
1 parent 49ed9e1 commit c59fbe9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/usersite/src/lib/utils/track.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { browser } from '$app/environment';
import { env } from '$env/dynamic/public';
import { getFingerprint } from './fingerprint';

type TrackParams = {
siteId: string;
Expand All @@ -10,6 +9,7 @@ type TrackParams = {

export const track = async ({ siteId, kind, data }: TrackParams) => {
if (browser) {
const { getFingerprint } = await import('$lib/utils/fingerprint');
navigator.sendBeacon(
`${env.PUBLIC_API_URL}/logs`,
JSON.stringify({ siteId, kind, deviceId: await getFingerprint(), data }),
Expand Down

0 comments on commit c59fbe9

Please sign in to comment.