Posts under category google-ads-api

When user don't have an internet connection i want to show a black fullscreen popup that include like

"you should open your internet to use this app"

or

"no internet connection found please open it"

every minutes for show my google ads; and popup will countdown from 5 second for close the popup.

And i don't want to be banned from google ads because of illegal behaviours.

Is it forbidden or illegal with google ads policy, i didn't see any information about this on google ads docs?

I want to link and view the analytics account linked with Google Adwords.

Procedure used:

  1. Authenticating google account with scopes "Ananlytics and Adwords" with following url https://www.googleapis.com/auth/adwords https://www.googleapis.com/auth/analytics
  2. After getting the authentication response creating Google analytics service object.
  3. Google ads link API throwing error "Insufficient Premissions" screenshot attached

Script :

<?php //function to authenticate google account and create analytics service object function googleAuth(){         if (!empty($code)) {                         $postFields = 'client_id=' . Configure::read('GOOGLE_OAUTH_CLIENT_ID') . '&client_secret=' . Configure::read('GOOGLE_OAUTH_CLIENT_SECRET') . '&code=' . $code . '&grant_type=authorization_code&redirect_uri=' . Configure::read('GOOGLE_OAUTH_REDIRECT_URI');                         $ch = curl_init();                         curl_setopt($ch, CURLOPT_URL, 'https://accounts.google.com/o/oauth2/token');                         curl_setopt($ch, CURLOPT_POSTFIELDS, $postFields);                         curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);                         curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);                         curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);                         $Rec_Data = curl_exec($ch);                         if (curl_exec($ch) === false) {                                 return $Rec_Data;                         }                         $Rec_Data = json_decode($Rec_Data, true);                         if (isset($Rec_Data['refresh_token'])) {                                                                  try {                                         $credentials = array('client_id' => Configure::read('GOOGLE_OAUTH_CLIENT_ID'), 'client_secret' => Configure::read('GOOGLE_OAUTH_CLIENT_SECRET'), 'redirect_uris' => array(Configure::read('GOOGLE_OAUTH_REDIRECT_URI')));                                         $client = new \Google_Client($credentials);                                                                                                  $client->addScope(\Google_Service_Analytics::ANALYTICS_READONLY);                                                 $client->setAccessToken($Rec_Data['access_token']);                                                 // Create an authorized analytics service object.                                                 $analytics = new \Google_Service_Analytics($client);                                                                          } catch (Exception $e) {                                         echo 'Caught exception: ', $e->getMessage(), "\n";                                         die();                                                                          }                         }                 } else {                         if (!empty($id)) {                                 header("Location:https://accounts.google.com/o/oauth2/auth?response_type=code&client_id=" . Configure::read('GOOGLE_OAUTH_CLIENT_ID') . "&redirect_uri=" . Configure::read('GOOGLE_OAUTH_REDIRECT_URI') . "&access_type=offline&approval_prompt=force&state=" . $id . "&scope=https://www.googleapis.com/auth/adwords https://www.googleapis.com/auth/analytics");                                 exit;                         }                 } } //function to fetch linked account list function adwordsLinkAnalytics($analyticsAuth){                 $this->autoRender = false;                          try {                         $adWordsLinks = $analyticsAuth->management_webPropertyAdWordsLinks                                 ->listManagementwebPropertyAdWordsLinks('123456', 'UA-123456-1');                 } catch (apiServiceException $e) {                         print 'There was an Analytics API service error '                         . $e->getCode() . ':+' . $e->getMessage();                         exit;                 } catch (apiException $e) {                         print 'There was a general API error '                         . $e->getCode() . ':-' . $e->getMessage();                         exit;                 }                 pr($adWordsLinks);                 exit;                  } 

Required result: List of the analytics account linked with adwords account.

RewardedVideoAd is deprecated. What is the new alternative?

    void loadAds(){         RewardedVideoAd mRewardedVideoAd;         mRewardedVideoAd.loadAd(rewarded_id, new AdRequest.Builder().build());         mRewardedVideoAd = MobileAds.getRewardedVideoAdInstance(this);         mRewardedVideoAd.setRewardedVideoAdListener(new RewardedVideoAdListener() {         @Override         public void onRewardedVideoAdLoaded() {             AppUtils.showLog("REWARDED", "onRewardedVideoAdLoaded");         }         .....         .....     } 

I set Google Ads search and responsive display campaigns and enabled the manual UTM tag for GA analytics. As I want to know which ad format the traffics are from so I use 'Video', 'Display' and 'Text' as medium parameter.

However, when the campaigns were launched and reported in GA, a great amount of traffic are still from 'google / cpc', even though the destination URL are shown with correct UTM tag. It doesn't seem like the utm is incorrect when there are some traffics that are successfully reported as 'google / text' as well. Image 1: GA's source/medium report shows 'google / cpc' even though the destination url uses 'text' or 'display' as a medium

Another piece of information and question is that all of the 'cpc' medium are categorised by GA as 'Text' ad format, when all successful UTM medium are set to 'not set' ad format. Could you help explain why? Image 2: 'google / cpc' traffics are from 'Text' ad format while the other successful UTM read traffics are grouped as 'not set'

Lastly, when looking into the 'Ad Slot', most of the traffic from 'cpc' medium are from 'Google Search. For the 'Google Display Network', I understand that one of the ad formats from the responsive ad is the 'text' format so I consider all the issues are from only 'text' ads. But I am not sure because the Ad Slot is set to 'not set' for those success UTM so I cannot really compare the results here. Image 3: Most of the 'google / cpc' traffics are from 'Google Search'

Could anybody help explain why and, if possible, suggest how to avoid this?