upload click conversions using python client - can't supply data for one field

321 views
Skip to first unread message

Arne Caratti

unread,
Feb 24, 2022, 10:24:27 AM2/24/22
to Google Ads API and AdWords API Forum
Hi support Team,

I'm trying to upload offline click conversions, based roughly on [this snippet](https://developers.google.com/google-ads/api/docs/samples/upload-offline-conversion). It's working ok, but I don't know how to set conversion_custom_variable_id, and conversion_custom_variable_value, so the API is responding this to me when I leave it blank:

Response: partial_failure_error {
  code: 3
  message: "This conversion action is configured to use an external attribution model, but the external attribution credit or one of its fields is not set., at conversions[0].external_attribution_data"
  details {
    type_url: "type.googleapis.com/google.ads.googleads.v9.errors.GoogleAdsFailure"
    value: "\n\307\001\n\003\370\006\r\022\217\001This conversion action is configured to use an external attribution model, but the external attribution credit or one of its fields is not set.\".\022\017\n\013conversions\030\000\022\033\n\031external_attribution_data"
  }
}

From the management account and conversations with colleagues, I've learned that for the conversion_action I'm talking to an external model is set up, probably by the name of "Fractional Credit". If I set that as the conversion_custom_variable_id, and pass something plausible as a conversion_custom_variable_value along with it, I get this result:

Response: partial_failure_error {
  code: 3
  message: "Resource name \'Fractional Credit\' is malformed: expected \'customers/{customer_id}/conversionCustomVariables/{ConversionCustomVariable.conversion_custom_variable_id}\'., at conversions[0].custom_variables[0].conversion_custom_variable"
  details {
    type_url: "type.googleapis.com/google.ads.googleads.v9.errors.GoogleAdsFailure"
    value: "\n\211\002\n\002\010\004\022\246\001Resource name \'Fractional Credit\' is malformed: expected \'customers/{customer_id}/conversionCustomVariables/{ConversionCustomVariable.conversion_custom_variable_id}\'.\032\023*\021Fractional Credit\"E\022\017\n\013conversions\030\000\022\024\n\020custom_variables\030\000\022\034\n\032conversion_custom_variable"
  }
}

Which looks helpful, except that I don't know what {ConversionCustomVariable.conversion_custom_variable_id} could resolve to, or where to look it up. I can't find it in my management console, and when I use the google ads query language to ask my AdsService for details with "SELECT conversion_custom_variable.id FROM conversion_custom_variable" it resolves without errors but comes up empty.

I wonder how I can fix my initial ClickConversion client communication, or am I doing something fundamentally wrong? I'm happy to supply more details, but didn't want to start off by drowning you in code and logs.

Google Ads API Forum Advisor

unread,
Feb 25, 2022, 1:56:38 PM2/25/22
to car...@auxmoney.com, adwor...@googlegroups.com

Hello Arne,

Thanks for reaching out to the Google Ads API support. For us to investigate, could you please provide us with the complete request and response logs with the request-id and request header generated on your end, so our team can better check the root cause of the error? Please send the requested details via the Reply privately to the author option. If this option is not available, you may send the details directly to us googleadsapi-support@google.com alias instead.

For the client library, logging can be enabled by navigating to the Client libraries > Your client library (ex. Java) > Logging documentation, which you can access from this link.

Best regards,

Google Logo
Jakeia Sabrina
Google Ads API Team
 

ref:_00D1U1174p._5004Q2WygQS:ref

Arne Caratti

unread,
Mar 2, 2022, 7:57:14 AM3/2/22
to Google Ads API and AdWords API Forum
Hi, thanks for getting back. In the end I was able to resolve it myself after some more help from another colleague of yours. My mistake was assuming that the way to pass my remaining information, the external model and it's value, had to be the conversion_custom_variable_id from the sample code. If I had searched a little longer, I'd have found out that there exists a "ExternalAttributionData"-type, which I can set as an attribute "external_attribution_data" on a "ClickConversion" instance. The fact that querying for conversion_custom_variable_id came back empty should have tipped me off, too.

Sorry for the wasted time, but maybe this thread will help someone who stumbles over it through googling.

Cheers,
Arne
On Friday, 25 February 2022 at 14:56:38 UTC+1 adsapi wrote:

Hello Arne,

Thanks for reaching out to the Google Ads API support. For us to investigate, could you please provide us with the complete request and response logs with the request-id and request header generated on your end, so our team can better check the root cause of the error? Please send the requested details via the Reply privately to the author option. If this option is not available, you may send the details directly to us googleadsa...@google.com alias instead.



For the client library, logging can be enabled by navigating to the Client libraries > Your client library (ex. Java) > Logging documentation, which you can access from this link.

Best regards,

Reply all
Reply to author
Forward
0 new messages