Posts tagged with google-ads-api

I am trying to upload user data using a google ads manager test account. The api I am trying to hit is 'https://googleads.googleapis.com/v10/customers/{customerId}:uploadUserData' . However upon sending request I am getting the following error.

"errors": [                     {                         "errorCodenter code heree": {                             "requestError": "RESOURCE_NAME_MISSING"                         },                         "message": "Resource name is missing."                     }                 ], 

. Though I am giving all the credentials and my body is correct. Attached a postman screenshot below. enter image description here

It is not the most common case, but I have installed GoogleAdsSDK for iOS, and its working ok on test banners supplied by Google. When I click on banner it opens other app / safari view.

What I was wondering is it possible to configure GoogleAdsSDK, so that I can check if URL provided is some link that I want open locally inside web view that is part of my app. For example, every link should be opened externally, but links starting with www.myshop... should be opened in web view that is part of my application?

For example GadBannerViewDelegate has these methods:

@protocol GADBannerViewDelegate <NSObject> @optional #pragma mark Ad Request Lifecycle Notifications /// Tells the delegate that an ad request successfully received an ad. The delegate may want to add /// the banner view to the view hierarchy if it hasn't been added yet. - (void)bannerViewDidReceiveAd:(nonnull GADBannerView *)bannerView; /// Tells the delegate that an ad request failed. The failure is normally due to network /// connectivity or ad availablility (i.e., no fill). - (void)bannerView:(nonnull GADBannerView *)bannerView     didFailToReceiveAdWithError:(nonnull NSError *)error; /// Tells the delegate that an impression has been recorded for an ad. - (void)bannerViewDidRecordImpression:(nonnull GADBannerView *)bannerView; /// Tells the delegate that a click has been recorded for the ad. - (void)bannerViewDidRecordClick:(nonnull GADBannerView *)bannerView; #pragma mark Click-Time Lifecycle Notifications /// Tells the delegate that a full screen view will be presented in response to the user clicking on /// an ad. The delegate may want to pause animations and time sensitive interactions. - (void)bannerViewWillPresentScreen:(nonnull GADBannerView *)bannerView; /// Tells the delegate that the full screen view will be dismissed. - (void)bannerViewWillDismissScreen:(nonnull GADBannerView *)bannerView; /// Tells the delegate that the full screen view has been dismissed. The delegate should restart /// anything paused while handling bannerViewWillPresentScreen:. - (void)bannerViewDidDismissScreen:(nonnull GADBannerView *)bannerView; 

Nothing here suggest that I can react to clicks to banner and handle that action, or even that is was ever intended to support it, but maybe I missed something?

I am trying to track a Click conversion with Google Ads using the Rest API but I can't find any helpful resources.

Right now the user flow looks like this:

User clicks on Ad -> User opens Website -> User downloads the Flutter App (gclid will be passed via dynamic links) -> User Signs up -> New Customer.io Event will be triggered (contains gclid) -> Upload conversion to Google Ads

The problem lies with the last step. In customer.io I can only use a Rest Call to upload the converion to Google Ads. I cannot use the client library of Google and I can't figure out from the documentation which call exactly I have to make here. (Unfortunatly Google itself is advising against using the Rest API but also states that it is possible by itself. Also I don't have any other options here than going the route via Customer.io and making the Rest Call)

I would really appreciate any kind of help, thank you!

I am utilizing the Google ads API to pull campaign data and I am having an issue where I would like to use a fixed date range in my query, but it seems to be unavailable as an option in the documentation.

Here is my query:

GAquery = """ SELECT     segments.date,     segments.device,     campaign.name,     metrics.clicks,     metrics.conversions,     metrics.conversions_value,     metrics.cost_micros,     metrics.impressions FROM    campaign WHERE segments.date DURING LAST_30_DAYS ORDER BY     metrics.clicks DESC""" # Issues a search request using streaming. response = ga_service.search_stream(customer_id=customer_id, query=GAquery) 

I am looking to get the LAST_60_DAYS instead of 30, but changing the LAST_30_DAYS to LAST_60_DAYS errors out. Has anyone found a way to code a rolling date range that is not a preset option in the system or are we stuck with only the preset options?

Thanks so much for your help. :)

I am using python to execute the query and retrieve the data from Google Ads I am trying to set start and end date as variable and use these in my query.

The query looks like this:

GAquery = """ SELECT     segments.date,     segments.device,     campaign.name,     metrics.clicks,     metrics.conversions,     metrics.conversions_value,     metrics.cost_micros,     metrics.impressions FROM    campaign WHERE segments.date >= '2021-12-01' AND segments.date <= '2022-02-27' ORDER BY     metrics.clicks DESC""" 

and it is executed by Google Function for Python

response = ga_service.search_stream(customer_id=customer_id, query=GAquery) 

This function does not have element params where i could use %s as placeholder in the query and then call it in params regular execute(sql,conn, params[Sdate,Edate] function in python.

So what i need to do is somehow break the query string, and add the dates in between. Something like this:

sdate = (dt.date.today() - dt.timedelta(days=60)) edate = dt.date.today() GAquery = """ SELECT     segments.date,     segments.device,     campaign.name,     metrics.clicks,     metrics.conversions,     metrics.conversions_value,     metrics.cost_micros,     metrics.impressions FROM    campaign WHERE segments.date """ + """>= """+ str(sdate) +""" AND segments.date""" +  """<=""" +str(edate) + """ ORDER BY     metrics.clicks DESC""" 

So basically i am trying to force variables into GAquery by breaking the query apart inserting it and stitching it together.

It is failing because i am not breaking it correctly and not adding it back together correctly.

Any idea how to handle this?