Posts tagged with google-ads-api

I am developing a google ads script to run and create negative keywords, i get the performance using an SQLreport and when i try to create a negative keyword it does not work because when i try to return existing adgroups and initialize them, i get an empty result.

var adGroups = AdsApp.adGroups().get(); Logger.log('Total adGroups found : ' + adGroups.totalNumEntities()); 

This returns: Total AdGroups found : 0 -> but i have multiple running ads/adgroups in that sub-account.

I want to return the result printed , to use in other function.

Here is the code:

"Keyword idea text '%s' has %d average monthly searches and competition as %d.%s", $result->getText()->getValue(), is_null($result->getKeywordIdeaMetrics()) ? 0 : $result->getKeywordIdeaMetrics()->getAvgMonthlySearches()->getValue(), is_null($result->getKeywordIdeaMetrics()) ? 0 : $result->getKeywordIdeaMetrics()->getCompetition(), PHP_EOL ); return 

The result is like : Keyword idea text 'a' has 1600 average monthly searches and competition as 4. Keyword idea text 'b' has 10 average monthly searches and competition as 2. Keyword idea text 'c' has 10 average monthly searches and competition as 4.

this is how is printed

i want to return like "a,b,c"

How to store this result in one string and to retunr ....so then i can use in other function

Does YouTube offer an API for third party platforms for ad creation and execution? I know YouTube has an ads reporting API available through Google Ad Words but I'm trying to find if we can build an ad serving API. I searched here and found someone said no but I can find little info on why or where they got this info. The use case is for clients to create and launch YouTube ads from a third party platform via an API connection.

So here's the problem leading to that question: I've got a tracking script that is causing my Google Ads text ads to be disapproved for having "Malicious or unwanted software." Neither is on the script.

The PHP script is encoded using eval(gzinflate(substr(base64_decode. Since hacked websites are often encoded (again, the one in question is not hacked), I'm wondering if Google is able to recognized that the site is encoded and that's triggering the red flag.

Thanks for any help on this.

Tasked with writing a client to interact with Google Ad Manager. From what I can tell there are three "official" python client libraries on PyPi released by Google. One seems to be legacy, as indicated in its README, but the other two seem to be actively developed.

https://github.com/googleapis/google-api-python-client (Legacy, first release = 2011)

https://github.com/googleads/googleads-python-lib (first release = 2014)

https://github.com/googleads/google-ads-python (first release = 2018)

The latter two have the same three developers. Which to use?