Preview function

Click to preview the test version deployed online

  • 1. Do not pressure test. Chrome is recommended.
  • 2, Currently [task management] socket connection is not concurrent (because I prefer…) If multiple people access at the same time may need to queue waiting, while this is provided preview;
  • 3. Accounts registered with the online preview version may be cleared later. Please use Docker to deploy them locally for official use.

preface

Existing products with umENG statistics.

The free version of Umigu statistics that each application can have a maximum of 500 valid custom events, after the maximum number of new events, you need to suspend some unused or discarded custom events. On the official website of UmENG, there is a “batch pause” operation, but its “batch pause” is separated from the “screening function”, so I can not screen some events that meet my own needs to suspend.

Secondly, sometimes when the product is revised, the function description may change, and the display name of the custom event needs to be modified. If you want to modify the display name of the custom event of UmONG, you need to search by ID and then modify one by one. If the change of custom events is too many or the number of changes is relatively frequent, then the mechanical operation is quite tedious. Although umeng official website has the function of batch uploading custom events, the existing custom event ID will not be updated, but is ignored, so if you want to update the display name, you still have to search one by one to update.

In addition, if the same products have more than one package name (s), the basic custom events are the same, as described above, if have the function & custom events almost consistent application application A, B, C, you need to back and forth mechanically operation for many times, this is really A time-consuming thing, once two times is good, but if the operation frequency is much, Every time I need to open the official website for some necessary and boring operations, there will always be some horses in the pentium in my heart.

So, for the above problems, I wish I had a tool to solve my pain points, so I used my strengths: Baidu & Google & CV kept inputting “UmENG Batch processing tool”, “UmENG customized event batch management”, “Umeng Assistant” and other keywords. After turning over several pages, they did not find the tool that met their needs, and felt a little disappointed. Then I thought, maybe I should write my own code to do this batch operation. So I spent a day analyzing the Umeng custom event manipulation API and wrote a Python script that basically met my needs:

  • 1. Read the UmENG custom event template file, update it if it exists, insert it if it does not exist;
  • 2. Cache the user-defined event list of UmENG to the local, suspend the operation according to the specified event screening, and realize the screening and batch suspension;
  • 3. Batch copy (synchronize) the custom event status of Application A to Application B and Application C.

For the rest of the time, I will execute this script directly to complete the corresponding operation. Himself is satisfied at the beginning, but number of operations is much, feeling is more complicated (people’s desire and demand always endless!), because sometimes their Allies on the other side of the cookie expires, have to open the project manual update file inside of configuration items, the other is the filter configuration items also have to modify the configuration files. So I thought, could I write my own web management page (since I’m mainly working on Android)? Combine oneself use habit to add a function incidentally again.

So I started developing web management pages. Named UMEM.

Technology selection

In the beginning, I thought of writing in Flask + HTML, mainly I used Flask to write some small API is relatively familiar (just familiar with simple applications, but not proficient). However, I chose Django + vue3 as the development scaffolding. It was my first contact with Django and Vue3. Since I just wanted to make a small tool, I could kill two birds with one stone by learning and doing it in my spare time. And there are many tutorials on Vue, ele. me’s Element-Plus (VUe3) interface controls also meet the needs of current development.

The development process

Since we’ve already implemented the basics with Python scripts, on the Web side, at first I just wanted to:

  • 1. More convenient operation, such as uploading custom event files, I want simple drag and drop;
  • 2. Perform user-defined tasks of UmENG and hope to see corresponding operation logs and progress in time;
  • 3, custom events have special screening conditions for easy retrieval;

All the above functions were solved one by one (through various searches & various CVS). In the subsequent development process, because the umU application needed to be operated still needed to manually enter the key, and the umU cookie had to be copied and pasted for update after expiration, I continued to add new requirements:

  • 1. You want to directly select an application to be operated from the existing umU application list instead of manually entering the application key.
  • 2. Umeng’s cookie can be updated with one click to reduce tedious copy-paste operations;

The first requirement point is easy to deal with, while the second requirement point is that I want to obtain cookies through program simulation request umU API, but that requires account password and verification code before login, so this solution is not very good. I happened to see some Google Browser plug-ins that could update cookies (some affiliated plug-ins that can batch update articles on various platforms), so I did a massive search and wrote a Google Browser plug-in that met my own needs. This plug-in could update cookie information of amu with one click. So there is a UMEM- UmENG login assistant one key update configuration, from manual copy and paste of the laborious shape. Click download plug-in

Later, considering the LAN deployment for multiple users, so added the login function.

With similar features developed, I packaged the application as a Docker image for one-click deployment to local or remote servers.

Run the Docker image

  • 1, create a local directory to mount the docker runtime log directory, database (this small tool database is currently using sqlite3)
mkdir -p ~/umem/log
mkdir -p ~/umem/db
Copy the code
  • Run docker (-e LANG= c.utf-8 is to solve the problem of python processing Chinese, where /home/samge/umem is the absolute path of the corresponding host, need to be replaced with the local directory created by you in the previous step) :
docker run -d \ -v /home/samge/umem/db:/app/db \ -v /home/samge/umem/log:/app/log \ -p 8000:8000 \ -p 9001:9001 \ --name  umem \ --pull=always \ --restart always \ -e LANG=C.UTF-8 \ samge/umem:v1Copy the code

access

UMEM access address: http://localhost:8000

Supervisor management page: http://localhost:9001/

Supervisor Account: admin Supervisor Password: adminCopy the code

Click preview of the test version deployed online (do not press, it is recommended to use Chrome browser, currently [Task Management] socket connection is not concurrent, if multiple people access at the same time may need to wait in line, and this is provided for preview, the registered account may be cleared later, try to use Docker deployed to local use)

use

  • 1. Register an account and log in
  • 2. Go to the Configuration Management page and configure cookies and other related information after umENG login. Here, you can use UMEM- UmENG Login Assistant to update configurations in one click
  • 3. On the Alliance Key page, select the alliance application that you want to operate
  • 4. After configuration, it can be tested/used

The screenshots

The last

At present, UMEM is only a small tool developed by myself, and there is no large-scale test. I have run it in Google Browser on my own computer and found no major problems for the time being, which meets my personal needs.

If you happen to have similar needs (umENG custom event batch processing), you want to test yourself before using it formally, and then use it formally after meeting your needs, it is always right to be cautious.

At the same time in the process of use if there are any comments or suggestions can be put forward in the issues of the project warehouse.