Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@capacitor-community/firebase-analytics

Package Overview
Dependencies
Maintainers
31
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@capacitor-community/firebase-analytics - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

2

package.json
{
"name": "@capacitor-community/firebase-analytics",
"version": "0.2.0",
"version": "0.2.1",
"description": "A native plugin for firebase analytics.",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/capacitor-community/firebase-analytics",

@@ -290,3 +290,3 @@ <p align="center"><br><img src="https://user-images.githubusercontent.com/236501/85893648-1c92e880-b7a8-11ea-926d-95355b8175c7.png" width="128" height="128" /></p>

> on your `MainActivity.java` file add `import com.getcapacitor.community.firebaseanalytics.FirebaseAnalytics;` and then inside the init callback `add(AnalyticsPlugin.class);`
> on your `MainActivity.java` file add `import com.getcapacitor.community.firebaseanalytics.FirebaseAnalytics;` and then inside the init callback `add(FirebaseAnalytics.class);`

@@ -307,10 +307,38 @@ Now you should be set to go. Try to run your client using `ionic cap run android --livereload --address=0.0.0.0`.

1. rename dep in package.json from `capacitor-analytics` to `@capacitor-community/firebase-analytics`
2. on android's _MainActivity.java_ change the import path from `io.stewan.capacitor.analytics.AnalyticsPlugin;` to `com.getcapacitor.community.firebaseanalytics.FirebaseAnalytics;`
3. public api changes
- `instance()` is now `getAppInstanceId()`
- `setScreen()` is now `setScreenName()`
- `setUserID()` is now `setUserId()`
- `setUserProp()` us now `setUserProperty()`
1. Update NPM package:
```bash
npm uninstall --save capacitor-analytics
npm install --save-prod @capacitor-community/firebase-analytics
```
1. Update the plugin initialization in Android's _MainActivity.java_
Update the plugin import:
```diff
-import io.stewan.capacitor.analytics.AnalyticsPlugin;
+import com.getcapacitor.community.firebaseanalytics.FirebaseAnalytics;
```
Update the `init()` call to use the new plugin import:
```diff
// Initializes the Bridge
this.init(savedInstanceState, new ArrayList<Class<? extends Plugin>>() {{
// Additional plugins you've installed go here
// Ex: add(TotallyAwesomePlugin.class);
- add(AnalyticsPlugin.class);
+ add(FirebaseAnalytics.class);
}});
```
1. Public API changes:
- `instance()` has been renamed to `getAppInstanceId()`
- `setScreen()` has been renamed to `setScreenName()`
- `setUserID()` has been renamed to `setUserId()`
- `setUserProp()` has been renamed to `setUserProperty()`
- `enable()` has been deprecated in favor of `setCollectionEnabled()`
- `disable()` has been deprecated in favor of `setCollectionEnabled()`
## Further info

@@ -317,0 +345,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc