You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are trying to implement the Google Ads API to upload offline conversion data, but we are encountering an error from the API. Could you please check this and let us know the correct approach.
Your code uses CURL and other normal PHP commands, not the code of this client library.
Could you please double-check it again?
And the official supported PHP version is PHP 8.
If you wish to use PHP 7.4, please use the branch starting with legacy-.
HI Team,
We are trying to implement the Google Ads API to upload offline conversion data, but we are encountering an error from the API. Could you please check this and let us know the correct approach.
API Error is 404.
Below i have added code.
'customers/' . $customerId . '/conversionActions/' . $conversionActionId, 'conversionDateTime' => $conversionDateTime, 'conversionValue' => $conversionValue, 'currencyCode' => $currencyCode ]; // Convert to JSON $json_payload = json_encode(['operations' => [ [ 'create' => $offline_conversion_data, ], ]]); $ch = curl_init($api_url); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $json_payload); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); curl_close($ch); // Check for errors if ($response === false) { echo "Error in sending request.\n"; exit; } // Print the response (success or failure) echo "Response: " . $response . "\n";The text was updated successfully, but these errors were encountered: