Flutter
Setting up Blitzllama for your Flutter app is easy and you can do it by following the steps. The complete SDK integration into a Flutter app takes an average of 10 mins.
The three main sections here are:
Integrating the SDK: retrieving and adding the SDK to your project
Managing Users: creating a new user and setting user attributes
Adding Triggers: add triggers in critical components inside your app to initiate the micro-surveys
1. Integrating the SDK
Open pubspec.yaml
and add the following dependencies:
Next, open the terminal window then run the command flutter pub get
Please add the above line to the file to which Blitzllama functions are added.
Check pub.dev for usages and examples.
In case you face issues with iOS builds, Please add below snippet to run frameworks
2. Managing Users
Create User
It is mandatory to create users using unique user IDs. Not only does it provide a consistent experience across platforms, but it also prevents users from being surveyed multiple times.
Create a user with a unique user_id to prevent any inconsistencies.
Please clear storage, if you are switching between projects in the same device.
Update User Email (optional)
You can provide Blitzllama with the user's email address. Email address is not mandatory for Flutter micro-surveys.
Update User Name (optional)
You can also provide Blitzllama with the user's name. It can be used to make the questions more personalized. The user name is, again, not mandatory to launch surveys.
Update User Attributes (optional)
Attributes are additional data points about users, that are used for creating targeted user cohorts on the Blitzllama dashboard. Attributes are optional and not required to launch a micro-survey.
Allowed data_type values are "string", "number", "date", and "boolean".
Set User Language (optional)
You can provide Blitzllama with the language you wish to survey your user. It is not mandatory to launch surveys.
Language code should be in ISO 639-1 codes.
Logout User (optional)
You can call this function if you wish to stop tracking the user.
3. Adding Triggers
Triggers, when initiated, display the micro-survey to the users. You can add triggers to all components - button press, screen open, or screen close - that are critical in a user's journey.
Make sure to create a user before triggering a survey.
You can also attach properties to each event. Event schemas can be changed on the dashboard. This is an optional feature.
Copy
You can use these properties to filter more users in the survey, as shown in the below screenshot.
Last updated