Get Data

This API allows you to retrieve data from the edge storage that you send via the user or data function.

circle-info

For standard keys, we will return a boolean value indicating whether the key is present or not. For example, for an email address, we would return emailExists with a corresponding boolean value.

Parameters

Name
Type
Required
Description

keys

String[]

Yes

Keys that you would like to get value of from the edge.

callback

(data: Record<string, string>) => void

Yes

Callback function that gives you results.

options

{ destination?: string }

No

See below

Options

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.

Example

edgetag('getData', ['email', 'step'], (data) => {
  console.log(data) // it will print out { emailExists: true, step: '10' }
})

Last updated

Was this helpful?