Need Facebook SDK Analytics Example Please

Hello. I’ve been trying for 2 weeks to get custom Facebook Analytic Events to show up on the Facebook Event Manager. My publisher is waiting on me and I can’t get it to work no matter what I try. I have read every single bit of information that I could find. The automatic events show up, but not the custom events that are made with the Custom Event Editor tool (see pic). I’ve tried a few suggestions from people, but still have no luck.

Does anyone have a script example for logging app events? I’d love to see a script that works so I can figure out what I’m doing wrong. All I need to put in is Level Start, Level Complete, Level Fail, and Level Quit.

Any help would be greatly appreciated.

Hmm…I helped you with this already. The code I provided you works, as I use it already. Unfortunately, as I mentioned, FB analytics is going away. It’s possible FB doesn’t allow new custom analytics anymore. At this point, I’d be surprised if they even support it since it will be gone. If the code I shared with you doesn’t work, I have no other example to provide.

Also, are you sure your code is right? Seems incorrect to me vs the example I gave you.

Thanks for the reply and previous help. I haven’t got to try the code to see if it works on Facebook Events. I keep getting errors when I tried the code because of something that I am doing wrong. I posted the script I tried on the previous post. I believe the problem that I am having is the level name part. I have 175 levels and they are just name 1, 2, 3, etc. Is there a way to put a variable in the code so if they play any of the levels it works?

I should say that I have a Game Scene that uses json for level data

You should tell whomever is asking you to use FB events that they are going away. You should consider a supported event system like Unity Analytics, we can provide exact code for you and have this working within the hour. I’m not sure how valuable your time is, but you’ve been working on this for several days. And you don’t want to be in the position someday (soon) when your FB Analytics dashboard is no longer available and they ask “why didn’t you tell us”. :slight_smile:

1 Like

I will definitely recommend Unity Analytics to them. Working with the Facebook SDK has been a nightmare for me. FB locked me out of my account for no reason in the middle of doing the integration for over a week. I couldn’t log into the business account, developer account, or personal account.

I would have preferred using Unity Analytics. There is more documentation and video tutorials for it.

Let them know that you can get Unity Analytics working by the end of the day, see what they say.