Facebook tracking for ads - Problem


Hi . i have living problem with facebook track app installation.

which plugin i need for facebook ads track.

cordova-plugin-facebook4 is give error. So not working…

anyone help me.Thanx


You musst include their SDK. I’m not sure if this is covered by any cordova Facebook plugin. I’m facing the same problem.



@g.bek6161 @andy_reitberger

This works https://github.com/jeduan/cordova-plugin-facebook4 (It does activation automatically for new installs - mentioned in the docs.)

I am using it and installs are reported properly in Facebook insights and advert manager.

Would be good if Cocoon updates their Facebook plugin to do the same.


What framework do you use for your games?

Thanks for your hint!



hey @andy_reitberger, before I used native Webview with Cordova, I also used crosswalk (Using native Javascrip/HTML5 with no framework) .

Now i am using Cocoon and PIXI for the game I am doing (with WebGL) but still native JS. Not sure if this answers your question.


This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.



Just made a guide for this.



Hi @andy_reitberger, thanks for your tutorial.
However, this fails to complie for me for Android (iOS seems fine)
This is what I’ve go. Can you please try to help me out? Thanks! (doesn’t change if i turn multidex on, if that’s related).


FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:processArmv7DebugResources’.

com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process ‘command ‘/opt/cocoon_compiler/workspace/production/data/sdks/android-sdks-linux/build-tools/25.0.3/aapt’’ finished with non-zero exit value 1

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.


Total time: 8.938 secs

This is the full log: https://codeshare.io/adORNM


That’s strange, it’s working fine on all my android and ios builts.
What additional plugins have you installed?`
Maybe someone is in conflict with the facebook plugin.
Can you share your plugin list?



Sure @andy_reitberger, this is what i’m using:


and the facebook addon you shared.

Also, I also tried cocoon’s facebook addon with these:

Using cocoon’s facebook compiles without problems. Android is working as expected, but IOS only logs in to facebook - but doesn’t allow me to share (doesn’t open the share dialogue at all).

Thanks for the help!


Would you try once without the 2 cranberrygame plugins?
Does it work then?
Or have you tried to set “Multidex enabled” to yes?


I have tried that and it didn’t work in the past, but i will try again just in case.
Meanwhile, can you please tell me if Cocoon’s own facebook share plugin also does the same thing? Because I also need the facebook login/share options.


As far as I know, no. I tried this plugin first, but it doesn’t include the facebook conversation tracking / analytics.
But you simple can try it. Just include the facebook plugin by ludei and see if analytics data are coming in (may take 24h).

@mortimergoro Am I right?



So the only way I got it to compile on android is by:

  1. Switching from canvas+ to Webview+
  2. Removing cranbarry’s flurry AND chartboost

So this is a bit of a problem… as canvas+ has better performance and i lose chartboost and flurry in order to have that FB plugin.
As for Ludei’s FB plugin. i’m not sure, at some point in the past it recorded one install, but now it does not (it’s currently live on the google play/app store).

@andy_reitberger, can you give me some advice?



I can remember a blackscreen issue with @cranberryga Charboost plugin.
However the build should work.
I’m using Canvas+ as well and all Cocoon Plugins (Ads, Inapp, GameCenter, GPG and so on).
No problems on my end while using the Facebook Plugin I linked above.

I’m not sure about the Cocoon FB plugin, back then when I tried it, it didn’t send any data to fb analytics.
maybe @imanolm1 can light up this questions?



Hi @andy_reitberger I try to do it with your tutorial but no success. cocoon gives me error. I want to integrate to my game FB SDK. I want to see all analytics especially install tracking. Can you help me?


Hi @armenooveyan

I just made a built using the facebook plugin and it’s working fine on my end. Maybe another plugin is in conflict.
Can you attach your config.xml file?
Just copy the text at “your project -> settings -> config.xml” into a text file and attach it to the post.