@@ -7,7 +7,7 @@ import useSWR from 'swr'
|
||||
|
||||
import { useTranslation } from 'src/languages/components/useTranslation'
|
||||
import { Link } from 'src/frame/components/Link'
|
||||
import { sendEvent, EventType, startVisitTime } from 'src/events/components/events'
|
||||
import { sendEvent, EventType } from 'src/events/components/events'
|
||||
|
||||
import styles from './Survey.module.scss'
|
||||
|
||||
@@ -324,7 +324,6 @@ function trackEvent(eventData: EventData) {
|
||||
survey_vote: eventData.vote,
|
||||
survey_comment: eventData.comment || undefined,
|
||||
survey_email: eventData.email || undefined,
|
||||
survey_visit_duration: (Date.now() - startVisitTime) / 1000,
|
||||
survey_rating: eventData.rating,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ import { isLoggedIn } from 'src/frame/components/hooks/useHasAccount'
|
||||
|
||||
const COOKIE_NAME = '_docs-events'
|
||||
|
||||
export const startVisitTime = Date.now()
|
||||
const startVisitTime = Date.now()
|
||||
|
||||
let initialized = false
|
||||
let cookieValue: string | undefined
|
||||
@@ -119,7 +119,6 @@ type SendEventProps = {
|
||||
survey_vote: boolean
|
||||
survey_comment?: string
|
||||
survey_email?: string
|
||||
survey_visit_duration?: number
|
||||
survey_rating?: number
|
||||
}
|
||||
}
|
||||
|
||||
@@ -389,12 +389,6 @@ const survey = {
|
||||
format: 'email',
|
||||
description: "The user's email address, if the user provided and consented.",
|
||||
},
|
||||
survey_visit_duration: {
|
||||
type: 'number',
|
||||
minimum: 0.001,
|
||||
description:
|
||||
'The duration of survey submission - page.timestamp, in seconds. Used to filter out bot-generated survey resopnses.',
|
||||
},
|
||||
survey_rating: {
|
||||
type: 'number',
|
||||
description:
|
||||
|
||||
@@ -52,7 +52,7 @@ async function main() {
|
||||
throw new Error('The public-docs.yml file being synced does not have a valid schema')
|
||||
}
|
||||
|
||||
await writeFile(SECRET_SCANNING_FILEPATH, yaml.dump(data))
|
||||
await writeFile(SECRET_SCANNING_FILEPATH, yaml.dump(yamlData))
|
||||
|
||||
// update the config file with the latest sha
|
||||
const configFilepath = 'src/secret-scanning/lib/config.json'
|
||||
|
||||
Reference in New Issue
Block a user