Send event data to the destination only for the allowed event type. We can allow any of the event types from the given list ("track", "page", "identify", "screen")
Checks whether the event type of a request is allowed?
If Yes, Return Event
Code Block
export function transformEvent(event, metadata) {
const type = event.type;
const allowlist = ["page", "screen"];
if (! allowlist.includes(type)) return null;
return event;
}
Contact Details
maanpatel2492@gmail.com
Language
Javascript
Category
Data Processing and Enrichment
Description
Send event data to the destination only for the allowed event type. We can allow any of the event types from the given list ("track", "page", "identify", "screen")
Code Block
Input Payload for testing
License