Method, device and equipment for adding burying points into small programs in batches and medium
By setting the enumeration value of buried point routes and public service programs in the applet, the mini program is able to add buried points in batches, solving the problem of complex code modification when the buried point requirements change, and improving efficiency and accuracy.
Patent Information
- Application Number
- CN202411546570.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-31
- Publication Date
- 2025-02-18
AI Technical Summary
In mini program development, when burying points requirements change, modifying existing mini program code may be more complicated and time-consuming, resulting in data redundancy, inaccuracy and difficulty in team collaboration.
The dynamic contrast decoding method based on conflict perception is adopted, and the buried point route enumeration value and buried point public service program are set to realize the batch addition of buried points in the applet. This method includes initializing the buried point program and the buried point program during the running of the applet, allowing the buried point to be quickly modified according to needs.
Simplifies the modification process of buried point code, reduces data redundancy and inaccuracy, improves team collaboration efficiency, and reduces the impact on user experience.
Smart Images

Figure CN119473859A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of program development technology, and in particular to a method, device, equipment and medium for adding embedding points to mini-programs in batches. Background Art
[0002] Mini Programs are lightweight applications that do not require downloading and installation. In order to analyze user behavior habits, engineers need to continuously add tracking points during the development process and upload user operation behavior data. In related technologies, adding tracking points to Mini Programs mainly relies on two parts: the tracking tool interface (API) and the Mini Program code, specifically using the tracking tool interface directly in the Mini Program code.
[0003] However, the main problems in related technologies include: once batch tracking is completed, if the tracking requirements change, especially in large projects, modifying the existing mini-program code may be complicated and time-consuming. Summary of the invention
[0004] The present invention provides a dynamic comparison decoding method, device, computer equipment and medium based on conflict perception to solve the technical problem that when the demand for burying points changes, modifying the existing burying point code may be complicated and time-consuming.
[0005] In a first aspect, a method for adding tracking points in batches to a mini program is provided, comprising:
[0006] Set the tracking route enumeration value and tracking public service class program, the tracking public service class program includes the initialization tracking program and the tracking program during the running of the mini program;
[0007] Call the initialization tracking point program in the tracking point public service class program to add the tracking point corresponding to the mini program initialization;
[0008] According to the embedding point route enumeration value, the embedding point program in the embedding point public service class program is called during the running of the mini-program, so that the embedding point public service class program adds embedding points during the running of the mini-program.
[0009] In a second aspect, a device for adding tracking points in batches to mini programs is provided, including:
[0010] A setting unit, used to set the embedding route enumeration value and the embedding public service class program, wherein the embedding public service class program includes the initialization embedding program and the embedding program during the running of the mini program;
[0011] A first calling unit is used to call the initialization tracking program in the tracking public service program to add a tracking point corresponding to the initialization of the mini program;
[0012] The second calling unit is used to call the burying point program in the mini-program running process in the burying point public service class program according to the burying point route enumeration value, so that the burying point public service class program adds burying points during the mini-program running process.
[0013] In a third aspect, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method for batch adding tracking points to mini-programs when executing the computer program.
[0014] In a fourth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for batch adding tracking points to the mini-program are implemented.
[0015] In the solution implemented by the method, device, computer equipment and storage medium for adding tracking points in batches based on mini programs,
[0016] Set the tracking route enumeration value and tracking public service class program, the tracking public service class program includes the initialization tracking program and the tracking program during the running of the mini program;
[0017] Call the initialization tracking point program in the tracking point public service class program to add the tracking point corresponding to the mini program initialization;
[0018] According to the burying point route enumeration value, the burying point program in the mini-program running process in the burying point public service class program is called to enable the burying point public service class program to add burying points during the running of the mini-program. In the present invention, the corresponding burying point route enumeration value can be set according to the burying point demand of the mini-program, and the burying point public service class program can be used to add burying points in the mini-program according to the burying point route enumeration value. The burying point public service class program is a public method class. When the burying point demand changes, it is only necessary to modify the burying point route enumeration value, so that the burying point can be modified relatively simply and quickly. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.
[0020] Figure 1 This is a schematic diagram of an application environment of a method for adding tracking points to mini programs in batches according to an embodiment of the present invention;
[0021] Figure 2This is a flowchart of a method for adding tracking points to mini programs in batches according to an embodiment of the present invention;
[0022] Figure 3 It is another flowchart of a method for adding tracking points in batches to mini programs in one embodiment of the present invention;
[0023] Figure 4 It is a structural diagram of a device for adding tracking points to mini-programs in batches in one embodiment of the present invention;
[0024] Figure 5 is a schematic diagram of a structure of a computer device in one embodiment of the present invention;
[0025] Figure 6 It is another structural schematic diagram of a computer device in one embodiment of the present invention. DETAILED DESCRIPTION
[0026] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0027] In order to analyze user behavior habits, engineers need to continuously add tracking points during the development process and upload user operation behavior data. In related technologies, adding tracking points to mini programs mainly depends on two parts: the tracking tool interface (API) and the mini program code, specifically using the tracking tool interface directly in the mini program code.
[0028] However, the main problems in related technologies include: once batch tracking is completed, if the tracking requirements change, especially in large projects, modifying the existing mini-program code may be complicated and time-consuming.
[0029] In addition to the above problems, the relevant technology also includes the following problems: data redundancy and confusion: batch tracking may lead to excessive data collection, especially when there is no clear standard for tracking events, which may cause redundant data and become confusing during analysis; data accuracy issues: if the implementation of each tracking event is not carefully reviewed during batch tracking, inaccurate data collection may result, which in turn affects subsequent data analysis and decision-making; team collaboration issues: if multiple teams are responsible for the addition and maintenance of tracking points at the same time, the tracking point standards may be inconsistent, resulting in data inconsistency; potential interference with user experience: when using the mini program with the tracking tool interface in the mini program code, if the implementation is improper, it may cause the application to freeze or crash, affecting the end-user experience.
[0030] The method for adding tracking points to mini programs in batches provided by the embodiment of the present invention can be applied to Figure 1 In the application environment, the client communicates with the server through the network. The server can set the point-burying route enumeration value and the point-burying public service class program, and the point-burying public service class program includes the initialization point-burying program and the point-burying program during the operation of the small program; call the initialization point-burying program in the point-burying public service class program to add the corresponding point-burying in the initialization of the small program; according to the point-burying route enumeration value, call the point-burying program during the operation of the small program in the point-burying public service class program, so that the point-burying public service class program adds the point-burying during the operation of the small program. The small program with added buried points can be sent to the client later. In the present invention, the corresponding point-burying route enumeration value can be set according to the point-burying demand of the small program, and the point-burying public service class program can be used according to the point-burying route enumeration value to realize adding buried points in the small program. The point-burying public service class program is a public method class. When the point-burying demand changes, it only needs to modify the point-burying route enumeration value, so that the buried point can be modified relatively simply and quickly.
[0031] The client may be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, and portable wearable devices. The server may be implemented by an independent server or a server cluster consisting of multiple servers. The present invention is described in detail below through specific embodiments.
[0032] See also Figure 2 As shown, Figure 2 A flow chart of a method for adding tracking points in batches to mini-programs provided in an embodiment of the present invention includes the following steps S100-S200.
[0033] S100, set the point-of-use routing enumeration value (RouterConsts) and the point-of-use public service class program (RouterService), wherein the point-of-use public service class program includes the initialization point-of-use program and the point-of-use program during the running of the mini-program. The point-of-use public service class program is a public method class in the computer field, which can avoid the direct use of the point-of-use tool interface in the mini-program code in the related technology.
[0034] In the embodiment of the present application, when setting the tracking route enumeration value, it is necessary to determine the tracking demand. From the perspective of the entire project, clarify the data to be collected. For example, determine the mini-program page for which data needs to be collected, interactive operations, and analysis of whether the mini-program page needs to stay for a long time. In this way, the redundancy and confusion of data collected in related technologies can be avoided, which affects the subsequent analysis of user behavior habits. It should be noted that when collecting data, attention should be paid to data desensitization, compliance self-inspection, and transparent privacy agreement statements to avoid collecting sensitive data that violates privacy regulations, ensure consistency at the demand level from the source, and facilitate subsequent data analysis. It is necessary to ensure that the data is obtained with the user's consent.
[0035] In some embodiments, the embedding point routing enumeration value includes a preset page route (router) and a preset operation event identifier (eventId) corresponding to the preset page route. Multiple embedding points may be required on a mini-program page, so there may be multiple preset operation event identifiers corresponding to the preset page route. In addition, it also includes the preset page information (routerName) corresponding to the preset page route, and the preset operation event remark information corresponding to the preset operation event identifier.
[0036] In the embodiment of the present application, the page route (router) is the detailed path of the mini-program page. Specifically, when entering the mini-program page, the routing stack information can be obtained by the method of obtaining the current page (getCurrentPages), and the top of the routing stack information is the page route. The preset page route is a page route pre-set according to the point-burying requirements, that is, a pre-determined mini-program page that needs to be buried.
[0037] The operation event identifier is a unique value corresponding to the operation event, which helps to make the tracking data more intuitive and understand the specific user behavior corresponding to the tracking data. Operation events include button clicks, text clicks, image clicks, registering user basic information, deregistering user basic information, entering and leaving the mini program page, saving images, etc.
[0038] In the embodiment of the present application, the tracking route enumeration value is pre-set, so that the mini-program page where tracking is performed and the corresponding tracking requirements can be intuitively understood, such as entering the mini-program page, leaving the mini-program page, registering user basic information, deregistering user basic information, clicking a button, saving a picture, etc.
[0039] The preset page information corresponding to the preset page route is the detailed page name information of the preset page route, which helps to make the buried data more intuitive and determine the detailed page name information generated by the buried data.
[0040] In addition, when setting the preset page information and preset operation event remark information in the tracking route enumeration value, the tracking standard can be formulated. Specifically, the text can be unified from the perspective of words, so that the staff can accurately understand the corresponding tracking requirements when they check the tracking route enumeration value again in the future. This can avoid the problem of difficult team collaboration in related technologies.
[0041] In the embodiment of the present application, in order to avoid directly calling the tracking tool interface (API) in the mini-program code, a tracking public service program is designed, which can centrally manage the tracking in the mini-program as quickly as possible.
[0042] In some embodiments, the public service program of the tracking point includes the initialization tracking point program (onInit) and the tracking point program during the operation of the mini program. The tracking point program during the operation of the mini program includes the entry page program (onPagesShow), the exit page program (onPageHide), the registration / cancellation user basic information program (onLogin), and the program corresponding to the target operation (onEvent), wherein the registration / cancellation user basic information program (onLogin) selects to use login (register user basic information) or logout (cancel user basic information) according to the user information.
[0043] In the embodiment of the present application, all the burying point programs included in the burying point public service class program can correspond to the programs in the burying point tool interface. Specifically, when using the burying point public service class program, the corresponding program in the burying point tool interface is called to complete the purpose of adding the burying point.
[0044] Specifically, the initialization program (oninit) in the public service program corresponds to the initialization program (init) in the interface. The entry page program (onPageShow) in the program during the running of the mini program corresponds to the entry page program (pageShow) in the interface. The exit page program (onPageHide) in the program during the running of the mini program corresponds to the exit page program (pageHide) in the interface. The registration / logout of user basic information (onLogin) in the program during the running of the mini program integrates the registration user basic information program (Login) and the logout user basic information program (logout) in the interface. The program corresponding to the target operation (onevent) in the program during the running of the mini program corresponds to the program corresponding to the target operation in the interface (onevent).
[0045] It should be noted that the programs in the tracking tool interface are existing technologies and will not be described in detail here. The function of the programs in the tracking tool interface is to track points.
[0046] S200. Call the initialization tracking point in the tracking point public service class program to add the corresponding tracking point in the mini program initialization.
[0047] In the embodiment of the present application, the mini program will call the initialization tracking program in the tracking public service program in the onLaunch (initialization state) state. When the initialization tracking program in the tracking public service program is executed, it will call the initialization program in the interface, and use the initialization program in the interface to add tracking points when the mini program is initialized. In this way, when the user actually uses the mini program, when the mini program is in the initialization state, the tracking data corresponding to the mini program initialization is sent to the mini program.
[0048] S300. According to the embedding route enumeration value, call the embedding program in the embedding public service class program during the running of the mini-program, so that the embedding public service class program adds embedding points during the running of the mini-program.
[0049] In the embodiment of the present application, all tracking point requirements can be completed through a unified entrance and exit, that is, a tracking point public service program. According to the tracking point requirements of the mini program, the corresponding tracking point route enumeration value is set, and the tracking point public service program is used to add tracking points to the mini program. In this way, when the tracking point requirements change, only the tracking point route enumeration value needs to be modified, and the tracking point can be modified relatively simply and quickly.
[0050] In some embodiments, Figure 3 This is another flowchart of a method for adding tracking points in batches to mini programs in one embodiment of the present invention.
[0051] The embedding point route enumeration value includes a preset page route and a preset operation event identifier corresponding to the preset page route; the step of calling the embedding point program during the operation of the mini program in the embedding point public service class program according to the embedding point route enumeration value includes:
[0052] S301. Obtain the page route corresponding to the mini program page.
[0053] In the embodiment of the present application, since the tracking requirements of different mini-program pages are different, before tracking, it is necessary to determine the current mini-program page, that is, to obtain the page route corresponding to the mini-program page. The specific acquisition method has been described in detail above and will not be repeated here. It should be noted that in the process of tracking the mini-program, the mini-program page is transformed. For each mini-program page after the transformation, the corresponding page route needs to be obtained, so that the tracking of all mini-program pages in the mini-program can be completed.
[0054] S302: Determine whether the page route is the same as the preset page route. This step can be understood as whether the current mini program page is a mini program page with a embedding requirement.
[0055] S303: If they are the same, calling the tracking program during the running of the mini program according to the preset operation event identifier corresponding to the preset page route, so that the tracking program during the running of the mini program calls the tracking program in the tracking tool interface.
[0056] In an embodiment of the present application, the preset page route is determined according to the tracking point requirements. When the page route corresponding to the acquired mini-program page is the preset page route, the tracking point program is called during the running of the mini-program. During the running of the mini-program, the tracking point program calls the corresponding program in the interface, so that the corresponding program in the interface adds the tracking point according to the preset operation event identifier.
[0057] S304: If they are not the same, the embedded program during the running of the mini program is not called.
[0058] In some embodiments, the step of calling the tracking program during the running of the mini program according to the preset operation event identifier corresponding to the preset page route includes:
[0059] If the preset operation event identifier corresponding to the preset page route is an identifier corresponding to entering the mini program, the entry page program in the tracking program during the mini program operation is called when the mini program page is in the foreground, so that the entry page program in the tracking program during the mini program operation calls the entry page program in the tracking tool interface. In this way, a tracking point can be added when the mini program page is in the foreground.
[0060] By tracking the information when the mini program page is in the foreground, the information of entering the mini program page can be determined. For example, the information of entering the mini program page is the first time.
[0061] In some embodiments, the user's stay time on the mini-program page can be determined through the information of entering the mini-program page and leaving the mini-program page, and the stay time is sent up as the buried data so as to analyze the user's stay time on the mini-program page later. The information of leaving the mini-program page can be determined according to the leaving page program in the buried program during the running of the mini-program, which is described in detail below.
[0062] In some embodiments, the step of calling the tracking program during the running of the mini program according to the preset operation event identifier corresponding to the preset page route includes:
[0063] If the preset operation event identifier corresponding to the preset page route is an identifier corresponding to leaving the mini program, the leaving page program in the tracking program during the running of the mini program is called when the mini program page changes from the foreground to the background, so that the leaving page program in the tracking program during the running of the mini program calls the leaving page program in the tracking tool interface. In this way, a tracking point can be added when the mini program page changes from the foreground to the background.
[0064] The information of leaving the mini program page can be determined by the buried point when the mini program page changes from the foreground to the background. Exemplarily, the information of leaving the mini program page is the second time. The user's stay time on the mini program page can be determined by the first time and the second time above.
[0065] In some embodiments, calling the entry page program and the exit page program in the embedding program during the running of the mini program are both completed by calling the page extension content module.
[0066] In some embodiments, the step of calling the tracking program during the running of the mini program according to the preset operation event identifier corresponding to the preset page route includes:
[0067] If the preset operation event identifier corresponding to the preset page route is the identifier corresponding to the target operation event, the program corresponding to the target operation in the tracking program during the running of the mini program is called, so that the program corresponding to the target operation in the tracking program during the running of the mini program calls the program corresponding to the target operation in the tracking tool interface.
[0068] The target operations include button clicks, text clicks, image clicks, and image saving, etc. During the running of the mini program, the program corresponding to the target operation in the tracking program integrates the operation event identifiers corresponding to all target operations on the current mini program page, and calls the program corresponding to the target operation in the tracking tool interface. The program corresponding to the target operation in the tracking tool interface uses the operation event identifiers corresponding to all target operations to track on the mini program page.
[0069] In some embodiments, the embedding program in the component described in the embedding public service program can be used during the operation of the mini-program.
[0070] In the embodiment of the present application, according to the life cycle of the mini program, it is necessary to call the initialization embedding program in the embedding public service class program during initialization (mini program: onLaunch). After that, entering the mini program page (Page: onShow) calls the entry page program in the embedding program during the operation of the mini program, or it may directly trigger the user information login. At this time, the registration / cancellation of user basic information program (onLogin) in the embedding program during the operation of the mini program is called. During the stay of the mini program page, there may also be embedding data corresponding to the target operation that needs to be sent up. At this time, the program corresponding to the target operation in the embedding program during the operation of the mini program is called (onEvent). Leaving the mini program page (Page: onHide) calls the leaving page program (onPageHide) in the embedding program during the operation of the mini program. At this time, it may also trigger the cancellation of user basic information. At this time, the registration / cancellation of user basic information program (onLogin) in the embedding program during the operation of the mini program is called.
[0071] Through the above steps, the technical problems involved in the relevant technologies can be avoided. In addition, according to the tracking requirements of the mini program, the corresponding tracking route enumeration value can be set, and the tracking public service class program can be used according to the tracking route enumeration value to add tracking points in the mini program. The tracking public service class program is a public method class. When the tracking requirements change, you only need to modify the tracking route enumeration value, so that the tracking can be modified relatively simply and quickly.
[0072] In some embodiments, the embedding point public service class program also includes a capture exception program (trycatch capture exception program); the method also includes:
[0073] When receiving an instruction of a user interactive operation on the mini program, calling the exception capture program to determine whether the buried point data is received;
[0074] If the buried point data is received, it is determined that the buried point data is successfully uploaded, which can avoid the data accuracy problem mentioned in the related art.
[0075] In the embodiment of the present application, during the test phase, a user interaction operation that can generate buried point data is selected. The user performs the user interaction operation on the mini program page. If the buried point is successful, the buried point data can be sent up, and then the abnormal program can be captured to determine that the buried point data is successfully sent up.
[0076] If the tracking data is not received, it is determined that the tracking data has not been successfully sent. In this way, the tracking can be re-performed to avoid affecting the acquisition of tracking data when the user actually uses the Mini Program. In addition, it can avoid the Mini Program from freezing or crashing due to improper use of the tracking tool interface in the Mini Program code, which ultimately affects the user experience.
[0077] In some embodiments, if the buried point data is not received, the abnormal information can also be printed to facilitate engineers to find the problem later.
[0078] In some embodiments, the method further includes: when burial point data is generated, uploading the burial point data in an asynchronous processing manner.
[0079] In the embodiment of the present application, in order to avoid blocking other interactive behaviors, an asynchronous processing method is adopted in sending the buried data. In the asynchronous processing, other interactive tasks can be continued without waiting for the completion of sending the buried data here.
[0080] In some embodiments, the method further comprises:
[0081] Track and analyze the performance of the mini program when uploading tracking data.
[0082] In the embodiment of the present application, during the testing phase, in order to avoid involving tracking technology and causing other performance of the mini program to be affected, the performance of the mini program can be tracked and analyzed when the tracking data is uploaded. If the performance of the mini program is not affected, the user can continue to use the mini program. If the performance of the mini program is affected, the engineer can repair it.
[0083] In some embodiments, the method further comprises:
[0084] Detect the remaining bandwidth of the network;
[0085] If the remaining bandwidth of the network is not greater than the preset bandwidth, the buried point data will be stored;
[0086] If the remaining bandwidth of the network is greater than the preset bandwidth, the stored tracking data is sent to the upstream.
[0087] In an embodiment of the present application, in order to avoid the impact of sending the burying point data on the performance of the mini program, the burying point data can be sent when the remaining bandwidth is greater than the preset bandwidth to ensure that the impact of the burying point on the performance of the mini program is minimized.
[0088] In some embodiments, after the mini program is launched, it is necessary to regularly test the tracking points, monitor and analyze and provide feedback. After the tracking points are launched, pay attention to online data in a timely manner to ensure the coverage of key paths and functions, analyze user behavior to formulate subsequent tracking point optimization and iteration plans, and also provide feedback to the business to adjust and determine subsequent product strategies.
[0089] In the embodiments of the present application, according to the optimization and modification of the tracking points, prior design and advance planning can ensure the coverage of the key function paths, avoid privacy compliance issues, avoid excessive data collection, and reduce redundant data; in-process management, unified tracking point public method class, consistent tracking point implementation scheme, avoid inaccurate data collection due to personal code reasons, reduce redundant code, ensure the uniformity of rule standards, facilitate multiple teams to add and maintain at the same time, and reduce the learning cost of subsequent developers to take over, thereby reducing maintenance costs; post-analysis and timely feedback can effectively reduce user experience problems caused by the tracking points of the mini program, avoid missing important data or collecting inaccurate data, and can analyze user operation behavior habits based on data to help determine subsequent business product planning.
[0090] It can be seen that in the above scheme, the corresponding tracking point route enumeration value can be set according to the tracking point requirements of the mini program, and the tracking point public service class program can be used according to the tracking point route enumeration value to add tracking points in the mini program. The tracking point public service class program is a public method class. When the tracking point requirements change, you only need to modify the tracking point route enumeration value, and you can modify the tracking point relatively simply and quickly.
[0091] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.
[0092] In one embodiment, a device for adding tracking points in batches to mini programs is provided, and the device for adding tracking points in batches to mini programs corresponds one-to-one to the method for adding tracking points in batches to mini programs in the above embodiment. Figure 4 As shown, the applet adds tracking devices in batches, including:
[0093] The setting unit 401 is used to set the embedding route enumeration value and the embedding public service class program, wherein the embedding public service class program includes the initialization embedding program and the embedding program during the running of the mini program;
[0094] The first calling unit 402 is used to call the initialization tracking program in the tracking public service program to add the tracking corresponding to the mini program initialization;
[0095] The second calling unit 403 is used to call the burying point program in the mini-program running process in the burying point public service class program according to the burying point route enumeration value, so that the burying point public service class program adds burying points during the mini-program running process.
[0096] In some embodiments, the embedding point route enumeration value includes a preset page route and a preset operation event identifier corresponding to the preset page route; the second calling unit includes:
[0097] An acquisition unit, used to acquire the page route corresponding to the mini program page;
[0098] A judging unit, used for judging whether the page route is the same as the preset page route;
[0099] The fourth calling unit is used to call the tracking program during the running of the mini program according to the preset operation event identifier corresponding to the preset page route if they are the same, so that the tracking program during the running of the mini program calls the tracking program in the tracking tool interface.
[0100] In some embodiments, the fourth calling unit includes:
[0101] The fifth calling unit is used to call the entry page program in the burying program during the running of the mini-program if the preset operation event identifier corresponding to the preset page route is the identifier corresponding to entering the mini-program when the mini-program page is in the foreground, so that the entry page program in the burying program during the running of the mini-program calls the entry page program in the burying tool interface.
[0102] In some embodiments, the fourth calling unit includes:
[0103] The sixth calling unit is used to call the leaving page program in the burying program during the running of the mini-program if the preset operation event identifier corresponding to the preset page route is an identifier corresponding to leaving the mini-program when the mini-program page changes from the foreground to the background, so that the leaving page program in the burying program during the running of the mini-program calls the leaving page program in the burying tool interface.
[0104] In some embodiments, the fourth calling unit includes:
[0105] The seventh calling unit is used to call the program corresponding to the target operation in the tracking program during the running of the mini program if the preset operation event identifier corresponding to the preset page route is the identifier corresponding to the target operation event, so that the program corresponding to the target operation in the tracking program during the running of the mini program calls the program corresponding to the target operation in the tracking tool interface.
[0106] In some embodiments, the public service program of the embedding point further includes a program for capturing exceptions; and the device further includes:
[0107] An eighth calling unit, configured to, when receiving an instruction of a user interactive operation on the mini program, call the exception capture program to determine whether buried point data is received;
[0108] The determination unit is used to determine whether the buried point data is successfully sent if the buried point data is received.
[0109] In some embodiments, the apparatus further comprises:
[0110] The sending unit is used to send the buried point data in an asynchronous processing manner when the buried point data is generated.
[0111] The present invention provides a device for adding burying points in batches to mini-programs. The device can set corresponding burying point route enumeration values according to the burying point requirements of the mini-programs, and use a burying point public service class program to add burying points in the mini-programs according to the burying point route enumeration values. The burying point public service class program is a public method class. When the burying point requirements change, it only needs to modify the burying point route enumeration value, so that the burying points can be modified relatively simply and quickly.
[0112] For the specific limitations of the device for batch adding tracking points to mini programs, please refer to the limitations of the method for batch adding tracking points to mini programs above, which will not be repeated here. The various modules in the above-mentioned device for batch adding tracking points based on mini programs can be implemented in whole or in part through software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0113] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 5 As shown. The computer device includes a processor, a memory, a network interface and a database connected via a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile and / or volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external client through a network connection. When the computer program is executed by the processor, it implements a function or step on the server side based on a method for adding tracking points in batches of mini programs.
[0114] In one embodiment, a computer device is provided. The computer device may be a client, and its internal structure diagram may be as follows: Figure 6As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected via a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external server via a network connection. When the computer program is executed by the processor, it implements a function or step on the client side of a method for adding tracking points in batches based on mini programs
[0115] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program:
[0116] Set the tracking route enumeration value and tracking public service class program, the tracking public service class program includes the initialization tracking program and the tracking program during the running of the mini program;
[0117] Call the initialization tracking point program in the tracking point public service class program to add the tracking point corresponding to the mini program initialization;
[0118] According to the embedding point route enumeration value, the embedding point program in the embedding point public service class program is called during the running of the mini-program, so that the embedding point public service class program adds embedding points during the running of the mini-program.
[0119] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0120] Set the tracking route enumeration value and tracking public service class program, the tracking public service class program includes the initialization tracking program and the tracking program during the running of the mini program;
[0121] Call the initialization tracking point program in the tracking point public service class program to add the tracking point corresponding to the mini program initialization;
[0122] According to the embedding point route enumeration value, the embedding point program in the embedding point public service class program is called during the running of the mini-program, so that the embedding point public service class program adds embedding points during the running of the mini-program.
[0123] It should be noted that the above functions or steps that can be implemented by the computer-readable storage medium or computer device can refer to the relevant descriptions on the server side and the client side in the aforementioned method embodiment. To avoid repetition, they will not be described one by one here.
[0124] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0125] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0126] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.
Claims
1. A method for adding embedding points to mini programs in batches, characterized in that: include: Set the tracking route enumeration value and tracking public service class program, the tracking public service class program includes the initialization tracking program and the tracking program during the running of the mini program; Call the initialization tracking point program in the tracking point public service class program to add the tracking point corresponding to the mini program initialization; According to the embedding point route enumeration value, the embedding point program in the embedding point public service class program is called during the running of the mini-program, so that the embedding point public service class program adds embedding points during the running of the mini-program.
2. The method according to claim 1, characterized in that: The embedding point route enumeration value includes a preset page route and a preset operation event identifier corresponding to the preset page route; The step of calling the tracking program in the running process of the mini program in the tracking public service class program according to the tracking route enumeration value includes: Get the page route corresponding to the mini program page; Determining whether the page route is the same as the preset page route; If they are the same, the tracking program during the running of the mini program is called according to the preset operation event identifier corresponding to the preset page route, so that the tracking program during the running of the mini program calls the tracking program in the tracking tool interface.
3. The method according to claim 2, characterized in that The step of calling the tracking program during the running of the mini program according to the preset operation event identifier corresponding to the preset page route also includes: If the preset operation event identifier corresponding to the preset page route is the identifier corresponding to entering the mini program, the entry page program in the burying program during the running of the mini program is called when the mini program page is in the foreground, so that the entry page program in the burying program during the running of the mini program calls the entry page program in the burying tool interface.
4. The method according to claim 2, characterized in that: The step of calling the tracking program during the running of the mini program according to the preset operation event identifier corresponding to the preset page route includes: If the preset operation event identifier corresponding to the preset page route is the identifier corresponding to leaving the mini program, the leaving page program in the burying program during the running of the mini program is called when the mini program page changes from the foreground to the background, so that the leaving page program in the burying program during the running of the mini program calls the leaving page program in the burying tool interface.
5. The method according to claim 2, characterized in that: The step of calling the tracking program during the running of the mini program according to the preset operation event identifier corresponding to the preset page route includes: If the preset operation event identifier corresponding to the preset page route is the identifier corresponding to the target operation event, the program corresponding to the target operation in the tracking program during the running of the mini program is called, so that the program corresponding to the target operation in the tracking program during the running of the mini program calls the program corresponding to the target operation in the tracking tool interface.
6. The method according to claim 1, characterized in that The public service program of the buried point also includes a program for capturing exceptions; the method also includes: When receiving an instruction of a user interactive operation on the mini program, calling the exception capture program to determine whether the buried point data is received; If the buried point data is received, it is determined that the buried point data is successfully uploaded.
7. The method according to claim 1, characterized in that Also includes: When the buried point data is generated, the buried point data is sent up in an asynchronous processing manner.
8. A device for adding tracking points in batches to mini programs, characterized in that: include: A setting unit, used to set the embedding route enumeration value and the embedding public service class program, wherein the embedding public service class program includes the initialization embedding program and the embedding program during the running of the mini program; A first calling unit is used to call the initialization tracking program in the tracking public service program to add a tracking point corresponding to the initialization of the mini program; The second calling unit is used to call the burying point program in the mini-program running process in the burying point public service class program according to the burying point route enumeration value, so that the burying point public service class program adds burying points during the mini-program running process.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method for batch adding tracking points to mini-programs as described in any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method for batch adding tracking points to mini-programs as described in any one of claims 1 to 7 are implemented.