Skip to content
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,9 +1,33 @@
import { DestinationDefinition } from '@segment/actions-core'
import { DestinationDefinition, defaultValues } from '@segment/actions-core'
import { Settings } from './generated-types'
import identifyUser from './identifyUser'
import trackEvent from './trackEvent'
import identifyGroup from './identifyGroup'

const presets: DestinationDefinition['presets'] = [
{
name: 'Track Events',
subscribe: 'type = "track"',
partnerAction: 'trackEvent',
mapping: { ...defaultValues(trackEvent.fields) },
type: 'automatic'
},
{
name: 'Identify Calls',
subscribe: 'type = "identify"',
partnerAction: 'identifyUser',
mapping: { ...defaultValues(identifyUser.fields) },
type: 'automatic'
},
{
name: 'Group Calls',
subscribe: 'type = "group"',
partnerAction: 'identifyGroup',
mapping: { ...defaultValues(identifyGroup.fields) },
type: 'automatic'
}
]

const destination: DestinationDefinition<Settings> = {
name: 'Survicate Cloud Mode (Actions)',
slug: 'actions-survicate-cloud',
Expand Down Expand Up @@ -38,6 +62,7 @@ const destination: DestinationDefinition<Settings> = {
}
},

presets,
actions: {
trackEvent,
identifyUser,
Expand Down
Loading