Upload conversions AND enhanced conversions WITH gclid via the API

1,500 views
Skip to first unread message

Joachim Løvgaard

unread,
Jun 6, 2023, 12:48:48 PM6/6/23
to Google Ads API and AdWords API Forum
Hi

I want to

1. Upload a conversion with a gclid
2. Upload an enhanced conversion for the same conversion as above

both done through the API.

I have tried a lot of API calls, conversion actions, read a lot of conversations on this forum, but I can't seem to figure it out.

Is this really not possible?

Google Ads API Forum Advisor

unread,
Jun 9, 2023, 11:26:46 AM6/9/23
to joa...@loevgaard.dk, adwor...@googlegroups.com

Hello,

Thanks for reaching out to Google Ads API Support.

With regards to your concern, on uploading with a gclid and uploading enhanced conversions, please refer to the API documentation below for more details.

I hope this information helps you. 

This message is in relation to case "ref:_00D1U1174p._5004Q2m9sBR:ref"

Thanks,
 
Google Logo Google Ads API Team


Joachim Løvgaard

unread,
Jun 9, 2023, 11:34:18 AM6/9/23
to Google Ads API and AdWords API Forum
Thanks for your fast response.

On this page: https://developers.google.com/google-ads/api/docs/conversions/upload-clicks (the first you reference) it states:

Providing neither wbraid nor gbraid, but providing both gclid and user_identifiers: The gclid takes precedence.

What that tells me is that the user identifiers (e.g. email, address information etc) is ignored if I add a gclid. Am I wrong about that?

If I am wrong then I will just upload a click conversion with the gclid and also include the user identifiers leaving me with one API call per conversion, which is great. Can you confirm?

Google Ads API Forum Advisor

unread,
Jun 14, 2023, 12:45:00 PM6/14/23
to joa...@loevgaard.dk, adwor...@googlegroups.com

Hi,

Thanks for getting back to us.

Yes, your understanding is correct. When you add both gclid and user_identifiers, then user identifiers (e.g. email, address information etc) are ignored, but gclid takes precedence.

You may upload a click conversion with the gclid and also include the user identifiers but gclid would precede. I hope this clears. 

Joachim Løvgaard

unread,
Jun 14, 2023, 1:13:18 PM6/14/23
to Google Ads API and AdWords API Forum
Okay, then I am little bit confused.

We have an ecommerce store. We want to upload conversions with the gclid, but we also want to use the enhanced conversions. How should we do that then if we only want to use the Google Ads API and not install the client side google ads tag.

Google Ads API Forum Advisor

unread,
Jun 19, 2023, 11:15:21 AM6/19/23
to joa...@loevgaard.dk, adwor...@googlegroups.com

Hi,

