Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: enhancement and version upgrade of google adwords enhanced conversion #2947

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const { getMappingConfig } = require('../../util');

const BASE_ENDPOINT = 'https://googleads.googleapis.com/v14/customers';
const BASE_ENDPOINT = 'https://googleads.googleapis.com/v15/customers';

const CONFIG_CATEGORIES = {
TRACK_CONFIG: { type: 'track', name: 'trackConfig' },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,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,
Expand Down
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;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't we support properties.jobId as well? Some customer might try to provide jobId from their own.
CC @shrouti1507 @krishna2020

Copy link
Collaborator

@krishna2020 krishna2020 Jan 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you tell what's the use-case of customer for providing jobId when destination has ability to generate jobId in case of null ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Customer can maintain some unique numbers on their database and send that as jobId.

Copy link
Collaborator

@krishna2020 krishna2020 Jan 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shrouti1507 There's no point of introducing jobId in this PR without handling partial failure feature

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
Loading
Loading