Push Notifications, Google Analytics for Firebase, Google Sign-In Configuration

Discover how to enable Push Notifications, Google Analytics for Firebase, and Google Sign-In

Last Updated

June 17th, 2020

Docebo Module

Mobile

Reading Time

12 min

User Level

Introduction

In the Branded Mobile App Publisher menu of your learning platform, you can enable push notifications, brief messages sent through your branded mobile app even when the app is not open and that your users will see in the notification area or in the lock screen of their devices. Once you have enabled them, you will be able to receive push notifications in your branded mobile app. This type of notification is used by the Virtual Coach to notify learners about content that may interest them or about pending tasks to complete. 

To learn how to enable push notifications in the Properties tab of your Branded Mobile App Publisher menu, please refer to the Enabling Push Notifications section in this article.

For a step-by-step technical guide explaining how to configure the branded mobile app publisher in order to send push notifications to the branded apps and collect analytical data, and enable Google Sign-In (using Gmail or Google Apps), read the following sections in this article.

 When configuring push notifications for your branded mobile app, there are three different scenarios, according to the desired features:

  1. Enabling Push Notifications and Analytics
  2. Enabling Google Sign-In
  3. Enabling both Push Notifications and Analytics AND Google Sign-In

You’ll choose to enable Google Analytics for Firebase if you want to collect analytical data about the usage of your app, and you will decide to enable Google Sign-In if your company owns and uses a Google G Suite to manage users and, for this reason, you need your users to connect to Docebo learning platform through their Google accounts.

Please note that the configuration of push notifications in your Branded Mobile App Publisher is a very technical functionality. We suggest contacting a member of your company’s IT department having access to all of the credentials needed to perform the configuration properly.

Also note that Docebo is not responsible for the content of external documents written by other companies (i.e. Apple, Google etc.). Remember that it is your responsibility to check if these documents are updated or changed in any way.

Creating a Firebase Project

In order to create a project in Google Firebase, you need to have a Google account that allows you to access Google Firebase application development platform.

After you log into Firebase, press the Create a project button to start creating a new Firebase project.

welcome to firebase

A three-step wizard opens. In the first step, type a name for your new project, accept the terms, then press Continue.

create a project step 1

Read the info about Google Analytics in the second step, then press again Continue.

Now, in the third and last step (Configure Google Analytics), select in which geographical area you want to store analytical data, accept the conditions, and press the Create project button.

create a project step 3

Congratulations, you have created your Google Firebase project!

Creating an iOS App in Your Firebase Project

To create an iOS application in your Firebase project, once you have created your project in Firebase, click on the gear icon near the Project Overview option in the sidebar, then select Project Settings

In the Your Apps section in the General tab (first tab on the left), you will see some icons. Click on the iOS icon.

Project Settings

A wizard will open. In the first step, in the iOS bundle ID text field type the unique ID you used in the App Store Connect service and in the Identifiers manager section of the Apple Developer Console to create the iOS app. Then, choose an app nickname for the app and type it in the corresponding field. Finally, fill in the App Store ID field (even if it is marked as optional). When finished, click the Register app button to register your app.

add firebase to iOS app

In the second step of the wizard, press the Download GoogleService-Info.plist button.

Please note that you need to upload this file in the Configuration File field in the iOS tab (Settings section, Google Services subsection) on the Branded Mobile App Publisher page in your Docebo platform.

Once finished, press Next.

add firebase to your iOS app 2

In the third and fourth steps of the wizard, simply press Next and, in the fifth step, select the Skip this step link.

add firebase to your iOS app 3

Now, you should see the newly created app in the Your apps section in the General tab of your Google Firebase project. 

your apps iOS app

Uploading the iOS APNs Key

In order to be able to send push notifications to iOS devices, you need to create an APNs (Apple Push Notifications service) Authentication Key in the Apple Developer Console, associate it with your iOS app and then upload the private key in the Firebase Project settings. Please note that the same private key is used for all of your apps.

Begin by logging into the Apple Developer Console and reach the Certificates, Identifiers & Profiles section. Then, move to the Keys section by selecting the Keys option on the left of the page. Once you access this section, press the plus icon.

certificates, identifiers & profiles

Enter a name for the new key in the Key Name field and check the Apple Push Notifications service (APNs) option. Now, press Continue. In the page that opens, select the Register button.

When the loading process has ended, you can download the key. 

Please note that you can select the Download button only one time, therefore it’s important that you remember to store the key in a safe location, because if you lose your key you must create a new one and then you have to update all of the already active services using the new key.

Now, select the Identifiers option on the left of the page in order to reach the Identifiers section of the Apple Developer Console page, where you will select the identifiers of your app. Once you access this section, press the plus icon, then choose the App IDs option. Then, press Continue. In the Bundle ID field, insert the bundle ID (please note that it is the same that you inserted during the iOS app creation process you followed in the Creating an iOS App in Your Firebase Project section of this article) and also add a description of the app you are creating in the corresponding field. Then, select the Push Notifications option. Once selected the Push Notifications checkbox, you’ll be redirected to the page displaying all of the identifiers, where you can now find the identifier you just created.

