Posts under category Google

I want to use reporting HTTP endpoints for that I send a request with postman But every time I getting AUTHENTICATION_ERROR.

My oAuth2 response :

{"token":{"access_token":"ya29.a0AfH6SMCyU5L******","refresh_token":"1//09Iryk6eZYKj0CgYIA********","scope":"https://www.googleapis.com/auth/youtube.upload https://www.googleapis.com/auth/youtube.readonly https://www.googleapis.com/auth/adwords","token_type":"Bearer","expiry_date":1624622265323}}

I used "ya29.a0AfH6SMCyU5L******" as access_token for request header.

And my postman request like that:

Where did I make mistake? How can I solve this issue?

I want to create a ads video reporting tool. So I used Google Ads API. For that I need to get customer ID. There are some programming examples. But I want to use an HTTP request endpoint. I cannot find any method for getting customer ID's with HTTP request. Is there any method for getting customer_id with HTTP request?

On my website i generate leads via iframe forms. Based on the 'thank you page' i add an value to the url string like:

https//www.website.nl/thank-you?ids=5

the ids value of 5 is the value from the lead conversion (let's say $5,-)

with this script i push the value to Google Ads.

    <?php if ( is_page(123) ) { if (isset($_GET["ids"]) && (is_numeric($_GET["ids"])) ) {         $value = (float)str_replace(",",".",$_GET["ids"]);       $value = sprintf("%01.2f", $value); }else{          $value = sprintf("%01.2f", 0);  } echo '<script>  gtag("event", "conversion", {    "send_to": "AW-*****",        "value": '. $value .',     "currency": "EUR"  }); </script>';  }?> 

The above code worked great until my partner added automaticly a lead ID on the end of the url. now the thank-you url is e.g. https//www.website.nl/thank-you?ids=5&id=12345

Now my script won't work anymore... how to fix? any ideas? probably i can't add my ids to the end of the url, because i need to fill in the thank-you url in the iframe static.

hope anyone can help me out to measure conversion values again and send them over to Google Ads :)

So I've queried the location_view resource using the code shown below. I've tried something similar using the geographic_view, but it also leads to the same problem. This problem is that metrics like average_cost or average_cpc are ~2800000. Now this obviously can't be correct. I was wondering if anyone has had a similar problem or if maybe, the actual value is multiplied by a factor of 1M or something

from google.ads.googleads.client import GoogleAdsClient credentials = { "developer_token": "xx", "refresh_token": "xx", "client_id":"xx", "client_secret": "xx"}  client = GoogleAdsClient.load_from_dict(credentials) query = """ SELECT location_view.resource_name, segments.date, metrics.average_cost, metrics.average_cpc, metrics.clicks, metrics.conversions, metrics.cost_micros, metrics.cost_per_conversion, metrics.impressions, metrics.interactions, metrics.interaction_rate, campaign.id, campaign.name, campaign.end_date, campaign.start_date FROM location_view WHERE segments.date DURING LAST_30_DAYS""" ga_service = client.get_service("GoogleAdsService") search_request = client.get_type("SearchGoogleAdsStreamRequest") search_request.customer_id = "xx" search_request.query = query test = [] response = ga_service.search_stream(search_request) for batch in response:         for row in batch.results:            test.append(row)  

I am trying to create a customer client in my Google Ads test account but I receive the following error:

{"errors":[{"error_code":{"not_allowlisted_error":"CUSTOMER_NOT_ALLOWLISTED_FOR_THIS_FEATURE"},"message":"Customer is not allowlisted for accessing this feature."}],"request_id":"ApWtRj1nJ19MiT-I2Y3EoA"} 

This is my code for creating the customer client (I am using the google-ads-api library)

const client = new GoogleAdsApi({     client_id,     client_secret,     developer_token }); let managerId = "xxx"; let testAccountId = "xxx"; let refreshToken = "xxx"; const customer = client.Customer({     login_customer_id: testAccountId,     customer_id: testAccountId,     refresh_token }); const response = await customer.customers.createCustomerClient({     customer_id: managerId,     customer_client: {         currency_code: "EUR",         descriptive_name: "My customer client",         time_zone: "Europe/London",         resource_name: `customers/${managerId}`     },     email_address: "test@test.io",     access_role: "STANDARD",     validate_only: false,     toJSON: null, }); console.log("response:", response); 

This only thing I can find about it is here: [1]: https://developers.google.com/google-ads/api/reference/rpc/v5/NotAllowlistedErrorEnum.NotAllowlistedError

But it does not clarify anything. I can also not test it on my production Google Ads account since my developer token has to been validated.

Why can't I create a customer client account?