# Google Analytics - which plugin?

**URL:** <https://forum.ionicframework.com/t/google-analytics-which-plugin/181899>\
**Category:** ionic-v3\
**Created:** [January 21, 2020, 2:05pm UTC](https://forum.ionicframework.com/t/google-analytics-which-plugin/181899 "2020-01-21T14:05:05Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![richardshergold](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/richardshergold/32/91823_2.png) [@richardshergold](https://forum.ionicframework.com/u/richardshergold)\
**Post date:** [January 21, 2020, 2:05pm UTC](https://forum.ionicframework.com/t/google-analytics-which-plugin/181899/1 "2020-01-21T14:05:05Z")

</div>

I need to add Google Analytics to our Ionic 3 app and am slightly confused as to whether I should use the [Google Analytics Plugin](https://ionicframework.com/docs/v3/native/google-analytics/) or the [Firebase Plugin](https://ionicframework.com/docs/v3/native/firebase/) - does anyone have any advice?

---

<div class="post-metadata">

**Author:** ![morphist](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/morphist/32/127474_2.png) [@morphist](https://forum.ionicframework.com/u/morphist)\
**Post date:** [January 21, 2020, 8:26pm UTC](https://forum.ionicframework.com/t/google-analytics-which-plugin/181899/2 "2020-01-21T20:26:29Z")

</div>

I think first decision you need is do you want to go with a hybrid plugin (cordova for ex) or with pure web sdk for GA.

Then you could pick one that suits. Google actually finalizes the merger of their GA suite with Firebase suite -\> so you can use either and soon it will be just one.

Cause of that merger I opted for AngularFire’s latest 5.3.0 which now supports GA as a web SDK.

---

<div class="post-metadata">

**Author:** ![mikrochipkid](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mikrochipkid/32/116956_2.png) [@mikrochipkid](https://forum.ionicframework.com/u/mikrochipkid)\
**Post date:** [January 24, 2020, 2:29pm UTC](https://forum.ionicframework.com/t/google-analytics-which-plugin/181899/4 "2020-01-24T14:29:42Z")

</div>

> **[Google Analytics - Ionic Documentation](https://ionicframework.com/docs/native/google-analytics)**
>
> Ionic is the app platform for web developers. Build amazing mobile, web, and desktop apps all with one shared code base and open web standards

---

<div class="post-metadata">

**Author:** ![richardshergold](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/richardshergold/32/91823_2.png) [@richardshergold](https://forum.ionicframework.com/u/richardshergold)\
**Post date:** [January 24, 2020, 2:43pm UTC](https://forum.ionicframework.com/t/google-analytics-which-plugin/181899/5 "2020-01-24T14:43:36Z")

</div>

Thanks - i know about the plugin (as I mentioned in my post) - it’s more a confusion about which of the two plugins to use (or indeed whether either of them are required if I could use AngularFire). My comment was raised after seeing discussions such as [this one](https://github.com/danwilson/google-analytics-plugin/issues/556).

---

<div class="post-metadata">

**Author:** ![Tommertom](https://avatars.discourse-cdn.com/v4/letter/t/ed8c4c/32.png) [@Tommertom](https://forum.ionicframework.com/u/Tommertom)\
**Post date:** [January 24, 2020, 6:35pm UTC](https://forum.ionicframework.com/t/google-analytics-which-plugin/181899/6 "2020-01-24T18:35:00Z")

</div>

No plugin needed for angularfire analytics

Havent tested it but at the time I needed it, I referenced to the websdk directly which works flawlessly (as per tutorial below)

Just adding the tracking id in the firebase config

Angularfire planned the update once the websdk was out

> [@Google Analytics in Firebase](https://forum.ionicframework.com/t/google-analytics-in-firebase/174921):
>
> Good news for Firebase developers & web: Not yet available in Angularfire2, but in firebase7.1.0 present Good stuff video (not mine, nor am I affiliated). Tom

> <https://github.com/angular/angularfire/issues/2178>
>
> \<!--
> 
> IMPORTANT! YOU MUST FOLLOW THESE INSTRUCTIONS OR YOUR ISSUE WILL BE CLOS…ED.
> 
> Thank you for contributing to the Angular and Firebase communities!
> 
> Have a usage question?
> =======================
> We get lots of those and we love helping you, but GitHub is not the best place for them and they will be closed. Here are some resources to get help:
> 
> \- Go through the Developer's Guide: https://github.com/angular/angularfire2#developer-guide
> 
> If the official documentation doesn't help, try asking through our officially supported channels:
> 
> \- Firebase Google Group: https://groups.google.com/forum/#!forum/firebase-talk
> \- Stack Overflow: https://stackoverflow.com/questions/tagged/angular (include the firebase and angularfire tags, too!)
> 
> \*Please avoid double posting across multiple channels!\*
> 
> Think you found a bug?
> =======================
> Yeah, we're definitely not perfect! Please use the bug report template below and include a minimal repro when opening the issue.
> 
> Have a feature request?
> ========================
> Great, we love hearing how we can improve our products! Remove the template below and
> provide an explanation of your feature request. Provide code samples if applicable. Try to
> think about what it will allow you to do that you can't do today? How will it make current
> workarounds straightforward? What potential bugs and edge cases does it help to avoid?
> 
> \--\>
> 
> 
> \### Version info
> 
> \<!-- What versions of the following libraries are you using? Note that your issue may already
> be fixed in the latest versions. --\>
> 
> \*\*Angular:\*\* \`v8.x.x\`
> 
> \*\*Firebase:\*\* \`v6.x.x\`
> 
> \*\*AngularFire:\*\* \`v5.x.x\`
> 
> \*\*Other (e.g. Ionic/Cordova, Node, browser, operating system):\*\* NIL
> 
> \### Expected behavior
> 
> 
> 
> There should be support for Remote Config/Analytics which is included in v7 of the Firebase SDK for JavaScript: \[Release Notes\](https://firebase.google.com/support/release-notes/js#version\_700\_-\_september\_26\_2019)
> 
> \### Actual behavior
> 
> 
> 
> There's currently no support for the Remote Config/Firebase Analytics API included in v7 of the JavaScript SDK.

---

<div class="post-metadata">

**Author:** ![mikrochipkid](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mikrochipkid/32/116956_2.png) [@mikrochipkid](https://forum.ionicframework.com/u/mikrochipkid)\
**Post date:** [January 24, 2020, 9:16pm UTC](https://forum.ionicframework.com/t/google-analytics-which-plugin/181899/7 "2020-01-24T21:16:39Z")

</div>

I used this plugin and its an easy set up and works flawlessly.

---

<div class="post-metadata">

**Author:** ![mateen1993](https://avatars.discourse-cdn.com/v4/letter/m/6f9a4e/32.png) [@mateen1993](https://forum.ionicframework.com/u/mateen1993)\
**Post date:** [January 28, 2020, 12:14pm UTC](https://forum.ionicframework.com/t/google-analytics-which-plugin/181899/8 "2020-01-28T12:14:16Z")

</div>

Hey @richardshergold,

I would recommend Firebase Plugin for your app analytics.

Thanks!
