Posts under category google-ads-api

If I enable Auto tagging for my Google ad URLs, is the gclid parameter the only parameter that gets added?

Like "?gclid=xyz123"?

No "utm_source" or "utm_medium" or anything else gets added as well?

Reason for confirming is the destination collecting the referral data says they can only handle on key/value parameter.

Thanks!

When you set up a campaign in google adwords you can add negative keywords to it so that the searchquery may not match your campaign if it has the negative keyword.

I want to extract the list of the negative keywords per each campaign. In the documentation I was able to find this example:

def retrieve_negative_keywords(report_utils)   report_definition = {     :selector => {       :fields => ['CampaignId', 'Id', 'KeywordMatchType', 'KeywordText']     },     :report_name => 'Negative campaign keywords',     :report_type => 'CAMPAIGN_NEGATIVE_KEYWORDS_PERFORMANCE_REPORT',     :download_format => 'CSV',     :date_range_type => 'TODAY',     :include_zero_impressions => true   }   campaigns = {}   report = report_utils.download_report(report_definition)   # Slice off the first row (report name).   report.slice!(0..report.index("\n"))   CSV.parse(report, { :headers => true }) do |row|     campaign_id = row['Campaign ID']     # Ignore totals row.     if row[0] != 'Total'       campaigns[campaign_id] ||= Campaign.new(campaign_id)       negative = Negative.from_csv_row(row)       campaigns[campaign_id].negatives << negative     end   end   return campaigns end 

Which is written in Ruby and there are no Python examples for this task. There is also a report for the negative keywords but it holds no metrics and I can't use it to retrieve the list of negative keywords per each campaign.

I am using this structure to query the database:

report_query = (adwords.ReportQueryBuilder()                         .Select('CampaignId', 'Id', 'KeywordMatchType', 'KeywordText')                         .From('CAMPAIGN_NEGATIVE_KEYWORDS_PERFORMANCE_REPORT')                         .During('LAST_7_DAYS')                         .Build()) 

But querying it gives an error:

googleads.errors.AdWordsReportBadRequestError: Type: QueryError.DURING_CLAUSE_REQUIRES_DATE_COLUMN

When I add Date it throws the same error.

Has anyone been able to extract the negative keyword list per campaign using Python with the Google Adwords API reports?

I am trying to connect to the google ads api using a service account. For analytics there is a good article named Hello Analytics API: Java quickstart for service accounts which explains how to set this up. For Google ads I can't find any documentation online.

So my two questions are:

  1. Is it possible to access the Google Ads API using a service account?
  2. If so, is there something like a Hello Ads API: Java quickstart for service accounts page with information on how to connect to the api with a service account?

UPDATE 2/10

I succeeded in passing the authentication fase. I do get an error when trying to fetch data from the API.

curl.exe --request POST "https://googleads.googleapis.com/v5/customers/******/googleAds:searchStream" --header "Content-Type: application/json"  --header "Authorization: Bearer ******"  --header "developer-token: ******"  --data "{'query': 'SELECT * FROM campaign WHERE segments.date DURING YESTERDAY'}" [{   "error": {     "code": 401,     "message": "Request is missing required authentication credential. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.",     "status": "UNAUTHENTICATED",     "details": [       {         "@type": "type.googleapis.com/google.ads.googleads.v5.errors.GoogleAdsFailure",         "errors": [           {             "errorCode": {               "authenticationError": "NOT_ADS_USER"             },             "message": "User in the cookie is not a valid Ads user."           }         ]       }     ]   } } ] 

The google docs say this error is because the account is not associated with an google ads account (https://developers.google.com/google-ads/api/docs/best-practices/common-errors#not_ads_user). The request are being processed by the api, I know this because the request are counted in the google ads api console as errors.

In the Credentials compatible with this API for the google ads Api my service account is listed. I am a little puzzled by the error. The service-account is associated with the google ads account as far as I could tell.

does anybody know if there is a way how to create a label for a keyword using Google Ads API? It can be done using the web interface and apparently it could be done using the Adwords API, but I can't find a way how to do it using Google Ads API so I don't know if it's a feature which they didn't implement or if I'm blind.

Their documentation says

Labels allow you to categorize your campaigns, ad groups, ads, and keywords, and use those categories to simplify your workflow in a variety of ways.

which would suggest that it CAN be done, however below on the same page it states

You can assign labels to your campaigns, customers, ad groups, criteria, or ads.

No word about keywords. I am working with PHP / Laravel and I am using their official php package for the API communication. The package has classes like CampaignLabelOperation, CustomerLabelOperation, AdGroupLabelOperation, etc. but NO "KeywordLabelOperation".

Anybody have a clue if I just can't find it or whatever I could do? Thanks a lot for any help

I am not that experienced with working with the Google dashboards, and the last of couple of days I have been struggling a lot with an issue. I am not sure if this is even possible and how, but reading a lot of documentation left me blurry.

Background: We place a cookiebanner and cookies using Google Tag Manager (GTM) on our website. At this moment we load the 'Google Analytics - Universal Analytics' using GTM. We collect anominized data using GA, and the analytics data is showing up in our GA dashboard and is working perfectly. So far, so good.

Challenge: Now our marketing team wants to use Google Ads to draw people to our website. They also want to track conversion using Google Analytics combined with Google Ads. In the settings of Google Ads, the GA and Google Ads data is linked. According to the GDPR we need to explicitly ask permission to our users to process the data in this way (Targeting/remarketing). Using GTM we now implemented a cookie banner on our website, in which we ask consent about processing the data for marketing purposes. Is it possible to couple this consent question using GTM to enable/disable the link between our anominized GA data and Google Ads? If so, how?

If there are better practice solutions for my issue, I would like to hear :)

Thanks!