Posts tagged with google-ads-api

I have a Basic Access Token for my manager account 1234567890 I also have one account under this manager account: 0987654321

I've then followed the documentation, installed libraries, generate OATH2, refresh token etc and filled the "google_ads_php.ini" fileand then:

I'm trying to run the example code in the google documentation:

    $oAuth2Credential = (new OAuth2TokenBuilder())         ->fromFile('/google_ads_php.ini')         ->build();     $googleAdsClient = (new GoogleAdsClientBuilder())         ->fromFile('/google_ads_php.ini')         ->withOAuth2Credential($oAuth2Credential)         ->build();           $googleAdsServiceClient = $googleAdsClient->getGoogleAdsServiceClient();     $query = 'SELECT campaign.id, campaign.name FROM campaign ORDER BY campaign.id';     $stream = $googleAdsServiceClient->searchStream($customerId, $query); 

In my google_ads_php.ini, I have this: loginCustomerId = "1234567890"

In the $customerId filed, I have this: "0987654321"

And I'm receiving this error: USER_PERMISSION_DENIED

Also just because I've started becoming crazy I did try all 4 possible combinations:

loginCustomerId = "1234567890" $customerId = "1234567890"

loginCustomerId = "0987654321" $customerId = "0987654321"

loginCustomerId = "0987654321" $customerId = "1234567890"

But I'm receiving this error in all the cases. Any help would be much appreciated

I am attempting to follow several guides to implement a API access to our own google ads api. The goal is to load spend and campaign information to our internal data warehouse so we can build reports etc.. Pretty straight forward. oh no!

We use a SaaS tool called Celigo to build interfaces to API's in this case the google API. I have followed the guides, which have not been simple for me to understand:)

After several failed attempt, I finally thought I was on the right lines, I enabled the API in GOOGLE CLOUD under my project. set up a OAuth consent screen. I then attempted to create credentials. however I get this internal error to which after much google-ing I can't find any support for. Does anybody have any experience of this issue? or help my unblock this part ? thanks in hope!

The request failed because one of the field of the resource is invalid.

Expecting to create oauth credentials

FYI guides I have been following are https://www.youtube.com/watch?v=HXKpfGqPRy0&t=1042s https://docs.celigo.com/hc/en-us/articles/360060770192-Set-up-a-connection-to-Google-Ads#Client-Info3

I am a Facebook ads expert and i've been using the same pixel across mutiple ad accounts for my Roofing clients and I am looking to do the same thing with Google, I am not much knowlegable about google ads but is it possible that we use the same pixel(or GTM) across different ad accounts? The goal is to track the conversion data across different ad accounts which will ultimately help us to drive lower CPL. I hope i can do that. What is your opinion?

I tried Fb ads and i used the same pixel codes and conversion APIs to track the progress using the same pixel data and I am looking to do the same thing with google but i don't know how can i do it

I have an Android app targets children. I want to create an app install campaign for it. But when i select it an conversion action for it isn't created automatically. And because app targets children i can't create a conversion action for it myself. I have multiple apps on Play Store. When i try it for them most of them are creates a conversion action automatically and some of them doesn't. Can you help? https://imgur.com/gallery/4B4axkV

I'm experiencing discrepancies between two queries I use to extract statistics from my video campaigns in Google Ads. Typically, I use the first query below to obtain general statistics for my video campaigns:

SELECT      segments.date,      campaign.name,      campaign.id,      metrics.cost_micros,      metrics.video_views,      metrics.impressions,      metrics.clicks,      metrics.conversions   FROM campaign   WHERE campaign.id IN (<google_ads_campaign_id>)  AND segments.date >= '2024-02-01'  AND segments.date <= '2024-02-01'  AND campaign.status IN (ENABLED, PAUSED) 

However, I'm attempting to expand my analysis to include the segment of YouTube videos through which my ads have been displayed. To achieve this, I've created a second query that includes the detail placement view report:

SELECT      detail_placement_view.group_placement_target_url,      detail_placement_view.placement,      detail_placement_view.placement_type,      detail_placement_view.target_url,      segments.date,      campaign.name,      campaign.id,      metrics.cost_micros,      metrics.video_views,      metrics.impressions,      metrics.clicks,      metrics.conversions   FROM detail_placement_view   WHERE campaign.id IN (<google_ads_campaign_id>)  AND segments.date >= '2024-02-01'  AND segments.date <= '2024-02-01'  AND campaign.status IN (ENABLED, PAUSED) 

My issue is that I'm noticing significant discrepancies between the data obtained from these two queries, particularly in metrics such as impressions. My goal is to understand whether these discrepancies are within normal variation or if there's an underlying issue causing them.

I would appreciate any guidance or suggestions on how to address this discrepancy and ensure the accuracy of my analyses.