Now log into the Firebase Console, click on the gear icon near the Project Overview option in the sidebar, then select Project Settings and access the Cloud Messaging tab (second tab from the left). Here, reach the iOS app configuration section.

iOS app configuration

In the APNs Authentication Key subsection, upload the key you previously downloaded from the Apple Developer Console, and fill in the Key ID and the Team ID fields. When ready, click on Upload to upload the APNs authentication key. You’ve now linked your Firebase project to the app in the Apple Developer Console.

upload APNs auth key

Creating an Android App in Your Firebase Project

To create an Android application in your Firebase project, once you have created your project in Firebase, click on the gear icon near the Project Overview option in the sidebar, then select Project Settings

In the Your Apps section in the General tab (first tab on the left), you will see some icons. Click on the Android icon.

project settings Android

A wizard will open. In the first step, type the package name you used on the Branded Mobile App Publisher page in your Docebo platform (Android tab, Settings section) in the Android package name text field.

Then, choose an app nickname for the app and type it in the corresponding field. When finished, click the Register app button to register your app.

add firebase to your Android app

In the second step of the wizard, press the Download google-services.json button.

Please note that you need to upload this file in the Configuration File field in the Android tab (Settings section, Google Services subsection) on the Branded Mobile App Publisher page in your Docebo platform.

Once finished, press Next.

add firebase to your Android app 2

In the third step, simply press Next and in the fourth step, select the Skip this step link.

add firebase to your iOS app 3

Now, you should see the newly created app in the Your apps section in the General tab of your Google Firebase project.

android-my rebranded app

Enabling Push Notifications and Analytics

In order to send push notifications to mobile devices, Go.Learn and the branded mobile apps created by Docebo use Firebase Cloud Messaging (FCM), a service in the Google Firebase application development platform. This service has a free tier subscription that anyone can use to send push notifications to mobile devices. Here you can read a comprehensive guide about Firebase Cloud Messaging service.

In order to enable push notifications and Analytics, begin by accessing the Admin Menu from the gear icon in the top right corner of your desktop platform. Then, select the Branded Mobile App Publisher option in the Theme Settings section. On the Branded Mobile App Publisher page, you need to configure the fields detailed in the next paragraphs (you’ll find these fields in the Properties, iOS and Android tabs of the page).

Properties Tab

In the first tab, the Properties tab, you will need to configure the Project ID field and the Firebase Service Accounts Configuration File field. You’ll find both these fields in the Push Notification section of the Properties tab in your Docebo platform.

  • Project ID field: First of all, you need to sign into your Firebase company account and create a project (please refer to the Creating a Firebase Project section above in this article for further info). Once created the project in Firebase, click on the gear icon near the Project Overview option in the sidebar, then select Project Settings. In the Your Project section in the General tab (first tab on the left), you’ll find the Project ID. Copy this text from Firebase and paste it into the Project ID field in your Docebo platform.
  • Firebase Service Accounts Configuration File field: Start by signing into your Firebase company account and, in your Firebase project, click on the gear icon near the Project Overview option in the sidebar, then select Project Settings. Reach the Service Accounts tab, then click Generate New Private Key at the bottom of the tab. A pop up box will open, where you need to confirm your action by pressing the Generate Key button. Now, download the json file from Firebase and upload it into the Firebase Service Account Configuration File field in your Docebo platform.

iOS Tab

In the second tab, the iOS tab, you will need to configure the Google iOS Client ID, Google Web Client ID and Configuration File fields. You’ll find both these fields in the Google Services section of the iOS tab in your Docebo platform.

  • Google iOS Client ID field: Type in this field the following string: “PUSH-ONLY”.
  • Google Web Client ID field: Type here the following string: “PUSH-ONLY”.
  • Configuration File field: Please refer to the Creating an iOS App in Your Firebase Project section above in this article for any further information and follow the configuration steps included in that section.

Moreover, in order to be able to send push notifications to iOS devices, you need to upload the APNs Authentication Key. Please read the Uploading the iOS APNs Key section above in this article and follow the instructions provided.

Android Tab

In the third tab, the Android tab, you will need to configure the Google Web Client ID field and the Configuration File field. You’ll find both these fields in the Google Services section of the Android tab in your Docebo platform.

  • Google Web Client ID field: Type here the following string: “PUSH-ONLY”.
  • Configuration File field: Please refer to the Creating an Android App in Your Firebase Project section above in this article for any further information and follow the configuration steps included in that section.

You’ve now filled in all of the fields needed to activate push notifications in your branded mobile app. 

Now, select Save Changes at the bottom of the Branded Mobile App Publisher page to save your project, then rebuild your apps by selecting the Generate Build button that you’ll find near the Save Changes button. 

