Flutter
How do I set up server-side on my mobile app?
Step 1
ACTIVATE YOUR SDK ON THE NEW CAX PLATFORM :
To activate event collection on the Commanders Act X platform, remember to activate your collection sources in the sources module.
It is at this stage that you will find the id of your site and a source id (sourceKey) that will be useful later for installing the SDK.
Step 2
INTEGRATE OUR SDK TO TRANSMIT YOUR APPLICATION'S EVENTS :
To facilitate the collection of your events from your mobile application, we have developed a Flutter SDK to facilitate the transmission of data to our server-side:
To implement events
To implement the CMP
You need to implement events for each action to be tracked (page view, click, etc.).
Here is an example of code used to initialise an event:
Here is an example of the code used to execute an event:
Click here for our full list of standard events:
YOU ALSO USE SERVER-SIDE TO COLLECT EVENTS FROM YOUR WEBSITE ?
We strongly recommend that you use the same datalayer for both the web application and the mobile application.
The main benefit: a single destination to configure for both sources! Your destination configuration will be recognised by both web and mobile.
YOU DO NOT WISH TO USE OUR SDK ?
Don't worry, you can send us your events directly using our API.
Step 3
INTEGRATING INITIALISATION METHODS :
Prerequisites :
You will need a specific sourceKey to define the source. (go to step 1)
You will need a siteID to define the corresponding workspace
Optional:
You can use the TCUser class to pass relevant information about your users.
Here's an example of the code you can look at
Documentation of the initialisation method
Step 4
TEST YOUR IMPLEMENTATION BEFORE GOING LIVE :
A quality assurance test and validation are strongly recommended before going into production!
Here are a few points to help you with your recipe:
Testing => tips on how to test
Debugging => list of methods for displaying logs in your application
Common errors list => List of the most common errors
YOU ARE HAVING DIFFICULTY INSTALLING OUR SDK ?
To help you implement the SDK, we have created a demonstration environment. This will enable you to see the correct way of implementing event collection on the server-side :
Step 5
CONFIGURE YOUR DESTINATIONS AND ACTIVATE YOUR DATA :
Your set-up is now complete, and you can configure your first destinations.
YOU HAVE THE SEGMENTATION MODULE ?
Improve your ROI by activating your audiences on the best channel and improve the on-site and off-site user experience.
Download section :
Download the Flutter user guide :
Still have questions? Take a look at our FAQs :
SDKLast updated