User

When should I use this function? Use it when you are sending only a single key and are only using standard keys.

Parameters

Name
Type
Required
Description

key

String

Yes

Defines which user info you are sending, see Default keys that you can use

value

String

Yes

Value for the specific key, make sure to match the format

providers

Record<string, boolean>

No

Define for which providers you would like to send user data. By default, we send to all of them.

options

{ method?: 'beacon', destination?: string }

No

See below

Options

Method: If you provide the method with a value beacon, we will send this event through a beaconarrow-up-right delivery mechanism instead of a regular fetch.

Destination: We recommend specifying the destination, especially if multiple EdgeTag instances exist on the website. If you do not, we will trigger the same event to multiple destinations. The destination value should be the EdgeTag URL.

Examples

import { user } from '@blotoutio/edgetag-sdk-js'

user('email', '[email protected]')
import { user } from '@blotoutio/edgetag-sdk-js'

user('city', 'fremont')

Last updated

Was this helpful?