Get Data
This API allows you to retrieve data from the edge storage that you send via the user or data function.
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
import { getData } from '@blotoutio/edgetag-sdk-js'
getData(['email', 'step'], (data) => {
console.log(data) // it will print out { emailExists: true, step: '10' }
})Last updated
Was this helpful?