As mentioned here(https://developers.google.com/google-ads/api/docs/conversions/upload-clicks#id_parameters), you must enable your website and lead-tracking system to capture and store the GCLID, the unique ID that Google Ads provides for every impression of a Google ad. Can you confirm if this is what you mean by client side google ads tag?

If the click conversions are uploaded in the Google Ads UI, auto-tagging is automatically enabled so your website will start receiving the GCLID as a URL parameter. However, this does not occur when using the Google Ads API, so you should enable auto-tagging by updating the auto_tagging_enabled attribute of Customer.

Please be informed that we can only provide guidance related to the Google Ads API. If by client side google ads tag, you are referring to the Google Tag Manager, then it would be best to raise your concern with their team.

Let me know if you have any questions.

Link references:

Joachim Løvgaard

unread,
Jun 19, 2023, 11:20:06 AM6/19/23
to Google Ads API and AdWords API Forum
Hi

We are capturing the gclid when people visit our store. I want to both upload click conversions through the API with the gclid that I save and and I want to upload conversion adjustments (enhanced conversions) through the API. I cannot find a clear cut path in your documentation on how to actually do this. Can you help me out?

Google Ads API Forum Advisor

unread,
Jun 21, 2023, 3:07:32 PM6/21/23
to joa...@loevgaard.dk, adwor...@googlegroups.com

Hi, 

Thank you for getting back to us. 

I understand that you want to upload click conversions and conversion adjustments (enhanced conversions) through the API. Please note that you need to associate your offline click conversions with a conversion action by passing the gclid identifier. In addition, provide the conversion date time, conversion action resource name and optionally the conversion value and currency to ConversionUploadService. Please use this code example (https://developers.google.com/google-ads/api/docs/conversions/upload-clicks#code_example) as reference. 

Additionally, in order to adjust a conversion, you must first have a conversion action set up, and you must also have recorded the conversions that you are about to adjust. With this, kindly check this code example (https://developers.google.com/google-ads/api/docs/conversions/upload-adjustments#code_example) for reference.

Please let us know if you have further questions.

Reference Links:

Greg Robson

unread,
Jun 22, 2023, 8:48:38 AM6/22/23
to Google Ads API and AdWords API Forum
I have looked at the examples again and have looked at the source code.

I think that fundamentally this is an issue with Google's documentation (unsurprising based on past experience, but anyway, I digress...).

While at first glance Upload Offline Conversion and Upload Conversion with Identifiers look like different calls, they use the same class (ClickConversion) - just called with different parameters. Neither example passes the order id.

Also Upload Conversion Enhancement and Upload Conversion Adjustment use the same class (ConversionAdjustment), the adjustment type alters the behaviour and whether some of the properties change from optional to required.

Here's a table showing what parameters are supported (has value) and which are shown in the above example code (highlighted in blue).

conversions.png

Based on the above (and it would be great if someone at Google could confirm this!) the best practice would be.
  1. Log your ClickConversion with gclid/wbraid/gbraid, and include order_id (for step 2). You probably could pass identifiers here, but you might want to do that on step 2 for simpliccity.
  2. To enhance the conversion, call ConversionAdjustment, with the same order_id (as you can only do gclid/datetime pairs and not pairs with wbraid/datetime or gbraid/datetime, this seems better way to reference a unique conversion from step 1) and include:
    a) user agent
    b) all the user identifiers you have: hashes of name, phone, email, postal address etc.
Any adjustments are separate, hopefully it's clear to see what to do in the last three columns.

Ultimately I think the best actions variables to send are:
conversions2.png

  1. Upload with gclid/gbraid/wbraid and order_id
  2. Enhance the conversion by referencing order_id.
  3. Adjusting by referencing order_id
I think that's it? As I said before - it would be great to have someone at Google confirm this!

Kind regards
Greg
Message has been deleted

Google Ads API and AdWords API Forum

unread,
Jul 3, 2023, 12:51:35 PM7/3/23
to Google Ads API and AdWords API Forum

Re-posting the last inquiry (https://groups.google.com/g/adwords-api/c/SDyRhokC9AA) from the forum as it wasn't routed to our support queue.

Google Ads API Forum Advisor

unread,
Jul 3, 2023, 9:15:33 PM7/3/23
to adwor...@googlegroups.com

Hi Greg,

Thanks for getting back to us.

Kindly see below responses to your queries:

1. Log your ClickConversion with gclid/wbraid/gbraid, and include order_id (for step 2). You probably could pass identifiers here, but you might want to do that on step 2 for simpliccity.

>> Your understanding is correct.

2. To enhance the conversion, call ConversionAdjustment, with the same order_id (as you can only do gclid/datetime pairs and not pairs with wbraid/datetime or gbraid/datetime, this seems better way to reference a unique conversion from step 1) and include:

a) user agent

b) all the user identifiers you have: hashes of name, phone, email, postal address etc.

Any adjustments are separate, hopefully it's clear to see what to do in the last three columns.

1. Upload with gclid/gbraid/wbraid and order_id → You may need to use ConversionUploadService and refer to this code example.

You may refer to this API documentation.

2. Enhance the conversion by referencing order_id.---> You may need to leverage enhanced conversions by sending first-party customer data in the form of conversion adjustments. Google uses this additional data to improve the reporting of your online ad-initiated conversions. As with other requests to the ConversionAdjustmentUploadService, you can only upload enhanced conversions using the account that manages conversion actions. You may refer to this code example.

3. Adjusting by referencing order_id → Once a conversion has already been reported to Google Ads, you can adjust the conversion at a later point in time in the Google Ads API. There are two types of adjustments that can be made:

1)When you have a Google click ID (GCLID) and conversion date time available, you can adjust a conversion by uploading a ConversionAdjustment.

