Documentation

Documentation

YourOwn SetupYourOwn SDKYourOwn API
Sphere SetupSphere SDKSphere API
  • Resources

›Firebase Web

Configuration

  • Firebase configuration steps
  • Tuya configuration steps
  • DKIM setup

Troubleshooting

  • In-App messages
  • Events and Report

Firebase Web

  • Firebase Web
  • When to trigger events
  • Code snippet

Firebase Web

If your platform runs both on Mobile devices and in a Web platform, you should follow data coming in from the Web as well.

Utilizing Firebase web

Adding it in

Start by integrating Google Firebase Web platform into your web-client code https://firebase.google.com/docs/web/setup

The code

After that, use the basic Javascript code snippet that you can use for reporting.

It adds in the needed data (such as userID, email, etc.) and has code for all the normal events.

The basics

Use the events in the code for all the basic events, a full explination can be found in When to trigger events

You can also use if for any Custom Events you want, just as you would the SDKs. See the example below.

Custom event - Example

In case we would like to create new event that will be triggered when the user Jor-el pressed a key to launch the Kal-El’ spaceship to earth, requested journey length is 3 days. This action is triggered and executed directly by the User on the SpaceshipReadyForLaunchScreen.

  • Event name : tap_spaceship_launch
  • Screen name : spaceship_ready_for_launch_screen
  • Event origin : User
  • Custom event properties :
    • spaceship_destination = earth
    • days_of_travel = 3

Implementation of the event will look as below:

//TODO: Add the following to the EventLoggerProvider from the code snippet
logTapSpasceshipLaunched = (spaceshipDestination, daysOfTravel) => {
    const params = {
        ...
        [SCREEN_NAME]: "spaceship_ready_for_launch_screen",
        createGeneralParameters(EVENT_ORIGIN_USER),
        "spaceship_destination": spaceshipDestination,
        "days_of_travel": daysOfTravel
    }
    this.internalLog("tap_spaceship_launch", params)
}
← Events and ReportWhen to trigger events →
  • Utilizing Firebase web
    • Adding it in
    • The code
    • The basics
  • Custom event - Example
Copilot
Mail: hello@copilot.cx
Call: (212).398.0001
© Copilot.cx 2025