After having generated the build, you need to re-sign your branded mobile app. In order to publish your app on the application stores (Google Play for Android and App Store for iOS), you have to replace the digital signature temporarily applied by Docebo with your own signature generated in-house (for Android) or with the signing certificate assigned by the App Store (for iOS). In this article, you’ll find detailed instructions on how to re-sign your app. Finally, upload the app packages on the app stores’ consoles to publish your app on the mobile app stores for Google and Apple.

For any further info about how to perform these processes (generating the build, re-signing your app, uploading the package on the application store), please read this article.

Congratulations, your app is now connected to Firebase! From this moment on, you will receive push notifications and collect analytical data about the usage of the app.

For further info about each one of the events that you receive in the Events section of Firebase Analytics, you can refer to this table.

Enabling Google Sign-In

In order to enable Google Sign-In (using Gmail or Google Apps), you need to create a project in Firebase (please refer to the Creating a Firebase Project section above in this article for further info).

Once you have created your project, select the Authentication option in the sidebar on the left of the Firebase page, then reach the Sign-in method tab. In this tab, select and enable the Google sign-in provider by switching on the corresponding toggle.

sign-in method

Now, open the Web SDK configuration dropdown section and copy the value of the Web client ID field and paste it in the Google Web Client ID field in both the iOS and Android tabs on the Branded Mobile App Publisher page in your Docebo platform.

In order to collect some additional data that you need to build the iOS app, reach the Credentials section of the Google API console. To reach it, you can also click on the link that you see in the hint balloon of the Web SDK configuration section of the Google Sign-in provider.

web SDK configuration

Once you reach the Credentials section of the Google API console, copy the Client ID of the iOS specific credentials. Then, paste the Client ID in the Google iOS Client ID field in the iOS tab on the Branded Mobile App Publisher page in your Docebo platform.

OAuth 2.0 client IDs

Now, you need to access the General tab of your Firebase project and locate the Android app in the Your apps section. In the SHA certificate fingerprints field in this section, you will need to paste the SHA-1 fingerprints of your signing certificate. 

You can refer to this page for more information about using the keytool. You simply need to open your production certificate store (the .keystore file) and type the following command:

keytool -list -v -keystore ./yourcompany.keystore

Then, locate the line with the SHA1 of your certificate and finally paste its value in the SHA certificate fingerprints field.

SHA certificate fingerprints

You now need to go to the General tab (first tab on the left) of your Firebase project, reach the Your Apps section and download the latest configuration files for your iOS and Android apps. To do so, select your iOS app and download the GoogleService-Info.plist config file through the corresponding button, then select your Android app and download the google-services.json config file through the corresponding button.

Once downloaded the configuration files, upload them in the Configuration File field (you’ll find this field in both the iOS and the Android tabs) on the Branded Mobile App Publisher page in your Docebo platform. Upload the .plist file in the iOS tab and the .json file in the Android tab.

Now, select Save Changes, then rebuild your apps by selecting the Generate Build button that you’ll find near the Save Changes button at the bottom of each one of the iOS and Android tabs in the Branded Mobile App Publisher page of your Docebo platform. After having generated the build, you need to re-sign your branded mobile app. In order to publish your app on the application stores (Google Play for Android and App Store for iOS), you have to replace the digital signature temporarily applied by Docebo with your own signature generated in-house (for Android) or with the signing certificate assigned by the App Store (for iOS). Finally, upload the app packages on the app stores’ consoles to publish your app on the mobile app stores for Google and Apple. 

For any further info about how to perform these processes (generating the build, re-signing your app, uploading the package on the application store), please refer to this article.

Enabling both Push Notifications and Analytics AND Google Sign-In

If you need to enable both Push Notifications and Analytics AND Google Sign-In, please follow these steps:

1. Create the iOS and Android apps, as explained in the Creating an iOS App in Your Firebase Project and in the Creating an Android App in Your Firebase Project sections of this document

2. Follow all of the steps provided in the Enabling Google Sign-In section in this document

3. Complete all of the steps provided in the Enabling Push Notifications and Analytics section and that you didn’t find when you followed the steps of the Enabling Google Sign-In section of this document. Please note: don’t overwrite the existing client IDs (Google iOS Client ID field and Google Web Client ID field) with the “PUSH-ONLY” string.

4. Save your changes, then build both the iOS and the Android apps by selecting the Generate Build button that you’ll find near the Save Changes button at the bottom of each one of the iOS and Android tabs in the Branded Mobile App Publisher page of your Docebo platform.

After having generated the build, you need to re-sign your branded mobile app. In order to publish your app on the application stores (Google Play for Android and App Store for iOS), you have to replace the digital signature temporarily applied by Docebo with your own signature generated in-house (for Android) or with the signing certificate assigned by the App Store (for iOS). In this article, you’ll find detailed instructions on how to re-sign your app.

Finally, upload the app packages on the app stores’ consoles to publish your app on the mobile app stores for Google and Apple.

For any further info about how to perform these processes (generating the build, re-signing your app, uploading the package on the application store), please read this article.