google-ads-php: Missing request Id when we upload offline conversions
We are currently using v17 with php SDK v24.0.0. The request id is null for the conversion upload client for e.g
public function getConversionUploadClient(): ConversionUploadServiceClient
{
$oAuth2Credential = (new OAuth2TokenBuilder())
->withJsonKeyFilePath($this->config->getJsonFilePath())
->withScopes(self::SCOPES)
->withImpersonatedEmail($this->config->getImpersonatedEmail())
->build();
$this->googleAdsClient = (new GoogleAdsClientBuilder())
->withDeveloperToken($this->config->getDeveloperToken())
->withOAuth2Credential($oAuth2Credential)
->withLoginCustomerId((int) $this->config->getLoginCustomerId())
->withLogger($this->appLogger)
->withTransport('grpc')
->build();
return $this->googleAdsClient->getConversionUploadServiceClient();
}
$conversionUploadService = $this->googleAdsClient->getConversionUploadClient();
$clickConversions = $this->convertToClickConversion($customerId, $conversionActionId, $conversions);
$response = $conversionUploadService->uploadClickConversions(
UploadClickConversionsRequest::build($customerId, $clickConversions, true),
['withResponseMetadata' => true],
);
var_dump($conversionUploadService->getResponseMetadata()); This is always null
For conversionUploadClient the getResponseMetadata is always null but for search stream apis I get ResponseMedataObject with empty attributes. This one is from the https://developers.google.com/google-ads/api/docs/client-libs/php/response-metadata this example.
$stream = $googleAdsServiceClient->searchStream(
SearchGoogleAdsStreamRequest::build($customerId, $query),
['withResponseMetadata' => true]
);
dd($stream->getResponseMetadata());
This is what I get Google\Ads\GoogleAds\Lib\V17\GoogleAdsResponseMetadata^ {#35039
-metadata: []
}
There are some other people facing the same issue in this link https://github.com/googleads/google-ads-php/issues/1005
About this issue
- Original URL
- State: open
- Created 2 years ago
- Comments: 15 (15 by maintainers)
oh! Wow, I just don’t remember that at all 😅
Okay SGTM, please let me know if I can help!
@ujwaldhakal I’ve checked the file you mentioned and I don’t see anything related to this issue. Note that the response metadata is generated in other files listed in this PR. Would you able to debug your code in those files and check if the response metadata is created there?
Sorry for late response. I’ll take a look this week.