# Firebase Analytics

**URL:** <https://forum.defold.com/t/firebase-analytics/53929>\
**Category:** The Defoldmine\
**Created:** [June 4, 2019, 7:32am UTC](https://forum.defold.com/t/firebase-analytics/53929 "2019-06-04T07:32:59Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![britzl](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/britzl/32/23_2.png) [@britzl](https://forum.defold.com/u/britzl)\
**Post date:** [June 4, 2019, 7:32am UTC](https://forum.defold.com/t/firebase-analytics/53929/1 "2019-06-04T07:32:59Z")

</div>

Firebase Analytics is Google’s new analytics offering intended as a replacement for Google Analytics on mobile.

“At the heart of Firebase is Google Analytics for Firebase, a free and unlimited analytics solution. Analytics integrates across Firebase features and provides you with unlimited reporting for up to 500 distinct events that you can define using the Firebase SDK. Analytics reports help you understand clearly how your users behave, which enables you to make informed decisions regarding app marketing and performance optimizations.” ([official docs](https://firebase.google.com/docs/analytics))

ASSET PORTAL: [https://www.defold.com/community/projects/145904/](https://www.defold.com/community/projects/145904/)  
GITHUB: [GitHub - defold/extension-firebase-analytics: Google Firebase Analytics extension for the Defold game engine · GitHub](https://github.com/defold/extension-firebase-analytics)

A special thanks to @AGulev who took over the work of finishing this extension and making it available to the community!

---

<div class="post-metadata">

**Author:** ![gianmichele](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/gianmichele/32/24028_2.png) [@gianmichele](https://forum.defold.com/u/gianmichele)\
**Post date:** [June 4, 2019, 11:24am UTC](https://forum.defold.com/t/firebase-analytics/53929/2 "2019-06-04T11:24:13Z")

</div>

> [@britzl](#):
>
> ich enables you to make informed decisions regarding app marketing

Amazing, thank you guys!

---

<div class="post-metadata">

**Author:** ![marat.giliazov](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/marat.giliazov/32/12364_2.png) [@marat.giliazov](https://forum.defold.com/u/marat.giliazov)\
**Post date:** [March 18, 2020, 11:06am UTC](https://forum.defold.com/t/firebase-analytics/53929/3 "2020-03-18T11:06:07Z")

</div>

[https://github.com/defold/extension-firebase-analytics#21-add-project-dependencies](https://github.com/defold/extension-firebase-analytics#21-add-project-dependencies)  
Are these dependencies still required?

- `https://github.com/defold/android-base-extensions/releases/download/1.0.0/firebase-core-16.0.8.zip`
- `https://github.com/defold/android-base-extensions/releases/download/1.0.0/gps-base-16.1.0.zip`
- `https://github.com/defold/android-base-extensions/releases/download/1.0.0/support-v4-26.1.0.zip`
- `https://github.com/defold/android-base-extensions/releases/download/1.0.0/gps-measurement-16.4.0.zip`

I remember, that for other extnestions like facebook, docs were changed to not require setting dependencies for `support- ***` and `gps-*** ` libs manually. Is this still actual for firebase extension?

---

<div class="post-metadata">

**Author:** ![britzl](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/britzl/32/23_2.png) [@britzl](https://forum.defold.com/u/britzl)\
**Post date:** [March 18, 2020, 11:31am UTC](https://forum.defold.com/t/firebase-analytics/53929/4 "2020-03-18T11:31:30Z")

</div>

> [@marat.giliazov](#):
>
> Are these dependencies still required?

No. Not needed. The documentation mentions: “If running Defold 1.2.164 or older you also need to add a number of base extensions as dependencies”

---

<div class="post-metadata">

**Author:** ![marat.giliazov](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/marat.giliazov/32/12364_2.png) [@marat.giliazov](https://forum.defold.com/u/marat.giliazov)\
**Post date:** [March 18, 2020, 11:34am UTC](https://forum.defold.com/t/firebase-analytics/53929/5 "2020-03-18T11:34:33Z")

</div>

Oops, I understood “older” as “bigger number” =) My bad.

---

<div class="post-metadata">

**Author:** ![britzl](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/britzl/32/23_2.png) [@britzl](https://forum.defold.com/u/britzl)\
**Post date:** [October 20, 2020, 9:05am UTC](https://forum.defold.com/t/firebase-analytics/53929/6 "2020-10-20T09:05:38Z")

</div>

Firebase Analytics has been updated to newer versions for both iOS and Android. The new version uses:

- Firebase C++ SDK 6.16.0
- iOS SDK 6.34.0

Latest version is available here: [Release Firebase Analytics 1.4.1 · defold/extension-firebase-analytics · GitHub](https://github.com/defold/extension-firebase-analytics/releases/tag/1.4.1)

Manual: [Defold Firebase Analytics documentation](https://defold.com/extension-firebase-analytics/)

A big thank you to @AGulev for doing the update!

---

<div class="post-metadata">

**Author:** ![Lex](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/lex/32/23856_2.png) [@Lex](https://forum.defold.com/u/Lex)\
**Post date:** [October 20, 2020, 2:21pm UTC](https://forum.defold.com/t/firebase-analytics/53929/7 "2020-10-20T14:21:56Z")

</div>

I’m seeing problems this morning to build my project, I didn’t do ANY modification since yesterday. I have the firebase extension and I’m seeing the following error:

 ![image](https://forum-defold-uploads.b-cdn.net/original/3X/a/0/a05e2be40e00fe9fffbcd15c649c8a21d428db47.png)

Is there any possibility this could be related to the update of the firebase extension?  
If not, I’ll happily delete my message so it doesn’t pollute the thread 😃 Thanks

---

<div class="post-metadata">

**Author:** ![Mathias\_Westerdahl](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/mathias_westerdahl/32/228_2.png) [@Mathias\_Westerdahl](https://forum.defold.com/u/Mathias_Westerdahl)\
**Post date:** [October 20, 2020, 2:22pm UTC](https://forum.defold.com/t/firebase-analytics/53929/8 "2020-10-20T14:22:45Z")

</div>

What do you have as a dependency in your project settings?  
(i.e. the full link to the zip file)

---

<div class="post-metadata">

**Author:** ![Lex](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/lex/32/23856_2.png) [@Lex](https://forum.defold.com/u/Lex)\
**Post date:** [October 20, 2020, 3:26pm UTC](https://forum.defold.com/t/firebase-analytics/53929/9 "2020-10-20T15:26:00Z")

</div>

dependencies = [https://github.com/rgrams/rendercam/archive/v1.0.1.zip](https://github.com/rgrams/rendercam/archive/v1.0.1.zip),  
[https://github.com/MaratGilyazov/def\_ironsource/archive/master.zip](https://github.com/MaratGilyazov/def_ironsource/archive/master.zip),  
[https://github.com/subsoap/defsave/archive/master.zip](https://github.com/subsoap/defsave/archive/master.zip),  
[https://github.com/defold/extension-iap/archive/master.zip](https://github.com/defold/extension-iap/archive/master.zip),  
[https://github.com/britzl/defold-sharing/archive/master.zip](https://github.com/britzl/defold-sharing/archive/master.zip),  
[https://github.com/britzl/defold-png/archive/master.zip](https://github.com/britzl/defold-png/archive/master.zip),  
[https://github.com/adamwestman/extension-vibrate/archive/master.zip](https://github.com/adamwestman/extension-vibrate/archive/master.zip),  
[https://github.com/GameAnalytics/GA-SDK-DEFOLD/archive/master.zip](https://github.com/GameAnalytics/GA-SDK-DEFOLD/archive/master.zip),  
[https://github.com/GameAnalytics/defold-openssl/archive/master.zip](https://github.com/GameAnalytics/defold-openssl/archive/master.zip),  
[https://github.com/defold/extension-facebook/archive/2.6.0.zip](https://github.com/defold/extension-facebook/archive/2.6.0.zip),  
[https://github.com/defold/extension-firebase/archive/master.zip](https://github.com/defold/extension-firebase/archive/master.zip),  
[https://github.com/Insality/druid/archive/master.zip](https://github.com/Insality/druid/archive/master.zip),  
[https://build.spiralcodestudio.com/a\*\*\*@gmail.com/c\*\*\*\*3/defold/admob.zip](https://build.spiralcodestudio.com/a ***@gmail.com/c**** 3/defold/admob.zip)

I also tried with replacing  
[https://github.com/defold/extension-firebase/archive/master.zip](https://github.com/defold/extension-firebase/archive/master.zip), with  
[https://github.com/defold/extension-firebase-analytics/archive/1.4.1.zip](https://github.com/defold/extension-firebase-analytics/archive/1.4.1.zip)

and got the same error message. So it might come from another extension that got updated?

---

<div class="post-metadata">

**Author:** ![Mathias\_Westerdahl](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/mathias_westerdahl/32/228_2.png) [@Mathias\_Westerdahl](https://forum.defold.com/u/Mathias_Westerdahl)\
**Post date:** [October 20, 2020, 3:37pm UTC](https://forum.defold.com/t/firebase-analytics/53929/10 "2020-10-20T15:37:12Z")

</div>

Replacing with actual version numbers is definitely the way to go, in order to prevent issues like the one you have now.

To “go back” to the version you had, you would have to use the previous release:

[https://github.com/defold/extension-firebase-analytics/archive/1.3.2.zip](https://github.com/defold/extension-firebase-analytics/archive/1.3.2.zip) from 2020/02/06

---

<div class="post-metadata">

**Author:** ![britzl](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/britzl/32/23_2.png) [@britzl](https://forum.defold.com/u/britzl)\
**Post date:** [October 20, 2020, 6:18pm UTC](https://forum.defold.com/t/firebase-analytics/53929/11 "2020-10-20T18:18:53Z")

</div>

> [@Lex](#):
>
> I’m seeing problems this morning to build my project, I didn’t do ANY modification since yesterday.

We updated the Firebase extension today so there’s likely some conflict with another extension. My guess would be either Facebook or AdMob.

Oh, I see now, it mentions AndroidX. That won’t work as you probably have a mix of Android libraries using the new AndroidX and the old Android Support lib. We have in our roadmap to add support for the jetifier tool to auto-convert dependencies to AndroidX.

---

<div class="post-metadata">

**Author:** ![AGulev](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/agulev/32/4541_2.png) [@AGulev](https://forum.defold.com/u/AGulev)\
**Post date:** [October 20, 2020, 6:25pm UTC](https://forum.defold.com/t/firebase-analytics/53929/12 "2020-10-20T18:25:09Z")

</div>

I’ve just checked and this is conflict with facebook extension (maybe with admob as well, but I don’t have access to this extension)

---

<div class="post-metadata">

**Author:** ![Lex](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/lex/32/23856_2.png) [@Lex](https://forum.defold.com/u/Lex)\
**Post date:** [October 21, 2020, 8:15am UTC](https://forum.defold.com/t/firebase-analytics/53929/13 "2020-10-21T08:15:50Z")

</div>

OK this is getting a bit weird, I can’t bundle my app anymore (Android). Even after removing all my dependencies from the project (and deleting the .internal folder), I still get the following message when bundling:

 ![image](https://forum-defold-uploads.b-cdn.net/original/3X/b/6/b60b27d0a93adafed95a3d4cd01ea42e2c22582c.png)

Is there any other folder I need to delete to clear my project and be able to compile?

---

<div class="post-metadata">

**Author:** ![britzl](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/britzl/32/23_2.png) [@britzl](https://forum.defold.com/u/britzl)\
**Post date:** [October 21, 2020, 8:23am UTC](https://forum.defold.com/t/firebase-analytics/53929/14 "2020-10-21T08:23:49Z")

</div>

> [@Lex](#):
>
> Is there any other folder I need to delete to clear my project and be able to compile?

Delete build and .internal folders

Are you using a custom app manifest (to remove things from the engine which you don’t need)?

> **[App Manifest - Defold project settings](https://defold.com/manuals/project-settings/#app-manifest)**
>
> The file game.project contains all project wide settings. It must stay in the root folder of the project and must be named game.project. The first thing the engine does when starting up and launching your game is look for this file. | This manual...

---

<div class="post-metadata">

**Author:** ![Lex](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/lex/32/23856_2.png) [@Lex](https://forum.defold.com/u/Lex)\
**Post date:** [October 21, 2020, 9:44am UTC](https://forum.defold.com/t/firebase-analytics/53929/15 "2020-10-21T09:44:40Z")

</div>

> [@Mathias\_Westerdahl](#):
>
> [https://github.com/defold/extension-firebase-analytics/archive/1.3.2.zip](https://github.com/defold/extension-firebase-analytics/archive/1.3.2.zip)

OK thanks the error went away after I deleted the /build folder as well.

---

<div class="post-metadata">

**Author:** ![britzl](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/britzl/32/23_2.png) [@britzl](https://forum.defold.com/u/britzl)\
**Post date:** [May 26, 2021, 10:47pm UTC](https://forum.defold.com/t/firebase-analytics/53929/16 "2021-05-26T22:47:44Z")

</div>

The Firebase Analytics extension has been updated to Firebase C++ SDK 7.3.0. The extension has also been restructured to make it easier to add more Firebase integrations in Defold. You will from now on have to add two dependencies to your project:

| Firebase C++ SDK | Dependencies |
| --- | --- |
| Firebase C++ SDK 7.3.0 | [https://github.com/defold/extension-firebase/archive/refs/tags/1.1.3.zip](https://github.com/defold/extension-firebase/archive/refs/tags/1.1.3.zip)  
[https://github.com/defold/extension-firebase-analytics/archive/refs/tags/2.0.1.zip](https://github.com/defold/extension-firebase-analytics/archive/refs/tags/2.0.1.zip) |

Documentation here: [Defold Firebase Analytics documentation](https://defold.com/extension-firebase-analytics/)

---

<div class="post-metadata">

**Author:** ![AarrrBee](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/aarrrbee/32/24978_2.png) [@AarrrBee](https://forum.defold.com/u/AarrrBee)\
**Post date:** [February 16, 2022, 4:15pm UTC](https://forum.defold.com/t/firebase-analytics/53929/17 "2022-02-16T16:15:43Z")

</div>

I’m attempting to call firebase.analytics.get\_id() like so:

```
firebase.analytics.get_id(function(fid)
    print("fid is " .. type(fid))
    print(fid)
end)

```

and was expecting a string but the output was in fact this:

```
DEBUG:SCRIPT: fid is userdata
DEBUG:SCRIPT: Script: 0x7b3d78c700

```

Am I doing something clearly wrong?

---

<div class="post-metadata">

**Author:** ![AGulev](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/agulev/32/4541_2.png) [@AGulev](https://forum.defold.com/u/AGulev)\
**Post date:** [February 16, 2022, 4:34pm UTC](https://forum.defold.com/t/firebase-analytics/53929/18 "2022-02-16T16:34:00Z")

</div>

I’m not sure, but ppbly it should be

```lua
firebase.analytics.get_id(function(self, fid)
    print("fid is " .. type(fid))
    print(fid)
end)

```

---

<div class="post-metadata">

**Author:** ![AarrrBee](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/aarrrbee/32/24978_2.png) [@AarrrBee](https://forum.defold.com/u/AarrrBee)\
**Post date:** [February 16, 2022, 4:46pm UTC](https://forum.defold.com/t/firebase-analytics/53929/19 "2022-02-16T16:46:07Z")

</div>

Yes you’re right, thank you.
