Growth teams need to perform a lot of data analysis for their daily operations. For this analysis, they need the correct data access at the right time. MoEngage Open Analytics enables growth teams to access the latest data on the MoEngage platform in real time directly from the data storage. MoEngage allows customers to directly query the data warehouse and get desired data.
Capabilities of Open Analytics
MoEngage open analytics can help with -
- Read and Query data using SQL queries through a console or Programmatically via API
- Visualize the data on the Open Analytics console through in-build visualization methods available
Enable Open Analytics
MoEngage requires 2 sets of information to enable open analytics -
- Email ids of users
- The static IP address. (This can be your VPN IP as well. Make sure you provide the static IP, IPs provided by your network provider will not work)
All data received at the MoEngage system can be categorized into 3 kinds –
- Device data
- User Data
- Event data
The data is collected using the SDK and S2S events and processed and stored with events.
MoEngage processes and stores all the device attributes and event attributes in separate event tables for each event.
Table Name - account_name.event_name
|attribute 1||attribute 2||attribute 3||--||attribute n-1||attribute n|
The time window for analysis can be selected using the attribute - day. This partition time works for all tables. Must always use this in your queries to limit the costs.
SELECT server_time, COUNT(server_time) as metric FROM "account_name"."moe_app_opened_828" WHERE day >= '2022-01-01' GROUP BY 1 ORDER BY 1
Event Tables can be joined using common keys/attributes such as - user_id
SELECT user1 FROM (SELECT user_id AS user1 FROM "account_name"."uptete_spa") table1 INNER JOIN (SELECT user_id AS user2 FROM "account_name"."moe_user_merge") table2 ON table1.user1 = table2.user2
Event & Attribute Naming Convention
Event names have structure as ‘EventName_XXX’, for example - moe_app_opened_828
Event Attribute names have a structure as ‘Datatype_AttributeName_XXX’, for example - string_activity_name_880
User attributes are stored in the user table, and the table refreshes one time every day.
Table Name - users_base_table
Column for MoEngage generated User Id - user_id
|attribute 1||attribute 2||attribute ...||attribute n|
Important Attribute Information
(These attributes should be present in all of the events)
- day - Time-window for analysis can be selected using this attribute. This partition time works for all tables. This should be considered as the date attribute for Tables.
- server_time - UTC at which events reach MoEngage servers.
- user_id - This is a MoEngage-generated User Id.
- string_uid_125 - This is the User Id generated by your App/Site.
- original_event_name - Event Name
- user_time - Event time in the local time zone
Open analytics Usage Best Practices
- Use day in your queries to optimize query performance. Otherwise, MoEngage will scan the entire table, and scanning costs will be higher.
- MoEngage works on a columnar database, so you can use only the columns ( attributes ) you need for analysis. If unnecessary columns are used, cost increases, and query performance decreases.
To optimize queries, refer to best practices.
A general guide to writing Athena SQL queries -
Programmatic Access to Data
To read data using python or java code, Open Analytics makes APIs available to generate the report utilizing existing queries. For more information, refer to using APIs.
Reach out to us directly from your MoEngage Dashboard -> Need Help? -> Contact Support or send an email to firstname.lastname@example.org.