@tecnavia/react-native-web-analytics (1.1.0)

Published 2024-12-31 10:24:50 +00:00 by naquilini

Installation

@tecnavia:registry=
npm install @tecnavia/react-native-web-analytics@1.1.0
"@tecnavia/react-native-web-analytics": "1.1.0"

About this package

@tecnavia/react-native-web-analytics

track events and screen to web Firebase or GA4 properties

Installation

npm install git+https://ussvc01.newsmemory.com:3000/tecnavia/react-native-web-analytics.git#tag --save

Usage

import analytics from "@tecnavia/react-native-web-analytics";

analytics()

Methods

enabled debug mode on WebView

debugMode(true|false);

if you need to send events to multiple instance initialize webmode that will istance a native webview

analytics().initializeWebMode();

initialize a web instance of firebase

analytics().addInstance({
    name: INSTANCE_NAME,
    apiKey: FIREBASE_API_KEY,
    appId: FIREBASE_APP_ID,
    projectId: FIREBASE_PROJECT_ID,
    measurementId: FIREBASE_MEASUREMENTE_ID
});

Troubleshooting

  1. the web istances must be configured by addInstance method, remember that on firebase base must be configured like a web project instead of app project

Made with create-react-native-library

Dependencies

Development Dependencies

ID Version
@commitlint/config-conventional ^17.0.2
@evilmartians/lefthook ^1.2.2
@react-native-community/eslint-config ^3.0.2
@release-it/conventional-changelog ^5.0.0
@types/jest ^28.1.2
@types/react ~17.0.21
@types/react-native 0.70.0
commitlint ^17.0.2
del-cli ^5.0.0
eslint ^8.4.1
eslint-config-prettier ^8.5.0
eslint-plugin-prettier ^4.0.0
jest ^28.1.1
pod-install ^0.1.0
prettier ^2.0.5
react 17.0.2
react-native 0.67.5
react-native-builder-bob ^0.20.0
release-it ^15.0.0
typescript ^4.5.2

Peer Dependencies

ID Version
react *
react-native *

Keywords

react-native ios android
Details
npm
2024-12-31 10:24:50 +00:00
3
naquilini
MIT
latest
17 KiB
Assets (1)
Versions (1) View all
1.1.0 2024-12-31