📦️ Update posthog-js (#1204)

This commit is contained in:
Luke Vella 2024-07-13 16:04:28 +01:00 committed by GitHub
parent 55ef43c2e9
commit 849c199cdd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 22 additions and 9 deletions

View file

@ -64,7 +64,7 @@
"next-i18next": "^13.0.3",
"php-serialize": "^4.1.1",
"postcss": "^8.4.31",
"posthog-js": "^1.102.1",
"posthog-js": "^1.147.0",
"posthog-node": "^3.6.0",
"react-big-calendar": "^1.8.1",
"react-hook-form": "^7.42.1",

View file

@ -12,7 +12,7 @@ import { useRouter } from "next/navigation";
import React from "react";
import { useForm } from "react-hook-form";
import useFormPersist from "react-hook-form-persist";
import { useUnmount } from "react-use";
import { useMount, useUnmount } from "react-use";
import { PollSettingsForm } from "@/components/forms/poll-settings";
import { Trans } from "@/components/trans";
@ -62,6 +62,10 @@ export const CreatePoll: React.FunctionComponent = () => {
useUnmount(clear);
useMount(() => {
posthog?.startSessionRecording();
});
const posthog = usePostHog();
const queryClient = trpc.useUtils();
const createPoll = trpc.polls.create.useMutation({

View file

@ -17,6 +17,9 @@ export function PostHogProvider(props: PostHogProviderProps) {
api_host: process.env.NEXT_PUBLIC_POSTHOG_API_HOST,
opt_out_capturing_by_default: false,
capture_pageview: true,
// we use session recordings to offer support and
// improve the product for our pro users
disable_session_recording: true,
persistence: "memory",
capture_pageleave: false,
autocapture: false,

View file

@ -8006,9 +8006,9 @@ fastq@^1.6.0:
dependencies:
reusify "^1.0.4"
fflate@^0.4.1:
fflate@^0.4.8:
version "0.4.8"
resolved "https://registry.npmjs.org/fflate/-/fflate-0.4.8.tgz"
resolved "https://registry.yarnpkg.com/fflate/-/fflate-0.4.8.tgz#f90b82aefbd8ac174213abb338bd7ef848f0f5ae"
integrity sha512-FJqqoDBR00Mdj9ppamLa/Y7vxm+PRmNWA67N846RvsoYVMKB4q3y/de5PA7gUmRMYK/8CMz2GDZQmCRN1wBcWA==
file-entry-cache@^6.0.1:
@ -11182,13 +11182,14 @@ postgres-range@^1.1.1:
resolved "https://registry.yarnpkg.com/postgres-range/-/postgres-range-1.1.4.tgz#a59c5f9520909bcec5e63e8cf913a92e4c952863"
integrity sha512-i/hbxIE9803Alj/6ytL7UHQxRvZkI9O4Sy+J3HGc4F4oo/2eQAjTSNJ0bfxyse3bH0nuVesCk+3IRLaMtG3H6w==
posthog-js@^1.102.1:
version "1.102.1"
resolved "https://registry.yarnpkg.com/posthog-js/-/posthog-js-1.102.1.tgz#ac9e97703f4bba61785b1d1fa7f699516e97c6fb"
integrity sha512-vHkLtnjDce8qxoKX9K4HOWEvCW/xPTEzHDBJIPrhjWCfXLPa5NePEeSiQjr64BV4DFMBbvyNtUUPVstZoIqQcw==
posthog-js@^1.147.0:
version "1.147.0"
resolved "https://registry.yarnpkg.com/posthog-js/-/posthog-js-1.147.0.tgz#012b13a37044623d0d9bf1843ab3d37f916c8647"
integrity sha512-cALKIcix1W9xMsfUUI/QUFhtBeabDGsQCb3lpZEFd7WCPNLOcGmpeomm4xMX7MO2OnfK6Ov91/HNyfK1wncjSA==
dependencies:
fflate "^0.4.1"
fflate "^0.4.8"
preact "^10.19.3"
web-vitals "^4.0.1"
posthog-node@^3.6.0:
version "3.6.0"
@ -13698,6 +13699,11 @@ web-namespaces@^2.0.0:
resolved "https://registry.npmjs.org/web-namespaces/-/web-namespaces-2.0.1.tgz"
integrity sha512-bKr1DkiNa2krS7qxNtdrtHAmzuYGFQLiQ13TsorsdT6ULTkPLKuu5+GsFpDlg6JFjUTwX2DyhMPG2be8uPrqsQ==
web-vitals@^4.0.1:
version "4.2.1"
resolved "https://registry.yarnpkg.com/web-vitals/-/web-vitals-4.2.1.tgz#67eec387ddd0ef4c25574a01ab9dae723eee2b97"
integrity sha512-U6bAxeudnhDqcXNl50JC4hLlqox9DZnngxfISZm3DMZnonW35xtJOVUc091L+DOY+6hVZVpKXoiCP0RiT6339Q==
webcrypto-core@^1.7.4:
version "1.7.6"
resolved "https://registry.npmjs.org/webcrypto-core/-/webcrypto-core-1.7.6.tgz"