Skip to main content

API

Source code Package Browser ES5

The walker.js API destination allows you to send events to a custom API endpoint using walker.js library. This can be useful when you want to send data to a backend system for further processing or any external services.

Installation

Install the destination via npm

npm i @elbwalker/destination-web-api
import { elb } from '@elbwalker/walker.js';
import destinationAPI from '@elbwalker/destination-web-api';

elb('walker destination', destinationAPI, config);

Configuration

Set up the config for the destination.

Custom Config
Result
PropertyTypeDescription
url*stringURL to send the events to.
transformfunctionA function to transform the events before sending them to the URL.
transportfetch (default),
xhr,
beacon
The transport method to use when sending events.

Properties with a * are required.

If no transform function is provided, the event data will be transformed using JSON.stringify.

Mapping

By default the sendWeb function is used to send the events to an API.

Event
Custom Config
Result
info

If you need professional support with your walkerOS implementation, check out our services.