googleads / googleads/google-ads-php
Missing request Id when we upload offline conversions
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 357
- Forks
- 276
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 3
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the uploadClickConversions call on ConversionUploadServiceClient with ['withResponseMetadata' => true], then compare its getResponseMetadata() result with the GoogleAdsServiceClient searchStream example. Trace the response metadata handling for these two client entry points and review issue #1005. Done means the conversion upload request exposes the expected request metadata or the limitation is documented with a verified explanation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- grpc, php
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100