Skip to content

Commit

Permalink
fix: added metadata.jobId to jobId of the payload
Browse files Browse the repository at this point in the history
  • Loading branch information
shrouti1507 committed Jan 4, 2024
1 parent 2c1a71b commit 74a2be7
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,13 +129,5 @@
"metadata": {
"type": "hashToSha256"
}
},
{
"destKey": "jobId",
"sourceKeys": ["properties.jobId"],
"required": false,
"metadata": {
"type": "toInt"
}
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ const processTrackEvent = async (metadata, message, destination) => {
const payload = constructPayload(message, updatedMapping);

payload.partialFailure = true;
// ref: https://developers.google.com/google-ads/api/docs/release-notes#:~:text=Added%20job_id%20as,UploadConversionAdjustmentsRequest
payload.jobId = metadata.jobId;
if (!payload.conversionAdjustments[0]?.userIdentifiers) {
throw new InstrumentationError(
`Any of email, phone, firstName, lastName, city, street, countryCode, postalCode or streetAddress is required in traits.`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1566,7 +1566,6 @@ export const data = [
adjustmentType: 'ENHANCEMENT',
},
],
jobId: 1,
partialFailure: true,
},
JSON_ARRAY: {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,7 @@ export const data = [
params: { event: 'Page View', customerId: '1234567890' },
body: {
JSON: {
jobId: 1,
partialFailure: true,
conversionAdjustments: [
{
Expand Down

0 comments on commit 74a2be7

Please sign in to comment.