Posts tagged with google-ads-api

I'm integrating Interstitial ads in my flutter project. But When I declare like this

 InterstitialAd? _interstitialAd; 

I am getting this error:

33:17: Error: Null safety features are disabled for this library. Try removing the package language version or setting the language version to 2.12 or higher.   InterstitialAd? _interstitialAd;                 ^ lib/admob_service.dart:64:20: Error: Null safety features are disabled for this library. Try removing the package language version or setting the language version to 2.12 or higher.     _interstitialAd!.fullScreenContentCallback = FullScreenContentCallback(                    ^ lib/admob_service.dart:79:20: Error: Null safety features are disabled for this library. Try removing the package language version or setting the language version to 2.12 or higher.     _interstitialAd!.show(); 

I saw some stackoverflow answers and tried to upgrade the sdk version from

environment:   sdk: ">=2.7.0 <3.0.0" 

to

environment:   sdk: ">=2.12.0 <3.0.0" 

Then I got errors in my whole project.The error message is :

Error: Cannot run with sound null safety, because the following dependencies don't support null safety:  - package:local_database  - package:auto_size_text  - package:queue

Is there any way other than declaring this : InterstitialAd? _interstitialAd;

Hello wonderful person!

I've followed this guide to import google ads campaign info to a BigQuery database.

My goal is to create a simple query that can be stored as a view and accessed from Data Studio to make a report. But some fields like AverageCpm are always set to 0.

I also have a data studio report made using google ads as source for reference and I can access all the campaigns from the google ads platform.

Here is the query I'm working on:

SELECT   c.ExternalCustomerId,   c.CampaignName as name,   c.CampaignStatus,   cs.date as dia,   SUM(cs.Impressions) AS Impressions,   SUM(cs.Interactions) AS Interactions,   AVG(cs.AverageCpm)  AS CPM,   SUM(cs.Cost)  AS Cost FROM   `<DB>.google_ads.Campaign_<ACCOUNT_ID>` c LEFT JOIN   `<DB>.google_ads.CampaignStats_<ACCOUNT_ID>` cs ON   (c.CampaignId = cs.CampaignId    AND cs._DATA_DATE BETWEEN    DATE_ADD(CURRENT_DATE(), INTERVAL -80 DAY) AND DATE_ADD(CURRENT_DATE(), INTERVAL -1 DAY)) WHERE   c._DATA_DATE = c._LATEST_DATE   and c.CampaignName = 'THE_NAME_OF_MY_CAMPAIGN' GROUP BY   1, 2, 3 , 4 ORDER BY   CampaignName, dia 

The field Impressions, returns with a value that is consistent with my reference datastudio report and the info I see in google ads stats, so I feel I'm in the right track.

My problem is that some fields like CampaignStats.AverageCpm , CampaignStats.Cost are always 0.

For example, the query:

Select * from `<DB>.google_ads.p_CampaignStats_<ACCOUNT_ID>` where AverageCpm >0; 

Returns with no results.

I'm thinking permission problems? But I have administrator access to all the company's accounts.

Database is backfilled correctly.

I've tried generating a new dataset: Same problem and I don't see if there is a way to configure how google makes the imports.

What else could it be? What else can I do?

Thank you very very much!

I'm using google adwords api to create campaigns and ads. I keep getting this error :Unauthorized CREATE operation in invoking a service's mutate method. I'm using a manager account. I tried with a test account and it was working but with my manager account it doesnt. PS : My developer token has a basic access.

 const client = new GoogleAdsApi({   client_id: req.headers["client_id"],   client_secret: req.headers["client_secret"],   developer_token: req.headers["developer_token"], }); const customer = client.Customer({   customer_id: req.headers["customer_id"],   refresh_token: req.headers["refresh_token"], });   const ad_group_ad = [     {       ad: {         responsive_display_ad: {           accent_color: req.body.pubGads.couleurs_perso,           main_color: req.body.pubGads.couleurs_perso,           marketing_images: marketing_images_tab.map((element) => {             return {               asset: element,             };           }),           square_logo_images: square_logo_images_tab.map((element) => {             return {               asset: element,             };           }),           square_marketing_images: square_marketing_images_tab.map(             (element) => {               return {                 asset: element,               };             }           ),           headlines: headlinesTab.map((element) => {             return {               text: element,             };           }),           long_headline: {             text: req.body.pubGads.titre_long,           },           descriptions: descriptionsTab.map((element) => {             return {               text: element,             };           }),           business_name: req.body.pubGads.nom_entreprise,           call_to_action_text: req.body.pubGads.texte_incitation,         },         final_urls: req.body.pubGads.url_finale.split(","),       },       ad_group: adGroupResults.results[0].resource_name,       status: enums.AdGroupAdStatus.PAUSED,     },   ];   const ad_group_ad_result = await customer.adGroupAds.create(ad_group_ad); 

I am using Google Ads to get some traffic to my website.

I am tracking the conversions through Google Analytics

I can see my conversions on Google Analytics, but Google Ads is not counting any conversion

Here the goal configuration

The 36 conversions Which I have from Google are traffic through Google Ads and not organic. But on my Google Ads dashboard, I have 0 conversions.

The website is built with react, which could be a little tricky sometimes with tags, and Google Analytics is loaded through Google Tag Manager. I do not think the problem is coming from GTM configuration as we do have the conversions on Google Analytics