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); }