Upload Click Conversions using Manager account

482 views
Skip to first unread message

Wesley van Opdorp

unread,
Nov 16, 2021, 9:50:13 AM11/16/21
to AdWords API and Google Ads API Forum
Hello,

I'm having some trouble trying to upload click conversions using the api.

The error I'm receiving is:
This customer does not have an import conversion action that matches the conversion action provided

Let me provide me some context as how we've come to receive this error.

Our account structure:
  • Manager
    • Sub Manager
      • Account 1
      • Account 2
Some notes:
  • We use the Manager accounts id as customerId.
  • The import from clicks conversion action is configured under the Manager.
  • For testing purposes we've generated a gclid from a campaign that does not use cross account actions.
Authentication and client setup
The $loginCustomerId corresponds with the Manager id formatted to int.
---
$oAuth2Credential = (new \Google\Ads\GoogleAds\Lib\OAuth2TokenBuilder())->from($configuration)->build();
$googleAdsClient = (new GoogleAdsClientBuilder())
  ->withOAuth2Credential($oAuth2Credential)
  ->withDeveloperToken($developerToken)
  ->withLoginCustomerId($loginCustomerId)
  ->build()
;

Retrieving the action through the api
Because of the error I made an attempt to fetch the action through the api to make sure that we're using the correct customerId and actionId.
---
$action = $googleAdsClient->getConversionActionServiceClient()->getConversionAction(ResourceNames::forConversionAction($loginCustomerId, $actionId));
echo $action->getOwnerCustomer(); // Same as $loginCustomerId
echo $action->getId(); // Same as $actionId


Uploading click conversion
The following snippet attempts to upload the conversion. The $loginCustomerId and $actionId haven't changed from the snippets above.

---
$clickConversion = new ClickConversion([
    'gclid' => 'Generated gclid from Account 1',
    'conversion_action' => ResourceNames::forConversionAction($loginCustomerId, $actionId),
    'conversion_value' => 0.01,
    'conversion_date_time' => (new \DateTime())->format('Y-m-d H:i:sP'),
    'currency_code' => 'EUR',
]);
$uploadClient = $googleAdsClient->getConversionUploadServiceClient();
$response = $uploadClient->uploadClickConversions($loginCustomerId, [$clickConversion], true);

The documentation has a lot of criteria that must be in place for this in order to work and I've been trying to make sense of them all. I'm just going to duplicate them here, and write down my comments.
  • The ConversionActionType is UPLOAD_CLICKS.
    • $action->getType() returns 7 === UPLOAD_CLICKS.
  • The status of the ConversionAction is ENABLED.
    • It's enabled in the UI dashboard.
  • The ConversionAction exists in the effective conversion account of the click's Google Ads account.
    • This one has me doubting - the click comes from a account that does not have cross-account conversions enabled, but is still using it's own conversion goals pulled from Google Analytics.
  • At the time of the click, conversion tracking was enabled in the effective conversion account of the click's Google Ads account.
    • I'm not sure what this means - help?
  • Starting with v8 of the Google Ads API, the customer_id of the UploadClickConversionsRequest must be the customer ID of the owner_customer of each click conversion's conversion_action.
    • The action's owner is the same as our $loginCustomerId.
I'm having the idea that the account from which the click originated needs to have cross account tracking configured for this to work properly? Could someone please confirm this that this is a problem?

Google Ads API Forum Advisor

unread,
Nov 16, 2021, 2:36:34 PM11/16/21
to w.van....@bambelo.com, adwor...@googlegroups.com
Hi Wesley,


You have  generated a gclid from a campaign that does not use cross account actions. If you meant that the campaign is in another account then it will go up against the rule that The ConversionAction has to exist in the effective conversion account of the click's Google Ads account. The GCLID is already attributed to the account and campaign it was produced from and cannot be attributed to another account or campaign.

Product support documentation states that Google Click ID (GCLID) is a parameter passed in the URL with ad clicks, to identify the campaign and other attributes of the click associated with the ad for ad tracking and campaign attribution. It’s required for Google Ads website conversion tracking and also used to link data between Google Ads and Google Analytics. It can also be used in conjunction with features like offline conversion tracking.

At the time of the click there has to be an enabled conversion action in order to receive a conversion that happened later. If the conversion action was created later than the click, you will not be able to upload a subsequent conversion for that click. 

It's up to you to enable cross account conversion tracking on any specific account. Without enablement, you can have the account itself have its own conversion tracking. Google Analytics is beyond our scope, if they create conversion actions that the API can see then possibly you can use that conversion action. You may receive support from Google Analytics support. Feel free to get back to us.

Reminder: Share your feedback about the Google Ads (AdWords) API! Take the 2021 Google Ads API and AdWords API Annual Survey

Regards,
 
Google Logo
Aryeh Baker
Google Ads API Team
 

 

ref:_00D1U1174p._5004Q2R9Tqp:ref
Reply all
Reply to author
Forward
0 new messages