Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

No Android Data in Facebook Analytics (v4a)
Started by sdg Mar 07 2018 05:59 AM

23 replies to this topic
facebook analytics android

Best Answer Rob Miracle , 31 March 2018 - 06:33 PM

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

[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

sdg

[GLOBAL: userInfoPane.html]
sdg
  • Observer

  • 7 posts
  • Corona SDK

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



[TOPIC: post.html]
#2

SGS

[GLOBAL: userInfoPane.html]
SGS
  • Corona Geek

  • 1,852 posts
  • Corona SDK

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.



[TOPIC: post.html]
#3

sdg

[GLOBAL: userInfoPane.html]
sdg
  • Observer

  • 7 posts
  • Corona SDK

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



[TOPIC: post.html]
#4

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 24,535 posts
  • Corona Staff

Please file a new bug report.

 

Rob



[TOPIC: post.html]
#5

csavalas

[GLOBAL: userInfoPane.html]
csavalas
  • Contributor

  • 102 posts
  • Corona SDK

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:



[TOPIC: post.html]
#6

csavalas

[GLOBAL: userInfoPane.html]
csavalas
  • Contributor

  • 102 posts
  • Corona SDK

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



[TOPIC: post.html]
#7

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 24,535 posts
  • Corona Staff

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

 

Rob



[TOPIC: post.html]
#8

SGS

[GLOBAL: userInfoPane.html]
SGS
  • Corona Geek

  • 1,852 posts
  • Corona SDK

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.
 



[TOPIC: post.html]
#9

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 24,535 posts
  • Corona Staff

@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



[TOPIC: post.html]
#10

csavalas

[GLOBAL: userInfoPane.html]
csavalas
  • Contributor

  • 102 posts
  • Corona SDK

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?



[TOPIC: post.html]
#11

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 24,535 posts
  • Corona Staff

  Best Answer

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



[TOPIC: post.html]
#12

csavalas

[GLOBAL: userInfoPane.html]
csavalas
  • Contributor

  • 102 posts
  • Corona SDK

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...



[TOPIC: post.html]
#13

agramonte

[GLOBAL: userInfoPane.html]
agramonte
  • Contributor

  • 765 posts
  • Corona SDK

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.



[TOPIC: post.html]
#14

agramonte

[GLOBAL: userInfoPane.html]
agramonte
  • Contributor

  • 765 posts
  • Corona SDK

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.


[TOPIC: post.html]
#15

csavalas

[GLOBAL: userInfoPane.html]
csavalas
  • Contributor

  • 102 posts
  • Corona SDK

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?



[TOPIC: post.html]
#16

agramonte

[GLOBAL: userInfoPane.html]
agramonte
  • Contributor

  • 765 posts
  • Corona SDK

@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.



[TOPIC: post.html]
#17

csavalas

[GLOBAL: userInfoPane.html]
csavalas
  • Contributor

  • 102 posts
  • Corona SDK

@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?



[TOPIC: post.html]
#18

sdg

[GLOBAL: userInfoPane.html]
sdg
  • Observer

  • 7 posts
  • Corona SDK

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

 

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.

 

 

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

 

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"
		},
	},
}

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.

 

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


Thank you all for your help!



[TOPIC: post.html]
#19

sdg

[GLOBAL: userInfoPane.html]
sdg
  • Observer

  • 7 posts
  • Corona SDK

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



[TOPIC: post.html]
#20

SGS

[GLOBAL: userInfoPane.html]
SGS
  • Corona Geek

  • 1,852 posts
  • Corona SDK

This is so not fixed....



[TOPIC: post.html]
#21

csavalas

[GLOBAL: userInfoPane.html]
csavalas
  • Contributor

  • 102 posts
  • Corona SDK

This is so not fixed....

 

Go on!



[TOPIC: post.html]
#22

SGS

[GLOBAL: userInfoPane.html]
SGS
  • Corona Geek

  • 1,852 posts
  • Corona SDK

What's the point.... I compiled a new build yesterday (post the fix) and nothing has changed



[TOPIC: post.html]
#23

sdg

[GLOBAL: userInfoPane.html]
sdg
  • Observer

  • 7 posts
  • Corona SDK

What's the point.... I compiled a new build yesterday (post the fix) and nothing has changed

Have you tried scott's plugin?

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



[TOPIC: post.html]
#24

SGS

[GLOBAL: userInfoPane.html]
SGS
  • Corona Geek

  • 1,852 posts
  • Corona SDK

No I haven't but I cannot see how that would help as it has no publishInstall().  And even if it did it looks like it is dependent on the core facebook plugin anyway.




[topic_controls]
[/topic_controls]

Also tagged with one or more of these keywords: facebook, analytics, android