From d001ba25d8c22a5b8d70c17644d533bc2d751553 Mon Sep 17 00:00:00 2001 From: Utsab Chowdhury Date: Tue, 11 Jun 2024 12:28:54 +0530 Subject: [PATCH] fix: handle for other event types --- src/v0/destinations/ga4_v2/transform.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/v0/destinations/ga4_v2/transform.ts b/src/v0/destinations/ga4_v2/transform.ts index 2c54a058c2..7ffcf04a5c 100644 --- a/src/v0/destinations/ga4_v2/transform.ts +++ b/src/v0/destinations/ga4_v2/transform.ts @@ -5,6 +5,7 @@ import { } from '@rudderstack/integrations-lib'; import { ProcessorTransformationRequest } from '../../../types'; import { handleCustomMappings } from './customMappingsHandler'; +import { process as ga4Process } from '../ga4/transform'; export function process(event: ProcessorTransformationRequest) { const { message, destination } = event; @@ -29,6 +30,10 @@ export function process(event: ProcessorTransformationRequest) { throw new InstrumentationError('Message Type is not present. Aborting message.'); } + if (eventPayload.type !== 'track') { + return ga4Process(event); + } + // custom mappings flow return handleCustomMappings(message, Config); }