No Android Data in Facebook Analytics (v4a)

Hi 

We are using the newest version of the facebook plugin and are seeing the analytics data for our iOS users. But in the same app for android we cannot see any data in the facebook analytics dashboard. We are using the plugin for user signups which works on both platforms. 

Any help on how to debug this problem?

Best Simon

This is an old problem - see this post from 2016! https://forums.coronalabs.com/topic/66981-facebook-publishinstall-is-not-working-on-android/

Seems it never got fixed.

Hi Sphere Game Studio, thanks for your quick response!

Did you file a bug report back then?

How did you solve this problem? other analytics solution?
It seems to have affected quite alot.

Best Simon

Please file a new bug report.

Rob

Hi Rob! Was that bug report ever filed?

Sphere, we meet again lol. Have you also confirmed that this issue is still present, or are we just going off of sdg’s post? I am planning on running a facebook campaign and using publishInstall() to track efficacy; but this may be a wrench in the spokes. Side note: I checked out your old thread, and noticed the docs still call for the app id parameter to be passed  :blink:

@sdg: Are you waiting for the “fbinit” event before calling publishInstall()? Are you passing the app id as a parameter or leaving it empty?

I haven’t seen anyone file a bug report on it.

Rob

In callback I have

        if event.name == "fbinit" then             facebook.publishInstall()         end

I did email one Rob (as the website was broken then) but seemingly it got missed/removed/ignored.

Facebook stats show about a 1/3 of what Google Analytics does.  Not sure what the problem is though.

@Rob, does publishInstall() using REST or via the FB app?

I just checked and it showed my last Android install was 40 minutes ago - which is at odds to my app getting 3 to 4 installs per minute.
 

@SGS, publishInstall does neither. It uses FB’s SDK and calls an API function in the SDK.  I don’t know if FB is using REST under the hood or not. It’s a binary library that they publish.  I don’t believe the installed FB app gets uses for anything other than logging the user in and user login isn’t needed by publishInstall.

Rob

Just out of curiousity, since login() isn’t required, how is it that facebook is able to attribute the install to an ad? Heuristically?

@SGS or @SDG, any interest in submitting a new bug report for this?

I’m assuming that their SDK either gets the Package Name (Android) or Bundle ID (iOS) or it’s getting the FacebookID from build.settings and using that. Login is not required for publishedInstall(). There is not any parameters being passed to the underlying API call.

You probably do need to wait until the plugin completes initialization before calling publishedInstall().

We released a plugin with bug fixes on Friday. It addresses an initialization problem on Android and a login problem on iOS. It might be worth doing a build with the new plugin and making sure to wait until you get the fbinit event before you try and call publishInstall.

Rob

Right, but the thing is, every install of the app calls publishinstall(), so I don’t see how it could possibly distinguish between ad initiated installs and normal installs. Know what I mean?

I haven’t started implementing any of this, but I had planned on waiting for fbinit, and it looks like @SGS was already doing that anyway…

I checked all the way that I can check and this is what I got on my end. They are all over the place. I tried to pick the same set of days (28 days). So in my case, Facebook seems to be fine. If you are getting 0 installs on Facebook something is definitely wrong.

For Cuadros “new installs” for the last 28 days:

Facebook reports: 1460

Flurry reports 1600

Gamesparks at 1743

Google at 1407

As far as Facebook making the distinction between paid and not paid I have no idea. According to them during that same time period, I paid for 352 installs. The rest where “organic”, but if I stop advertising most of the “organic” disappear with the paid.

SDG can you post your build settings?

Did you fill the information on the facebook app about your android app?

  • Under the class name for all my apps I have: com.<yourcompany>.<appName>,CoronaActivity
  • I also have populated all the key hashes.

I was thinking about it, and it probably uses the IDFA/AAID to attribute app installs. I can’t think of any other way it could work.If.I’m right, then you would need to check the “Attribute this app installation to a previously served advertisement.” checkbox in itunesconnect when submitting. Someone correct me if that doesn’t sound right.

Hey @agramonte , so to be clear, you haven’t experienced the same problems as @SGS and @SDG on Android? What build is everyone using? Plugins?

@csavalas: With the information in this thread, I don’t believe @SGS and @SDG are having the same problem.

I quote @SDG (I bolded the important part):

But in the same app for android we cannot see any data in the facebook analytics dashboard

I suspect @SDG has either misconfigured the build settings or an item in the developer portal on Facebook.

The problem that @SGS has reported before and the bottom portion of this thread are talking about is under-reporting of Android installs.

So to answer your question: No I do not have the issue that @SDG has. I don’t believe @SGS has the issue that @SDG started this thread with.

As far as under-reporting Android installs, I can’t really tell if I do or I don’t since my numbers are all over the place. If I do it is probably at a 10% variance.

@agramonte, I reread their posts again, and I suspect you are correct. @SGS referenced his thread, so it superficially seemed like the same problem. Your numbers from Google and Facebook are right in line, so perhaps something else is at play here. Any opinion on my IDFA/AAID speculation?

Yes I’m waiting for the facebook “fbinit” event - i’m also making sure that I can get the facebook user before hitting publishInstall()

I’m not passing the app ID - it is set in the build.settings file from here:

https://github.com/coronalabs/samples-coronasdk/tree/master/Networking/Facebook

With the exception that i’m using the v4a version of the plugin.

The build settings are working fine with our iOS devices where we see all sorts of data in FB analytics. In the two projects i’m testing it is the same facebook analytics does not show anything on Android devices and the facebook apps do not show any warnings

Build settings for reference:

-- -- For more information on build.settings, see the Project Build Settings guide at: -- https://docs.coronalabs.com/guide/distribution/buildSettings -- settings = { orientation = { default = "portrait", supported = { "portrait", "portraitUpsideDown" } }, iphone = { plist = { UIApplicationExitsOnSuspend = false, CFBundleURLTypes = { { CFBundleURLSchemes = { "fbXXXXXXXXXXXXXX" -- Replace XXXXXXXXXXXXXX with your Facebook App ID } } }, FacebookAppID = "XXXXXXXXXXXXXX", -- Replace XXXXXXXXXXXXXX with your Facebook App ID UILaunchStoryboardName = "LaunchScreen", CFBundleIconFiles = { "Icon-40.png", "Icon-58.png", "Icon-76.png", "Icon-80.png", "Icon-87.png", "Icon-120.png", "Icon-152.png", "Icon-167.png", "Icon-180.png", }, LSApplicationQueriesSchemes = { "fb", -- Needed for the facebook-v4.isFacebookAppEnabled() API "fbapi", "fbauth2", "fb-messenger-api", "fbshareextension", }, }, }, android = { facebookAppId = "XXXXXXXXXXXXXX", -- Replace XXXXXXXXXXXXXX with your Facebook App ID }, window = { titleText = { default = "Facebook3", }, }, plugins = { ["plugin.facebook.v4a"] = { publisherId = "com.coronalabs" }, }, }

I’ve just tested the newest version 2018.3255 - and it works now

Thank you all for your help!

btw we got the facebook analytics to work when we tested scott’s plugin:

https://marketplace.coronalabs.com/corona-plugins/facebook-analytics

that was before we tried the newest corona build

This is so not fixed…