2) You can also adjust a conversion when you have an order ID available instead of a Google click ID and conversion date time.

Both these adjustment types would be uploaded through the ConversionAdjustmentUploadService. You may refer to this code example.

 Let us know if you need further clarification. 

Joachim Løvgaard

unread,
Aug 8, 2023, 11:56:51 AM8/8/23
to Google Ads API and AdWords API Forum
Hi everybody and thanks for your input, Greg!

I still seem to have problems making this work.

Here is what I have done.

I have manually created a Conversion Action inside the Google Ads interface with offline upload (because I got an error: Make sure you specify a valid conversion action set up for offline import when trying to use an existing conversion action).

Then I have managed to upload a click conversion to that conversion action. However, when I try to upload an enhanced conversion to the same conversion action I get this error: Make sure you specify an active conversion action that can be adjusted.

Does that mean I need to have two separate conversions actions? I.e. one for uploading click conversions and one for uploading enhanced conversions.

I am insanely confused at the moment :D

Google Ads API Forum Advisor

unread,
Aug 8, 2023, 1:34:25 PM8/8/23
to joa...@loevgaard.dk, adwor...@googlegroups.com

Hi Joachim,

Thank you for your response.

To confirm, if you are referring to Upload Click conversions, then conversion action will have a type of UPLOAD_CLICKS. For uploading enhanced conversions, it is important to set the conversion_action to a resource name of a ConversionAction with a type of UPLOAD_CLICKS. This means that you can use the same conversion action, as long as it has the required ConversionAction type.

Moving forward to the error you encountered, you mentioned that the error message is as follows: "Make sure you specify an active conversion action that can be adjusted." Kindly check that the following:

If the issue persists, please share with us the Complete request and response logs, with the request-id generated for the error you encountered. Make sure to send these logs privately via the "Reply to Author" option or through our email (googleadsa...@google.com).



Let me know if you have any questions.
 

This message is in relation to case "ref:_00D1U1174p._5004Q2m9sBR:ref"


Thanks,
 
Google Logo Google Ads API Team


Joachim Løvgaard

unread,
Aug 17, 2023, 10:17:36 AM8/17/23
to Google Ads API and AdWords API Forum
Okay, here is what I did:

1. I created a new conversion action through the API with the type UPLOAD_CLICKS. Then I waited 24 hours
2. Then I uploaded a conversion to that conversion action which went perfectly
3. Then I tried to upload an enhanced conversion to the conversion action and I got the error again:

[2023-08-17 11:42:26] Uploading the enhanced conversion failed: Make sure you specify an active conversion action that can be adjusted., at conversion_adjustments[0].conversion_action

Are you sure this is supposed to work?

I am using the https://github.com/googleads/google-ads-php library to send requests. How do I retrieve the request, response and request id using that library?

Google Ads API Forum Advisor

unread,
Aug 17, 2023, 12:00:38 PM8/17/23
to joa...@loevgaard.dk, adwor...@googlegroups.com

Hi Joachim,

Thank you for your response.

In order to enable logging for the PHP client library, please refer to this API documentation on how to set this up(https://developers.google.com/google-ads/api/docs/client-libs/php/logging). After you have enabled logging please provide us with the complete logs(request and response with request ID) following this format, so we can investigate further and provide guidance on the errors you are experiencing.

You can provide it via Reply privately to the author option. If this option is not available, then send it instead on this email address googleadsa...@google.com

With that being said you may also refer to this link(https://developers.google.com/google-ads/api/docs/conversions/upload-clicks#create_clickconversion) for a few things to keep in mind when creating a ClickConversion. 

Joachim Løvgaard

unread,
Sep 12, 2023, 7:35:28 AM9/12/23
to Google Ads API and AdWords API Forum
Hi

I have managed to upload conversions and enhanced conversion to two different conversion actions now. However I got an error saying that I uploaded the enhanced conversion too late (> 24 hours after the initial conversion). I figured out (by reading this: https://developers.google.com/google-ads/api/docs/conversions/enhance-conversions) that I should upload the enhanced conversion within 24 hours of the initial conversion. Does that mean I could theoretically upload the enhanced conversion immediately after I upload the conversion? Or is it better to wait? Right now I have set the wait to 23H30M.

Reply all
Reply to author
Forward
0 new messages