Google Firebase Analytics

You'll need to import the javascript file in your website before starting from this link.

1) To enable/disable Analytics data collection

const { Analytics: FirebaseAnalytics } = window.WTN.Firebase

FirebaseAnalytics.setCollection({
    enabled: true/false
})

2) To identify user

const { Analytics: FirebaseAnalytics } = window.WTN.Firebase

FirebaseAnalytics.setUserId({
    userId: "customuserId"
})

3) To set user properties like name, gender etc

const { Analytics: FirebaseAnalytics } = window.WTN.Firebase

FirebaseAnalytics.setUserProperty({
    key: 'name',
    value:'Webtonative'
})

4) To set default parameter which will be passed along with all future events

5) To Log events

6) To Track screen view in your website

Last updated

Was this helpful?