Posts under category Google

Since we updated the Google Ads API from version 3 to 6 we get the error message "Fail to push the limit".

This happens if we try to link the Manager Account to the client.

return (new GoogleAdsClientBuilder())     ->fromFile()     ->withOAuth2Credential($oAuth2Credential)     ->withLoginCustomerId($loginCustomerId)     ->build(); 

Is there any way to increase the limit?

I'm a back end developer, sometimes a little fronted, but not a SEO related expert at all. Now I have to make a full website from top to bottom and I'm stuck with the Google stuff. First I created a Google Analytics profile, I got the srcipt that I needed to hardcode to all my site.

    <script async src="https://www.googletagmanager.com/gtag/js?id=G-MEASUREMENT_ID></script>     <script>       window.dataLayer = window.dataLayer || [];       function gtag(){dataLayer.push(arguments);}       gtag('js', new Date());       gtag('config', 'G-MEASUREMENT_ID');     </script> 

However, a little while later, I started to use Google Ads and it recommended to connect my Analytics page to the Ads page, so I connected them and I got another code that I needed to insert.

The code snippet is almost the same, except the two MEASUREMENT_ID, because now I got a UA-MEASUREMENT_ID.

So, do I have to use both snippets, or just one? If so, which MEASUREMENT_ID should I use? Or am I screwed up something?

Thanks all the help

I'm trying to display a bar chart that shows the performance of a Google ad between the 1st of March to the 31st of March. Each bar indicates a day in that range.

At the moment my query looks like

SELECT    ad_group_ad.ad.id,   ad_group_ad.ad.name,   metrics.average_cost FROM    ad_group_ad WHERE   segments.date BETWEEN '2021-03-01' AND '2021-03-31' AND ad_group_ad.status = 'ENABLED' 

The data I get back are totals within the range. I need the totals of each day within the range. Is there a way to get this information in one request?

I recently integrated google_mobile_ads plugin for Flutter after firebase_admob plugin got deprecated. Ever since then my Rewarded Ads stopped working. These are the errors I get:

(13077): This request is sent from a test device. E/chromium(13077): [ERROR:cookie_manager.cc(137)] Strict Secure Cookie policy does not allow setting a secure cookie for http://googleads.g.doubleclick.net/ for apps targeting >= R. Please either use the 'https:' scheme for this URL or omit the 'Secure' directive in the cookie value. W/Ads (13077): #004 The webview is destroyed. Ignoring action.

My code is as below:

void main() {   WidgetsFlutterBinding.ensureInitialized();   MobileAds.instance.initialize();   InAppPurchaseConnection.enablePendingPurchases();   runApp(MyApp()); } class _RewardedVideoState extends State<RewardedVideo>{   bool _rewardedReady = false;   RewardedAd _rewardedAd;   static final AdRequest _adRequest = AdRequest(     keywords: <String>['Puzzles', 'Games', 'Word Games'],     nonPersonalizedAds: true,   );   @override   void didChangeDependencies() {     createRewardedAd();     super.didChangeDependencies();   }   void createRewardedAd([Score userScore]) {     print('Inside createRewardedAd');     // RequestConfiguration.Builder().setTestDeviceIds(Arrays.asList("CFA70A4A1BD59DA3323D586CA8BD2541"))     _rewardedAd = RewardedAd(       adUnitId: RewardedAd.testAdUnitId,       request: _adRequest,       listener: AdListener(           onAdLoaded: (Ad ad) {             print('${ad.runtimeType} loaded. RADHA ');             _rewardedReady = true;           },           onAdFailedToLoad: (Ad ad, LoadAdError error) {             print('${ad.runtimeType} failed to load: $error');             ad.dispose();             _rewardedAd = null;             createRewardedAd(userScore);           },           onAdOpened: (Ad ad) => print('${ad.runtimeType} onAdOpened.'),           onAdClosed: (Ad ad) {             print('${ad.runtimeType} closed.');             ad.dispose();             createRewardedAd(userScore);           },           onApplicationExit: (Ad ad) =>               print('${ad.runtimeType} onApplicationExit.'),           onRewardedAdUserEarnedReward: (RewardedAd ad, RewardItem reward) {             userScore.updateHintsEarned(reward.amount);           }),     )..load();     print('Completed RewardedAd Load ' + _rewardedAd.toString());   }   @override   void dispose() {     _rewardedAd.dispose();     super.dispose();   }   @override   Widget build(BuildContext context) {     final Score userScore = Provider.of<Score>(context, listen: false);     print('Inside RewardedVideo widget *** ........');     try {       if (_rewardedReady) {         print('Showing rewardedAd ***');         _rewardedAd.show();         _rewardedReady = false;         _rewardedAd = null;       } else         createRewardedAd(userScore);     } catch (e) {       print("error in showing ad: " + e.toString());     }     return SizedBox(       height: 0,     );   } } 

I am able to get banner ads (not included in this code) but rewarded ad does not load at all. Any idea what might be going wrong here?