How defined conversionName in clickConversion properties ?

256 views
Skip to first unread message

Guillaume BONNAIRE

unread,
Apr 12, 2022, 3:47:06 AM4/12/22
to Google Ads API and AdWords API Forum

Hi,


Extract of my code PHP / example in google api php

// $customerId is account number 1231231234 from 123-123-1234
// $conversionActionId is number after AW-XXXXXXX 
$data = array( 
    'conversion_action' => \Google\Ads\GoogleAds\Util\V9\ResourceNames::forConversionAction($customerId, $conversionActionId),
    'conversion_value' => $conversionValue,
    'conversion_date_time' => $conversionDateTime,
    'currency_code' => 'EUR' );
$clickConversion = new \Google\Ads\GoogleAds\V9\Services\ClickConversion($data);
$clickConversion->setGclid($gclid);
$conversionUploadServiceClient = $googleAdsClient->getConversionUploadServiceClient();
/** @var UploadClickConversionsResponse $response */ 
$response = $conversionUploadServiceClient->uploadClickConversions( $customerId, [$clickConversion], true );

In my console in Google Ads, in Tools and settings > Measure > Conversions, i have a list of conversion name. And i search to push lead converted, defined by GCLID in this one specific conversion name with Google API php.

My question : how can i defined conversionName in clickConversion properties ?

Thanks for your help

Google Ads API Forum Advisor

unread,
Apr 12, 2022, 2:08:23 PM4/12/22
to guillaume...@gbonnaire.fr, adwor...@googlegroups.com

Hello Guillaume,

Thanks for reaching out to the Google Ads API support team. By using conversion_action.resource_name attribute field you can get all the information of the resource name of the conversion action FROM conversion_action resource. Hope this helps, feel free to get back to us if you have any questions.

Best Regards,

Google Logo
Jakeia Sabrina
Google Ads API Team
 

ref:_00D1U1174p._5004Q2a2CBG:ref
Message has been deleted
Message has been deleted

Google Ads API Forum Advisor

unread,
Apr 14, 2022, 11:28:01 AM4/14/22
to guillaume...@gbonnaire.fr, adwor...@googlegroups.com

Hello Guillaume,

Thanks for replying back. Please note that our API team only addresses API related issues and concerns. Yes, your concern is correct on this point (in this string "{customer_id }" is it the account number in the top right of google ads ? and "{conversion_action_id}" is the number about conversion action in Google Ads ?).

I would recommend that if you're confused with your MCC/CID accounts, you can login your MCC/CID account from this link for verification to get the account ID. If this solution does not work then please reach out to the Product Support team via this link for further assistance to find your accounts. Let me know if you have any questions.

Best Regards,

Google Logo
Jakeia
Google Ads API Team

Google Ads API Forum Advisor

unread,
Apr 19, 2022, 9:49:27 AM4/19/22
to guillaume...@gbonnaire.fr, adwor...@googlegroups.com
Hello Guillaume,

Thanks for replying back. Please let me know if you are facing any issue to get all (customer.id, conversion_action.id, and conversion_action.resource_name) fields records details by using conversion_action resource. As you mentioned you have several actions conversion with the same tag AW-XXXX.
Let me know if you have any questions.

Best regards,

Guillaume BONNAIRE

unread,
Apr 20, 2022, 5:24:25 AM4/20/22
to Google Ads API and AdWords API Forum
Hello,

For moment, i make import directly with file on Google Ads.

In my conversions action, i have created conversion action with API (CRM). But i don't found direclty id. I search on URL and i found an Id (ctId), i think is this Id, now i need to try. But for try i need good GCLID.

Do you have a Gclid test, to check on account test ?

Google Ads API Forum Advisor

unread,
Apr 21, 2022, 3:43:07 AM4/21/22
to guillaume...@gbonnaire.fr, adwor...@googlegroups.com

Hi Guillaume,
 

Thanks for your response. I am also a member of the Google Ads API team and let me provide support to your concern.
 

Moving forward to your concern, I am afraid that our team has no GCLID test to check on the account test.


As for your concern about getting the conversion action ID of a specific conversion action name to be supplied in the conversion upload request, I suggest you use this conversion_action with conversion_action.id and conversion_action.name.
 

Let us know if you have further questions.


Regards,

Google Logo
Darwin
Google Ads API Team
 


ref:_00D1U1174p._5004Q2a2CBG:ref

Guillaume BONNAIRE

unread,
Apr 21, 2022, 5:57:02 AM4/21/22
to Google Ads API and AdWords API Forum
Hello,

Thank for your answer.

We can close this thread, and i continue discover possibility with this API. If i need your help again, I will reopen this thread or create a new thread.

Thank a lot,

Regards,

Guillaume

Google Ads API Forum Advisor

unread,
Apr 21, 2022, 9:52:10 PM4/21/22
to guillaume...@gbonnaire.fr, adwor...@googlegroups.com

Hi Guillaume,
 

Thank you for your response. If you have any concerns for our team let us know. We will be happy to address it.
 

Reply all
Reply to author
Forward
0 new messages