Skip to content

Commit

Permalink
removed datalayer source check
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderkirtzel committed Feb 21, 2025
1 parent 621c8bd commit 57086cf
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 19 deletions.
16 changes: 0 additions & 16 deletions packages/destinations/web/google-ads/src/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,22 +81,6 @@ describe('destination Google Ads', () => {
expect(elem).toBeTruthy();
});

test('dataLayer source', () => {
elb('walker destination', destination);
destination.config.mapping = {
order: { complete: { name: label } },
};
elb(event);
jest.resetAllMocks();
event.source.type = 'dataLayer';
elb(event);
expect(mockFn).toHaveBeenCalledTimes(0);

event.source.type = 'web';
elb(event);
expect(mockFn).toHaveBeenCalledTimes(1);
});

test('event conversion', () => {
elb('walker destination', destination, {
custom: { conversionId },
Expand Down
3 changes: 0 additions & 3 deletions packages/destinations/web/google-ads/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,6 @@ export const destinationGoogleAds: Destination = {
},

push(event, config, mapping = {}, options = {}): void {
// Do not process events from dataLayer source
if (event.source?.type === 'dataLayer') return;

const { custom = {}, fn } = config;
const { name } = mapping;
const data = isObject(options.data) ? options.data : {};
Expand Down

0 comments on commit 57086cf

Please sign in to comment.