Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ios/android): update the Firebase iOS SDK to 10.25.0 and Android SDK to 22.0.0 #84

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Prev Previous commit
Next Next commit
docs: added setConsent and example updated
  • Loading branch information
Astrovic committed May 9, 2024
commit a3adedef48af5e8c38cdf358f1185fff1becb46b
21 changes: 19 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -116,6 +116,15 @@ Make sure to check the [Log Events](https://firebase.google.com/docs/analytics/a
- `value` (String)
- `name` (String)

Set up [consent mode](https://developers.google.com/tag-platform/security/guides/app-consent?consentmode=advanced) for apps

##### `setConsent(parameters)`
- `parameters` (Dictionary)
- `analyticsStorage` (Boolean)
- `adStorage` (Boolean)
- `adUserData` (Boolean)
- `adPersonalization` (Boolean)

Sets a user property to a given value. Up to 25 user property names are supported. Once set, user
property values persist throughout the app lifecycle and across sessions.

@@ -166,11 +175,19 @@ Ti.API.info('App Instance ID: ' + FirebaseAnalytics.appInstanceID);
FirebaseAnalytics.log('My_Event', { /* Optional arguments */ });

// Set user-property string
FirebaseAnalytics.setUserPropertyString({
name: 'My_Name',
FirebaseAnalytics.saveUserProperty({
name: 'My Name',
value: 'My Value'
});

// Set consents
FirebaseAnalytics.setConsent({
analyticsStorage: true,
adStorage: true,
adUserData: true,
adPersonalization: true
});

// Set User-ID
FirebaseAnalytics.userID = 'MyUserID';

10 changes: 9 additions & 1 deletion example/app.js
Original file line number Diff line number Diff line change
@@ -11,11 +11,19 @@ Ti.API.info('App Instance ID: ' + FirebaseAnalytics.appInstanceID);
FirebaseAnalytics.log('My Event', { /* Optional arguments */ });

// Set user-property string
FirebaseAnalytics.setUserPropertyString({
FirebaseAnalytics.saveUserProperty({
name: 'My Name',
value: 'My Value'
});

// Set consents
FirebaseAnalytics.setConsent({
analyticsStorage: true,
adStorage: true,
adUserData: true,
adPersonalization: true
});

// Set User-ID
FirebaseAnalytics.setUserID('MyUserID');