Posts tagged with firebase

I am looking for a way to get Firebase working in an app built in React Native Expo, so that it gives out some sort of data for Google Ads to use and count as a conversion metric, when someone installs our iOS app by way of clicking on a Google Ad served to them.

It's shocking that Google hasn't made this easier, but there is currently no way of measuring Google Ads Conversions for an App Install campaign, without using Firebase.

I have been working with Google Ads support over the past month, and they have been unable to help me. So according to Google Ads support, the only way to count conversion metrics for iOS installs is to use Firebase embedded in our app to get some data out of the app once it's installed by an end user. Or some other 3rd party tool that they are unable to recommend or support.

Looking at embedding Firebase into how our app is currently architected in React Native Expo seems like a huge overhaul. Any tips or tricks? Has anyone made this work properly with Google Ads iOS app installs campaigns?

I'm trying to set up conversion tracking with Firebase. I followed Google's instructions but no conversions are showing.

Google's Post

Here is what I've tried so far:

Code Implementation

  1. Set up Firebase Analytics.
  2. Logged event after In-App Purchase. .logEvent()
  3. Showed ATT prompt after a successful purchase. ATTrackingManager.requestTrackingAuthorization

Firestore Console

  1. Entered App Store ID in profile.
  2. Integrated Google Ads.

Google Ads

  1. Created a conversion action.

Now, I know some people allowed tracking because I log their input.

Am I Missing something? Any help would be appreciated!

Thanks.

I am trying to add google native ads in my flutter app using this library

https://pub.dev/packages/google_mobile_ads

i am getting this error:

\[log\] NativeAd failed to load: LoadAdError(code: 0, domain: com.google.android.gms.ads, message: Internal error., responseInfo: ResponseInfo(responseId: _-SvZbabD5e-3LUP4oaxkAs, mediationAdapterClassName: , adapterResponses: \[AdapterResponseInfo(adapterClassName: com.google.ads.mediation.admob.AdMobAdapter, latencyMillis: 83, description: { "Adapter": "com.google.ads.mediation.admob.AdMobAdapter", "Latency": 83, "Ad Source Name": "Reservation campaign", "Ad Source ID": "7068401028668408324", "Ad Source Instance Name": "\[DevRel\] \[DO NOT EDIT\] Native Ads Campaign", "Ad Source Instance ID": "3518433842871043", "Credentials": { "pubid": "ca-app-pub-3940256099942544/2247696110/cak=no_cache&cadc=c3&caqid=_-SvZfiWDr-FmsMPtMWtgAM", "campaign_id": "12584073087" }, "Ad Error": { "Code": 0, "Message": "Internal error.", "Domain": "com.google.android.gms.ads", "Cause": "null" } }, adUnitMapping: {pubid: ca-app-pub-3940256099942544/2247696110/cak=no_cache&cadc=c3&caqid=\_-SvZfiWDr-FmsMPtMWtgAM, campaign_id: 12584073087}, adError: AdError(code: 0, domain: com.google.android.gms.ads, message: Internal error.), adSourceName: Reservation campaign, adSourceId: 7068401028668408324, adSourceInstanceName: \[DevRel\] \[DO NOT EDIT\] Native Ads Campaign, adSourceInstanceId: 3518433842871043)\], loadedAdapterResponseInfo: null), responseExtras: {mediation_group_name: Campaign}) 

Minimal Code to Reproduce

Native Controller:

import 'package:get/get.dart'; import 'package:google_mobile_ads/google_mobile_ads.dart'; class NativeAdController extends GetxController{   NativeAd? ad;   final adLoaded = false.obs; } 

Ad Helper:

import 'dart:developer'; import 'package:flutter/foundation.dart'; import 'package:google_mobile_ads/google_mobile_ads.dart'; import '../controllers/controller_native_ads.dart'; class AdHelper{   static Future<void> initAds() async {     await MobileAds.instance.initialize();   }   void loadInterstitialAd({required VoidCallback onComplete}) {     InterstitialAd.load(       adUnitId: 'ca-app-pub-3940256099942544/1033173712',       request: const AdRequest(),       adLoadCallback: InterstitialAdLoadCallback(         // Called when an ad is successfully received.         onAdLoaded: (ad) {           ad.fullScreenContentCallback = FullScreenContentCallback(             onAdDismissedFullScreenContent: (ad) {               onComplete();             },             onAdFailedToShowFullScreenContent: (ad, error) {               log(error.toString());             },             onAdShowedFullScreenContent: (ad) {               log("Full Screen");             },           );           log('This is the $ad loaded.');         },         // Called when an ad request failed.         onAdFailedToLoad: (LoadAdError error) {           log('InterstitialAd failed to load: $error');         },       ),     );   }   static NativeAd loadNativeAd({required NativeAdController nativeAdController}) {     return NativeAd(       adUnitId: 'ca-app-pub-3940256099942544/2247696110',       listener: NativeAdListener(         onAdLoaded: (ad) {           log('$NativeAd loaded.');           nativeAdController.adLoaded.value = true;         },         onAdFailedToLoad: (ad, error) {           log('$NativeAd failed to load: $error');           ad.dispose();         },       ),       request: const AdRequest(),       // Styling       nativeTemplateStyle: NativeTemplateStyle(         templateType: TemplateType.small,       ),     )..load();   } } 

Test Screen:

import 'package:flutter/material.dart'; import '../controllers/controller_native_ads.dart'; class TestScreen extends StatelessWidget{   TestScreen({super.key});   final adController = Get.put(NativeAdController());   @override   Widget build(BuildContext context) {     adController.ad = AdHelper.loadNativeAd(nativeAdController: adController);     return Scaffold(       bottomNavigationBar: adController.ad != null && adController.adLoaded.isTrue           ? SafeArea(               child: SizedBox(                 height: 80,                 child: AdWidget(ad: adController.ad!),               ),             )           : null,     );   } } 

I am using test id provided by official google docs flutter-quick-start

Can anyone explain me why this error occurs?

I've built an app with Expo and successfully published it in Apple's App Store and Google's Play Store. Included in it is AdMob for running ads in the app, and Firebase for analytics.

Now I'm using Google Ads to promote it, so added two campaigns, one for Android and one for iOS. The Android campaign has been running well for the past few weeks, but the iOS has done nothing at all (no impressions, no costs).

I tried adding a new conversion action for tracking first_open event from Firebase. I can see in Firebase and Google Analytics that that event has been tracked for iOS. But, the status of the action in Google Ads has been on No recent conversions for two weeks now, so that doesn't seem to work.

I tried following the instructions for React Native Google Mobile Ads, adding the sk_ad_network_items into my app.json. Also made sure the project settings in Firebase are set up correctly.

Am I missing something? Anyone got this working?

Android code for sending data to firebase analytics:-

FirebaseAnalytics logger = FirebaseAnalytics.getInstance(activity); Bundle bundle = new Bundle(); bundle.putString("Type", type); logger.logEvent("RazorPay", bundle); 

This event is correctly recorded in Firebase Analytics but in Campaign section it have displayed as (not set) https://i.sstatic.net/X8E7i.png

I have also check log in Firebase debug view all data are correctly recorded https://i.sstatic.net/YfZ1Z.png

Does anyone understand what wrong is going here, why display (not set) value?, what exactly show instead of (not set)

Thank you in advance