Skip to content

Commit 958f1f9

Browse files
authored
Merge branch 'main' into pooja/library-mentions
2 parents 90f0088 + 883cb95 commit 958f1f9

File tree

6 files changed

+97
-55
lines changed

6 files changed

+97
-55
lines changed
Binary file not shown.
Lines changed: 74 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,77 +1,98 @@
11
---
2-
id: getting-started
3-
title: Getting Started
4-
slug: '/integrations/google-analytics'
2+
slug: /integrations/google-analytics
3+
title: Google Analytics
4+
description: Learn how to setup Google Analytics in FluterFlow
5+
tags: [Google Analytics]
6+
sidebar_position: 1
7+
keywords: [Google Analytics, Firebase, Firebase Analytics, Track App Events]
58
---
69

710
# Google Analytics
811

9-
Google Analytics allows you to track app-related events.
12+
Integrating Google Analytics into your FlutterFlow project enables you to monitor user interactions, track app performance, and gain valuable insights to enhance user experience. Here's a comprehensive guide on setting up and utilizing Google Analytics within FlutterFlow.
1013

11-
## Setup
12-
13-
Simply navigate to **Settings and Integrations** > **Integrations** > **Google Analytics** and turn on the **Enable Google Analytics** toggle. You can see all the logged events inside the Analytics dashboard of your [Firebase console](https://console.firebase.google.com/).
14+
:::tip
1415

15-
## Default Events
16-
Currently, we support automatic logging for the following events:
16+
Google Analytics is integrated into Firebase. This means you must [**set up Firebase**](../../firebase/connect-to-firebase-setup.md) to enable analytics tracking and log events from your FlutterFlow app.
1717

18-
* **On Page Load**: This logs an event when a user opens a page. It is logged with the Firebase recommended name, i.e., **screen_view,** but you will find the actual screen name, i.e., page title, inside the parameter (click on the screen_name to reveal the parameter).
18+
:::
1919

20-
* **On Action Start**: This logs an event when a user interacts with widgets to trigger an action. It will be logged as
21-
`{WIDGET_NAME}_{TRIGGER_TYPE}` For example, when the user taps a button and navigates to the
22-
next page, the event will be logged as **Button_navigate_to**.
20+
## Enable Google Analytics in Firebase
21+
22+
To enable Google Analytics in Firebase, open the [Firebase Console](https://console.firebase.google.com/) and select your project. From the left-side menu, navigate to **Analytics > Dashboard** and click **Enable Google Analytics**. Choose an existing Google Analytics account or create a new one, then **Finish** the setup.
23+
24+
<div style={{
25+
position: 'relative',
26+
paddingBottom: 'calc(56.67989417989418% + 41px)', // Keeps the aspect ratio and additional padding
27+
height: 0,
28+
width: '100%'}}>
29+
<iframe
30+
src="https://demo.arcade.software/QJY4MZVonDmVgIcexK6t?embed&show_copy_link=true"
31+
title=""
32+
style={{
33+
position: 'absolute',
34+
top: 0,
35+
left: 0,
36+
width: '100%',
37+
height: '100%',
38+
colorScheme: 'light'
39+
}}
40+
frameborder="0"
41+
loading="lazy"
42+
webkitAllowFullScreen
43+
mozAllowFullScreen
44+
allowFullScreen
45+
allow="clipboard-write">
46+
</iframe>
47+
</div>
48+
<p></p>
49+
50+
## Enable Google Analytics in FlutterFlow
51+
52+
To begin collecting analytics data, navigate to **Settings and Integrations > Integrations > Google Analytics** within your FlutterFlow project and toggle on the **Enable Google Analytics** option.
53+
54+
Once enabled, you can set the [Predefined Events](#predefined-events). You can selectively toggle these options to log specific user interactions automatically.
55+
56+
![enable-google-analytics](imgs/enable-google-analytics.avif)
57+
58+
### Predefined Events
59+
60+
You can enable automatic logging for the following events:
61+
62+
- **On Page Load**: Logs an event when a user opens a page, recorded with the Firebase-recommended name `screen_view`. The actual screen name is accessible within the `screen_name` parameter.
63+
- **On Action Start**: Captures events when users interact with widgets that trigger actions. Events are logged in the format `{WIDGET_NAME}_{TRIGGER_TYPE}`. For instance, if a user taps a button that navigates to another page, the event is logged as `Button_navigate_to`.
64+
- **On Each Individual Action**: This logs an event for every individual action or action chain for a given widget. It will be logged as `{WIDGET_NAME}_{TRIGGER_TYPE}` For example, when the user taps on a button and adds the *Upload Media* action followed by the *Update App State* action, the event will be logged as `Button_upload_media` and `Button_update_local_state`.
65+
- **On Authentication**: Logs events for authentication-related actions such as sign-up, login, logout, password reset, or account deletion. Events are logged using the action type, e.g., `sign_up` or `login`.
2366

24-
* **On Each Individual Action**: This logs an event for every individual action or action chain for a given widget. It will be logged as `{WIDGET_NAME}_{TRIGGER_TYPE}` For example, when the user taps on a button and adds the *Upload Media* action followed by the *Update App State* action, the event will be logged as `Button_upload_media` and `Button_update_local_state`.
67+
:::tip
2568

26-
* **On Authentication**: This logs an event for every authentication action. That means whenever you signup, log in, log out, reset your password, or delete your account. The event will be logged as `{ACTION_TYPE}` (e.g., sign_up, login, etc.).
69+
To easily identify widgets in the analytics dashboard, consider giving them recognizable names, such as `BuyButton` instead of just `Button`.
2770

28-
:::tip
29-
To clearly identify the widgets (on which the events are logged) in the analytics dashboard, you can rename and provide an easily recognizable name to the widget (e.g., BuyButton instead of just Button).
3071
:::
3172

3273
## Google Analytics Event [Action]
3374

34-
This action allows you to log custom events. By using this action, you can record additional information associated with the event in the form of parameters.
35-
36-
Go to your project page on FlutterFlow and follow the steps below to define the Action to any widget.
37-
38-
1. Select the **Widget** (e.g., Button) on which you want to define the action.
75+
In addition to predefined events, you can track specific user actions relevant to your app’s goals. This action allows you to log custom events and record additional information through parameters.
3976

40-
2. Select **Actions** from the [Properties Panel](../../../intro/ff-ui/builder.md#properties-panel) (the right menu), and click **+ Add Action**.
41-
* Search and select the **Google Analytics Event** action.
42-
* Enter the name of the event in the **Value** input field. This name will be displayed on
43-
the Analytics dashboard.
44-
45-
46-
:::note
47-
All the logged events can be accessed from the Analytics dashboard of your [Firebase console](https://console.firebase.google.com/).
48-
:::
49-
50-
:::tip
51-
Event names must be 40 characters or less. Event names may only contain alphanumeric characters and underscores ("_"), and must start with an alphabetic character.
52-
:::
77+
For example, in an e-commerce app, you might log product purchases with parameters such as `product_category: electronics` to track item categories and `user_role: premium` vs. `user_role: guest` to differentiate user types.
5378

54-
<figure>
55-
![adding-analytics-action.gif](adding-analytics-action.gif)
56-
<figcaption class="centered-caption">Adding Google Analytics Event Action</figcaption>
57-
</figure>
79+
To log a custom event, add the **Google Analytics Event** action and enter a clear, descriptive **Event Name**. You can add parameters for extra context by clicking **+ Add Parameter** and providing **Key**-**Value** pairs (e.g., `product_category` as the Key and `electronics` as the Value).
5880

59-
### Add Parameters
81+
![google-analytics-action](imgs/google-analytics-action.avif)
6082

61-
At times, you may need to log additional details such as the time, user type, and widget placement when an event occurs.
83+
## Viewing Analytics Data
6284

63-
Here's how you can log an event by the tab name when a tab within the TabBar is selected or changed:
85+
To see all tracked events, both automatic and custom, open the [Firebase Console](https://console.firebase.google.com/) and select your project. From the left-side menu, navigate to **Analytics > Dashboard** to access detailed event reports.
6486

65-
1. Select the **Tab** (inside TabBar) on which you want to define the action.
87+
Use this data to gain insights into app screens, which funnels convert best, and where churn or drop-offs occur. In the long run, these metrics help you make data-driven improvements that enhance the user experience and maximize the impact of your FlutterFlow app.
6688

67-
2. Select **Actions** from the [Properties Panel](../../../intro/ff-ui/builder.md#properties-panel) (the right menu), and click **+ Add Action**.
68-
* Search and select the **Google Analytics Event** action.
69-
* Enter the name of the event in the **Value** input field, such as *Tabbar_On_Tap*.
70-
* Click on the **+ Add Parameter** and open the **Param 1** section.
71-
* Inside the **Key** section, enter **Value** as **Tab_Name**.
72-
* Inside the **Value** section, enter the **Value** as the name of the tab (e.g., *Upcoming*,
73-
*Past)*.
74-
75-
3. Similarly, add this action for other tabs as well.
89+
## FAQs
7690

77-
![adding-analytics-action-with-parameter.gif](adding-analytics-action-with-parameter.gif)
91+
<details>
92+
<summary>
93+
Why don’t I see any Analytics data yet?
94+
</summary>
95+
<p>
96+
Event data may not appear instantly, which can be frustrating during development. Firebase may take up to **24 hours** to display event data in the main dashboards. Ensure your device has internet access and you’ve used the app at least once since enabling Analytics.
97+
</p>
98+
</details>

docs/testing-deployment-publishing/exporting-code/ff-cli.md

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,28 @@ To use the CLI, you'll need to create an API token and use it in your requests.
7575

7676
## Filtered exports
7777

78-
We've developed [a solution](https://github.com/krabhishek/flutterflow-filtered-pull) that allows you to use the CLI tool without overwriting specific files or directories. This is especially useful if you're managing code outside of FlutterFlow and want to prevent it from being overwritten during a code export.
78+
If you are updating an existing project and do not want certain files to be overwritten during a code export, you can create a `.flutterflowignore` file in the root of your project directory. This file should contain a list of files to be ignored using globbing syntax.
79+
80+
### Example:
81+
If your project is located at:
82+
```
83+
/Users/yourname/projects/my_flutterflow_app/
84+
```
85+
Then, place the `.flutterflowignore` file in:
86+
```
87+
/Users/yourname/projects/.flutterflowignore
88+
```
89+
90+
### Example `.flutterflowignore` contents:
91+
```
92+
my_flutterflow_app/android/app/build.gradle # Prevents FlutterFlow from overwriting native Android build configuration
93+
my_flutterflow_app/ios/Runner/Info.plist # Keeps iOS app metadata unchanged
94+
my_flutterflow_app/web/index.html # Ensures custom modifications to the web entry file are retained
95+
```
96+
This ensures that the specified files and directories are not overwritten during code export.
97+
98+
For more details on globbing syntax, refer to [this guide](https://pub.dev/packages/glob#syntax).
99+
79100

80101
## FAQ
81102
<details>
@@ -87,4 +108,4 @@ dart pub global activate flutterflow_cli
87108
```
88109
This should update the CLI and fix the issue.
89110
</p>
90-
</details>
111+
</details>

0 commit comments

Comments
 (0)