mirror of
https://github.com/formbricks/formbricks.git
synced 2026-04-28 12:42:44 -05:00
7ed24c9f49
* Add exit intent and scroll depth automatic actions * Remove lorem ipsum text * Modified event listeners to not get called if survey is already running * Add trackEvent inside event listeners * Remove lorem ipsum * Move event listeners to init * Fix exit intent listener * Modify event listeners to get called everytime and change exit intent text * Add missed files * Move events to separate file and add name check * Add name check * Fix build error
29 lines
825 B
TypeScript
29 lines
825 B
TypeScript
import { EventType } from "@prisma/client";
|
|
export const populateEnvironment = {
|
|
eventClasses: {
|
|
create: [
|
|
{
|
|
name: "New Session",
|
|
description: "Gets fired when a new session is created",
|
|
type: EventType.automatic,
|
|
},
|
|
{
|
|
name: "Exit Intent (Desktop)",
|
|
description: "A user on Desktop leaves the website with the cursor.",
|
|
type: EventType.automatic,
|
|
},
|
|
{
|
|
name: "50% Scroll",
|
|
description: "A user scrolled 50% of the current page",
|
|
type: EventType.automatic,
|
|
}
|
|
],
|
|
},
|
|
attributeClasses: {
|
|
create: [
|
|
{ name: "userId", description: "The internal ID of the person", type: EventType.automatic },
|
|
{ name: "email", description: "The email of the person", type: EventType.automatic },
|
|
],
|
|
},
|
|
};
|