google-ads-php icon indicating copy to clipboard operation
google-ads-php copied to clipboard

Missing request Id when we upload offline conversions

Open ujwaldhakal opened this issue 4 months ago • 1 comments

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

ujwaldhakal avatar Oct 10 '24 08:10 ujwaldhakal