Posts under category Google

I have an issue with the Google Ads v16 version. This particular method is causing problems, and I can't update either the descriptions or the headlines. Here is my code, taken from an example of the API for this specific version:

Api reference: https://developers.google.com/google-ads/api/samples/update-responsive-search-ad

If I remove the ResponsiveSearchAdInfo method, for example, to only update the final_urls, this works successfully.

The error it gives me is the following:

error: {     "message": "Request contains an invalid argument.",     "code": 3,     "status": "INVALID_ARGUMENT",     "details": [         {             "@type": "type.googleapis.com\/google.ads.googleads.v16.errors.GoogleAdsFailure",             "errors": [                 {                     "errorCode": {                         "requestError": "UNKNOWN"                     },                     "message": "The error code is not in this version.",                     "location": {                         "fieldPathElements": [                             {                                 "fieldName": "operations",                                 "index": 0                             },                             {                                 "fieldName": "update"                             },                             {                                 "fieldName": "resource_name"                             }                         ]                     }                 }             ],             "requestId": "qub0AMx1K3uIn8f0pUvKlg"         }     ] } 

It seems strange to me that it references resource_name, as without changing anything in that line, I send the parameter to change the URL, and it works fine. By the way, in my controller, I'm not handling this as a static function, like the example shown in the API.

This is mi code:

    $ad = new Ad([         'resource_name' => ResourceNames::forAd($customerId, $adId),         'final_urls' => [$finalUrls],         'final_mobile_urls' => [$finalUrls],           'responsive_search_ad' => new ResponsiveSearchAdInfo([             // Update some properties of the responsive search ad.             'headlines' => [                 new AdTextAsset([                     'text' => 'Cruise to Pluto #' ,                     'pinned_field' => ServedAssetFieldType::HEADLINE_1                 ]),                 new AdTextAsset(['text' => 'Tickets on sale now']),                 new AdTextAsset(['text' => 'Buy your ticket now'])             ],             'descriptions' => [                 new AdTextAsset(['text' => 'Best space cruise ever.']),                 new AdTextAsset([                     'text' => 'The most wonderful space experience you will ever have.'])             ]         ]),            ]); 

Any help is welcome. Thank you!

based on unique keys (ga_session_id || user_pseudo_id) we want to find the first event that started that session. but some records have the same event_timestamp. is there a document that shows which event is earlier?

I couldn't find anything about it in the documents.

I am facing ANR (Application Not Responding) issues in my Android application related to the initialization of the Mobile Ads SDK. I have a class named GoogleAdsManager where I perform the initialization in the initAds() function, and this function is called in the onCreate() method of the main Application class.

Here is a simplified version of my code:

class GoogleAdsManager {     fun initAds(context: Context) {         // Other initialization tasks         MobileAds.initialize(context)     } } 

And in my Application class:

class MyApplication : Application() {     override fun onCreate() {         super.onCreate()         val googleAdsManager = GoogleAdsManager()         googleAdsManager.initAds(this)     } } 

The issue is that I am receiving ANR reports on various devices, but I am unable to reproduce it on my own device. Firebase Crashlytics reports indicate that this ANR occurs more frequently than usual.

I suspect that the MobileAds.initialize(context) call might be the culprit. However, since I cannot reproduce the issue locally, I am seeking advice on how to investigate and resolve ANR issues related to the Mobile Ads SDK initialization.

Has anyone experienced similar ANR issues with MobileAds.initialize()? Are there specific scenarios or devices where such ANRs are more likely to occur? Are there alternative approaches or best practices for initializing Mobile Ads SDK to avoid ANR issues? Any insights or suggestions on how to address this ANR issue would be greatly appreciated. Thank you!