EMI-INDO / emi-indo-cordova-plugin-fanalytics

Cordova Plugin Firebase Analytics support consent
ISC License
0 stars 0 forks source link

emi-indo-cordova-plugin-fanalytics

Cordova Plugin Firebase Analytics support consent

full index.html example

💰Sponsor this project

PayPal

Minimum Cordova Engines

Features

project confirmation ( Android )

add file google-services.json inside the www folder

add this line <resource-file src="https://github.com/EMI-INDO/emi-indo-cordova-plugin-fanalytics/raw/main/www/google-services.json" target="app/google-services.json" /> in config.xml

<platform name="android">
    ...
    <resource-file src="https://github.com/EMI-INDO/emi-indo-cordova-plugin-fanalytics/raw/main/www/google-services.json" target="app/google-services.json" />
</platform>

If the above is completed

Installation plugin

cordova plugin add emi-indo-cordova-plugin-fanalytics

Or

cordova plugin add https://github.com/EMI-INDO/emi-indo-cordova-plugin-fanalytics

With variable

cordova plugin add emi-indo-cordova-plugin-fanalytics --variable ANDROID_FIREBASE_BOM_VERSION=32.0.0 --variable ANALYTICS_KTX_VERSIONS=21.2.2

Remove

cordova plugin rm emi-indo-cordova-plugin-fanalytics

( Optional default value)

Add from config.xml

<preference name="ANDROID_FIREBASE_BOM_VERSION" value="32.0.0"/>
<preference name="ANALYTICS_KTX_VERSION" value="21.2.2"/>
<preference name="ANALYTICS_COLLECTION_ENABLED" value="true"/>
<preference name="AUTOMATIC_SCREEN_REPORTING_ENABLED" value="true"/>

<!-- https://developers.google.com/tag-platform/devguides/app-consent?platform=android -->

<preference name="DEFAULT_ALLOW_ANALYTICS_STORAGE" value="true"/>
<preference name="DEFAULT_ALLOW_AD_STORAGE" value="true"/>

<preference name="AndroidXEnabled" value="true"/>
<preference name="GradlePluginGoogleServicesEnabled" value="true"/>
<preference name="GradlePluginGoogleServicesVersion" value="4.3.15"/>

Add from Variabel

project confirmation ( IOS )

<platform name="ios">
    ...
    <resource-file src="https://github.com/EMI-INDO/emi-indo-cordova-plugin-fanalytics/raw/main/GoogleService-Info.plist" />
    <preference name="deployment-target" value="12.0" />
    <preference name="SwiftVersion" value="5.3" />
</platform>

If the above is completed

Then from the command line run: cd/path cordova project

Installation plugin

cordova plugin add emi-indo-cordova-plugin-fanalytics

Or

cordova plugin add https://github.com/EMI-INDO/emi-indo-cordova-plugin-fanalytics

With variable

cordova plugin add emi-indo-cordova-plugin-fanalytics --variable IOS_FIREBASE_POD_VERSION=10.10.0

Remove

cordova plugin rm emi-indo-cordova-plugin-fanalytics

( Optional default value)

Add from config.xml

<preference name="IOS_FIREBASE_POD_VERSION" value="10.10.0"/>
<preference name="ANALYTICS_COLLECTION_ENABLED" value="true"/>
<preference name="AUTOMATIC_SCREEN_REPORTING_ENABLED" value="true"/>

<!-- https://developers.google.com/tag-platform/devguides/app-consent?platform=ios -->

<preference name="DEFAULT_ALLOW_ANALYTICS_STORAGE" value="true"/>
<preference name="DEFAULT_ALLOW_AD_STORAGE" value="true"/>

Add from Variabel

Support Platform