From 6b15d2cc5b6aaf8fdb8d79d75c85c41ef4705e9c Mon Sep 17 00:00:00 2001 From: shrouti1507 Date: Fri, 15 Dec 2023 17:51:15 +0530 Subject: [PATCH] fix: adding jobId for gaec --- .../data/trackConfig.json | 8 ++++++++ .../google_adwords_enhanced_conversions/networkHandler.js | 2 +- .../google_adwords_enhanced_conversions/processor/data.ts | 2 ++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/v0/destinations/google_adwords_enhanced_conversions/data/trackConfig.json b/src/v0/destinations/google_adwords_enhanced_conversions/data/trackConfig.json index 562a77f0e81..d98b71eb5df 100644 --- a/src/v0/destinations/google_adwords_enhanced_conversions/data/trackConfig.json +++ b/src/v0/destinations/google_adwords_enhanced_conversions/data/trackConfig.json @@ -129,5 +129,13 @@ "metadata": { "type": "hashToSha256" } + }, + { + "destKey": "jobId", + "sourceKeys": ["properties.jobId"], + "required": false, + "metadata": { + "type": "toInt" + } } ] diff --git a/src/v0/destinations/google_adwords_enhanced_conversions/networkHandler.js b/src/v0/destinations/google_adwords_enhanced_conversions/networkHandler.js index 8ac432935f9..842b6fdcb27 100644 --- a/src/v0/destinations/google_adwords_enhanced_conversions/networkHandler.js +++ b/src/v0/destinations/google_adwords_enhanced_conversions/networkHandler.js @@ -110,7 +110,7 @@ const responseHandler = (destinationResponse) => { // Ref - https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto if (partialFailureError && partialFailureError.code !== 0) { throw new NetworkError( - `[Google Ads Offline Conversions]:: partialFailureError - ${JSON.stringify( + `[Google Adwords Enhanced Conversions]:: partialFailureError - ${JSON.stringify( partialFailureError, )}`, 400, diff --git a/test/integrations/destinations/google_adwords_enhanced_conversions/processor/data.ts b/test/integrations/destinations/google_adwords_enhanced_conversions/processor/data.ts index 0a9542a5d5a..1032b3b13c3 100644 --- a/test/integrations/destinations/google_adwords_enhanced_conversions/processor/data.ts +++ b/test/integrations/destinations/google_adwords_enhanced_conversions/processor/data.ts @@ -1477,6 +1477,7 @@ export const data = [ userId: '12345', properties: { gclid: 'gclid1234', + jobId: '1', conversionDateTime: '2022-01-01 12:32:45-08:00', adjustedValue: '10', currency: 'INR', @@ -1565,6 +1566,7 @@ export const data = [ adjustmentType: 'ENHANCEMENT', }, ], + jobId: 1, partialFailure: true, }, JSON_ARRAY: {},