Point burying method and device, electronic equipment and storage medium

By obtaining and associating the burying identifier of the target page object, efficient burying of Internet page events is achieved, solving the problems of code burying complexity and intrusiveness in the existing technology, and improving development efficiency and flexibility.

CN118568367APending Publication Date: 2024-08-30ZHUHAI KINGSOFT OFFICE SOFTWARE +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310191209.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-02-28
Publication Date
2024-08-30

AI Technical Summary

Technical Problem

In the existing technology, when counting Internet page events through code embedding, it is necessary to add corresponding code for each event. The workload is large and complex, intruding into business logic and affecting development efficiency.

Method used

By obtaining the target page object collection, determine the page elements carrying the burying mark, and use these marks to associate corresponding events to achieve declarative burying, reducing code intrusion and complexity.

Benefits of technology

It reduces the complexity and workload of the burying process, avoids code intrusion into specific business logic, and improves development efficiency and burying flexibility.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118568367A
    Figure CN118568367A
Patent Text Reader

Abstract

The embodiment of the invention provides a point burying method and device, electronic equipment and a storage medium, and the method comprises the steps: obtaining a target page object set, and for any target page object in the target page object set, determining a target page element which is contained in the target page object and carries a target page element burying point identifier; determining a target page element event set for the target page element through the target page element burying point identifier; and associating the target page element event with the target page element to realize point burying of the target page element. In this way, the target page element event is associated with the target page element, point burying of the target page element can be achieved, compared with code point burying, the workload is reduced, specific business logic cannot be invaded, and the complexity of the point burying process can be reduced to a certain degree.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a method, device, electronic device and storage medium for burying points. Background Art

[0002] With the development of information technology, the Internet has been widely used. In order to improve the user experience, the user's use of Internet pages can be counted to optimize page performance.

[0003] In the related art, events that need to be counted are usually collected through code tracking. Corresponding code needs to be added for each event that needs to be counted, which causes a huge workload and makes the tracking process very complicated. Summary of the invention

[0004] In order to solve the above technical problem that when collecting events that need to be counted through code tracking, corresponding codes need to be added for each event that needs to be counted, the workload is extremely large, and the tracking process is very complicated, the embodiment of the present invention provides a tracking method, device, electronic device and storage medium. The specific technical solution is as follows:

[0005] In a first aspect of an embodiment of the present invention, a method for burying points is first provided, the method comprising:

[0006] Obtain a target page object set, and for any target page object in the target page object set, determine a target page element that carries a target page element embedding identifier and is contained in the target page object;

[0007] Determine the target page element event set for the target page element through the target page element embedding identifier;

[0008] The target page element event is associated with the target page element to implement tracking of the target page element.

[0009] In an optional implementation, determining the target page element contained in the target page object and carrying the target page element embedding identifier includes:

[0010] Traversing the document page object model tree of the target page object to obtain all page elements contained in the target page object;

[0011] All the page elements are traversed in a loop, and the target page element that carries the target page element embedding identifier and is contained in the target page object is determined through the custom attribute declaration on the page element.

[0012] In an optional implementation, determining the target page element event set for the target page element through the target page element embedding identifier includes:

[0013] Get the page element association table;

[0014] Determine the target page element event type corresponding to the target page element embedding point identifier through the page element association corresponding table, and determine the page element event corresponding to the target page element event type;

[0015] The page element event is determined as a target page element event set for the target page element.

[0016] In an optional implementation, the page element embedding configuration is specifically obtained in the following manner:

[0017] In response to a user's new page creation operation, displaying a new page creation dialog box, wherein the new page creation dialog box is used to configure the page;

[0018] In response to a page entry operation of the user in the page creation dialog box, obtaining a page configuration entered by the user, wherein the page configuration at least includes a page identifier;

[0019] In response to the user's module creation operation, a module creation dialog box is displayed, wherein the module creation dialog box is used to configure the module in the page;

[0020] In response to a module entry operation by a user in the module creation dialog box, obtaining a module configuration entered by the user, wherein the module configuration at least includes a module identifier;

[0021] In response to the user's new page element operation, a new page element dialog box is displayed, where the new page element dialog box is used to configure the page elements in the module;

[0022] In response to a page element entry operation by a user in the page element creation dialog box, obtaining a page element configuration entered by the user, wherein the page element configuration at least includes a page element identifier;

[0023] In response to a user's page element event creation operation, a page element event creation dialog box is displayed, wherein the page element event creation dialog box is used to configure an event of the page element;

[0024] In response to a page element event entry operation by a user in the page element event creation dialog box, obtaining a page element event configuration entered by the user, wherein the page element event configuration includes at least a page element event custom attribute and a page element event type;

[0025] The page element embedding configuration is composed of the page configuration, the module configuration, the page element configuration and the page element event configuration.

[0026] In an optional embodiment, the method further comprises:

[0027] When a jump to a target page is detected, determining whether the target page carries a target page embedding identifier;

[0028] In the case where the target page carries the target page embedding identifier, determining a target page event set for the target page through the target page embedding identifier;

[0029] The target page event is associated with the target page to implement embedding of the target page.

[0030] In an optional implementation, the determining whether the target page carries a target page embedding identifier includes:

[0031] Obtaining the correspondence between the preset address path identifier and the page embedding identifier, as well as the target address path identifier of the target page;

[0032] According to the corresponding relationship, searching for the target page embedding point identifier corresponding to the target address path identifier;

[0033] In the case where a target page embedding identifier corresponding to the target address path identifier is found, determining that the target page carries the target page embedding identifier;

[0034] When the target page burying point identifier corresponding to the target address path identifier is not found, it is determined that the target page does not carry the target page burying point identifier.

[0035] In an optional implementation, determining the target page event set for the target page through the target page embedding identifier includes:

[0036] Obtain a page association correspondence table, wherein the page association correspondence table records a third correspondence between a page embedding point identifier and a page event type, and a fourth correspondence between a page event type and a page event custom attribute;

[0037] Determine the target page event type corresponding to the target page embedding identifier through the page association correspondence table;

[0038] A page event corresponding to the target page event type is searched, and the page event is determined as a target page event set for the target page.

[0039] In an optional implementation, before executing the tracking method, the method further includes:

[0040] Obtaining a data page embedding configuration, wherein the data page embedding configuration includes embedding configurations of multiple data pages;

[0041] For any of the tracking configurations of the data page, set the triggering timing of the event in the tracking configuration of the data page.

[0042] In an optional implementation, after obtaining the data page embedding configuration, when the data page is a page element, the method further includes:

[0043] For any of the page element embedding configurations, a first correspondence between the page element embedding identifier of the page element and the page element event type in the page element embedding configuration is established; wherein the page element embedding identifier of the page element is set by the page element embedding configuration;

[0044] Establishing a second correspondence between the page element event type in the embedding configuration of the page element and the page element event custom attribute;

[0045] Configuring the first corresponding relationship and the second corresponding relationship into a page element association correspondence table;

[0046] In the case where the data page is a page, the method further includes:

[0047] For any of the page embedding configurations, a third correspondence between the page embedding identifier of the page and the page event type in the page embedding configuration is established; wherein the page embedding identifier of the page is set by the page embedding configuration;

[0048] Establishing a fourth correspondence between the page event type in the embedding configuration of the page and the page event custom attribute;

[0049] The third correspondence and the fourth correspondence are configured into a page association correspondence table. In an optional implementation, after associating the target page element event with the target page element, the method further includes:

[0050] When the target page element event is triggered, searching the target page element event custom attribute corresponding to the target page element event type through the page element association correspondence table;

[0051] Acquire the page element dynamic parameters generated by the triggering of the target page element event, and fill the page element dynamic parameters as the page element attribute values ​​of the target page element event custom attributes;

[0052] Verify the page element attribute value, and report the target page element event custom attribute and the page element attribute value; or,

[0053] After associating the target page event with the target page, the method further includes:

[0054] When the target page event is triggered, searching the target page event custom attribute corresponding to the target page event type through the page association corresponding table;

[0055] Acquire page dynamic parameters generated by the target page event triggering, and fill the page dynamic parameters as page attribute values ​​of the target page event custom attributes;

[0056] The page attribute value is verified, and the target page event custom attribute and the page attribute value are reported.

[0057] In an optional implementation, the page embedding configuration is obtained in the following manner:

[0058] In response to a user's new page creation operation, displaying a new page creation dialog box, wherein the new page creation dialog box is used to configure the page;

[0059] In response to a page entry operation of the user in the page creation dialog box, obtaining a page configuration entered by the user, wherein the page configuration at least includes a page identifier;

[0060] In response to the user's page event creation operation, a page event creation dialog box is displayed, wherein the page event creation dialog box is used to configure the page event;

[0061] In response to a page event entry operation by a user in the page event creation dialog box, obtaining a page event configuration entered by the user, wherein the page event configuration includes at least a page event custom attribute and a page event type;

[0062] The page element embedding configuration is composed of the page configuration and the page element event configuration.

[0063] In a second aspect of an embodiment of the present invention, a point embedding device is further provided, the device comprising:

[0064] A collection acquisition module is used to acquire a target page object collection;

[0065] An element determination module, for determining, for any target page object in the target page object set, a target page element contained in the target page object and carrying a target page element embedding identifier;

[0066] An event determination module, used to determine a target page element event set for the target page element through the target page element embedding identifier;

[0067] The event and element association module is used to associate the target page element event with the target page element to implement the embedding of the target page element.

[0068] In an optional implementation, the element determination module is specifically used to:

[0069] Traversing the document page object model tree of the target page object to obtain all page elements contained in the target page object;

[0070] All the page elements are traversed in a loop, and the target page element that carries the target page element embedding identifier and is contained in the target page object is determined through the custom attribute declaration on the page element.

[0071] In an optional implementation, the event determination module is specifically configured to:

[0072] Get the page element association table;

[0073] Determine the target page element event type corresponding to the target page element embedding point identifier through the page element association corresponding table, and determine the page element event corresponding to the target page element event type;

[0074] The page element event is determined as a target page element event set for the target page element.

[0075] In an optional implementation, the page element embedding configuration is specifically obtained in the following manner:

[0076] In response to a user's new page creation operation, displaying a new page creation dialog box, wherein the new page creation dialog box is used to configure the page;

[0077] In response to a page entry operation of the user in the page creation dialog box, obtaining a page configuration entered by the user, wherein the page configuration at least includes a page identifier;

[0078] In response to the user's module creation operation, a module creation dialog box is displayed, wherein the module creation dialog box is used to configure the module in the page;

[0079] In response to a module entry operation by a user in the module creation dialog box, obtaining a module configuration entered by the user, wherein the module configuration at least includes a module identifier;

[0080] In response to the user's new page element operation, a new page element dialog box is displayed, where the new page element dialog box is used to configure the page elements in the module;

[0081] In response to a page element entry operation by a user in the page element creation dialog box, obtaining a page element configuration entered by the user, wherein the page element configuration at least includes a page element identifier;

[0082] In response to a user's page element event creation operation, a page element event creation dialog box is displayed, wherein the page element event creation dialog box is used to configure an event of the page element;

[0083] In response to a page element event entry operation by a user in the page element event creation dialog box, obtaining a page element event configuration entered by the user, wherein the page element event configuration includes at least a page element event custom attribute and a page element event type;

[0084] The page element embedding configuration is composed of the page configuration, the module configuration, the page element configuration and the page element event configuration.

[0085] In an optional embodiment, the device further comprises:

[0086] A tracking point identification judgment module is used to judge whether the target page carries a target page tracking point identification when a jump of the target page is detected;

[0087] A target page event determination module, configured to determine a target page event set for the target page by using the target page embedding identifier when the target page carries the target page embedding identifier;

[0088] The page tracking module is used to associate the target page event with the target page to implement tracking of the target page.

[0089] In an optional implementation, the embedding point identification judgment module is specifically used to:

[0090] Obtaining the correspondence between the preset address path identifier and the page embedding identifier, as well as the target address path identifier of the target page;

[0091] According to the corresponding relationship, searching for the target page embedding point identifier corresponding to the target address path identifier;

[0092] In the case where a target page embedding identifier corresponding to the target address path identifier is found, determining that the target page carries the target page embedding identifier;

[0093] When the target page burying point identifier corresponding to the target address path identifier is not found, it is determined that the target page does not carry the target page burying point identifier.

[0094] In an optional implementation, the target page event determination module is specifically used to:

[0095] Obtain a page association correspondence table, wherein the page association correspondence table records a third correspondence between a page embedding point identifier and a page event type, and a fourth correspondence between a page event type and a page event custom attribute;

[0096] Determine the target page event type corresponding to the target page embedding identifier through the page association correspondence table;

[0097] A page event corresponding to the target page event type is searched, and the page event is determined as a target page event set for the target page.

[0098] In an optional embodiment, the device further comprises:

[0099] A timing setting module, used to obtain a data page embedding configuration, wherein the data page embedding configuration includes embedding configurations of multiple data pages;

[0100] For any of the tracking configurations of the data page, set the triggering timing of the event in the tracking configuration of the data page.

[0101] In an optional implementation, when the data page is a page element, the device further includes:

[0102] A page element association correspondence table generation module is used to establish, for any of the page element's embedding configurations, a first correspondence between the page element embedding identifier of the page element and the page element event type in the page element's embedding configuration; wherein the page element embedding identifier of the page element is set by the page element's embedding configuration;

[0103] Establishing a second correspondence between the page element event type in the embedding configuration of the page element and the page element event custom attribute;

[0104] Configuring the first corresponding relationship and the second corresponding relationship into a page element association correspondence table;

[0105] In the case where the data page is a page, the device further includes:

[0106] A page association correspondence table generation module is used to establish, for any of the page burying point configurations, a third correspondence between the page burying point identifier of the page and the page event type in the page burying point configuration; wherein the page burying point identifier of the page is set by the page burying point configuration;

[0107] Establishing a fourth correspondence between the page event type in the embedding configuration of the page and the page event custom attribute;

[0108] The third correspondence relationship and the fourth correspondence relationship are configured into a page association correspondence table.

[0109] In an optional implementation, after associating the target page element event with the target page element, the device includes:

[0110] A target page element event triggering module, used for searching the target page element event custom attribute corresponding to the target page element event type through the page element association corresponding table when the target page element event is triggered;

[0111] Acquire the page element dynamic parameters generated by the triggering of the target page element event, and fill the page element dynamic parameters as the page element attribute values ​​of the target page element event custom attributes;

[0112] Verify the page element attribute value, and report the target page element event custom attribute and the page element attribute value;

[0113] After associating the target page event with the target page, the device includes:

[0114] A target page event triggering module, used for searching the target page event custom attribute corresponding to the target page event type through the page association corresponding table when the target page event is triggered;

[0115] Acquire page dynamic parameters generated by the target page event triggering, and fill the page dynamic parameters as page attribute values ​​of the target page event custom attributes;

[0116] The page attribute value is verified, and the target page event custom attribute and the page attribute value are reported.

[0117] In an optional implementation, the page embedding configuration is obtained in the following manner:

[0118] In response to a user's new page creation operation, displaying a new page creation dialog box, wherein the new page creation dialog box is used to configure the page;

[0119] In response to a page entry operation of the user in the page creation dialog box, obtaining a page configuration entered by the user, wherein the page configuration at least includes a page identifier;

[0120] In response to the user's page event creation operation, a page event creation dialog box is displayed, wherein the page event creation dialog box is used to configure the page event;

[0121] In response to a page event entry operation by a user in the page event creation dialog box, obtaining a page event configuration entered by the user, wherein the page event configuration includes at least a page event custom attribute and a page event type;

[0122] The page element embedding configuration is composed of the page configuration and the page element event configuration.

[0123] In a third aspect of an embodiment of the present invention, there is further provided an electronic device, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;

[0124] Memory, used to store computer programs;

[0125] The processor is used to implement any of the tracking methods described in the first aspect when executing a program stored in the memory.

[0126] In a fourth aspect of an embodiment of the present invention, a storage medium is further provided, wherein instructions are stored in the storage medium, and when the storage medium is run on a computer, the computer executes any of the tracking methods described in the first aspect above.

[0127] In a fifth aspect of an embodiment of the present invention, a computer program product comprising instructions is also provided, which, when executed on a computer, enables the computer to execute any of the above-mentioned tracking methods.

[0128] The technical solution provided by the embodiment of the present invention obtains a target page object set, and for each target page object in the target page object set, determines the target page element contained in the target page object and carrying the target page element burying identifier, determines the target page element event set for the target page element through the target page element burying identifier, and associates the target page element event with the target page element to achieve burying of the target page element. By associating the target page element event with the target page element, burying of the target page element can be achieved. Compared with code burying, it reduces the workload and does not invade the specific business logic, and can reduce the complexity of the burying process to a certain extent. BRIEF DESCRIPTION OF THE DRAWINGS

[0129] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0130] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0131] Figure 1 A schematic diagram of an application scenario shown in an embodiment of the present invention;

[0132] Figure 2 It is a schematic diagram of an implementation process of a method for burying points shown in an embodiment of the present invention;

[0133] Figure 3 It is a schematic diagram of an implementation process of another method for burying points in an embodiment of the present invention;

[0134] Figure 4 It is a schematic diagram of an implementation flow of a method for generating a page element association correspondence table shown in an embodiment of the present invention;

[0135] Figure 5 It is a schematic diagram of an implementation flow of a method for generating a page element embedding configuration shown in an embodiment of the present invention;

[0136] Figure 6 A schematic diagram of a new page dialog box shown in an embodiment of the present invention;

[0137] Figure 7 A schematic diagram of a new module dialog box shown in an embodiment of the present invention;

[0138] Figure 8 A schematic diagram of a new page element event dialog box shown in an embodiment of the present invention;

[0139] Fig. 9 It is a schematic diagram of an implementation process of another method for burying points in an embodiment of the present invention;

[0140] Fig.10 It is a schematic diagram of an implementation process of another method for burying points in an embodiment of the present invention;

[0141] Fig.11 It is a schematic diagram of an implementation flow of a method for generating a page association correspondence table shown in an embodiment of the present invention;

[0142] Fig.12 It is a schematic diagram of an implementation flow of a method for generating a page embedding configuration shown in an embodiment of the present invention;

[0143] Fig.13 This is a schematic diagram of the life cycle of a tracking SDK shown in an embodiment of the present invention;

[0144] Fig.14 It is a structural schematic diagram of a point burying device shown in an embodiment of the present invention;

[0145] Fig.15 It is a schematic diagram of the structure of an electronic device shown in an embodiment of the present invention. DETAILED DESCRIPTION

[0146] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings 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.

[0147] Usually, events that need to be counted are collected through code tracking. For each event that needs to be counted, corresponding code needs to be added, which is a huge workload, making the tracking process very complicated and the development cost high. It also invades the specific business logic, making the business code very cumbersome, and once it goes online, it needs to be released and modified, which is easy to affect the business code.

[0148] In order to solve the problems caused by code embedding, the embodiment of the present invention adopts declarative embedding. The idea of ​​declarative embedding is to decouple the embedding code from the specific interaction and business logic. It is only necessary to identify the page elements and pages that need to be embedded, and declare the required dynamic data, thereby solving the problems caused by code embedding.

[0149] Based on this, Figure 1 As shown, it is a schematic diagram of an application scenario provided by an embodiment of the present invention. The tracking points (i.e., tracking point configuration) are entered into the tracking point platform, and then the tracking point configuration can be obtained externally through the server interface or by exporting data files. After the Web application introduces the tracking point SDK (Software Development Kit), the tracking point SDK will pull the tracking point configuration, automatically process it according to the tracking point configuration, and send it to the database for storage after collecting and assembling the data. The data can be queried and analyzed later. In the development mode, after collecting and assembling the data, it is sent to the acceptance platform for the test phase to accept the data.

[0150] Based on Figure 1 The application scenario shown in the figure explains the implementation process of the tracking SDK. Figure 2FIG. 1 is a schematic diagram of an implementation flow of a method for tracking points provided by an embodiment of the present invention. The method is applied to an electronic device and may specifically include the following steps:

[0151] S201, obtaining a target page object set.

[0152] In the embodiment of the present invention, the page rendering process is constantly changing. For example, the normal page rendering process may be from a blank page to a header bar to a left side to a main body list, etc. The changes in each stage are changes in the page layout, and new page objects will appear. In addition, during the interaction process, the page layout will also change accordingly.

[0153] Based on this, a target page object set is obtained, wherein the target page object set includes target page objects newly added to the target page when the target page layout changes. It should be noted that the change in page layout may be caused by page rendering or human-computer interaction, and the target page objects newly added to the target page may be, for example, a header bar, a navigation bar, a main body list, etc., which is not limited in the embodiment of the present invention.

[0154] In the embodiment of the present invention, a page object observer instance can be created through the MutationObserver API interface, and whenever the target page layout changes, the page object observer instance can be notified, thereby obtaining a target page object set. The target page object set may include multiple target page objects, each of which is composed of at least one page element, and the page element here may be, for example, a confirmation button.

[0155] In addition, it should be noted that the target page is usually a page in a certain Web application, which means that before executing step S101, it is necessary to first determine the Web application to be embedded, and then obtain the target page object set in the Web application to be embedded. The embodiment of the present invention is not limited to this.

[0156] S202: for any target page object in the target page object set, determine a target page element that carries a target page element embedding identifier and is contained in the target page object.

[0157] In an embodiment of the present invention, for a target page object set, for any target page object in the target page object set, a target page element contained in the target page object and carrying a target page element embedding identifier is determined. The target page element here may be, for example, a confirmation button.

[0158] It should be noted that the target page element tracking point identification is usually composed of a target page identification (such as a target page ID, a target page name, etc.), a target module (a target module in a target page) identification, and a target page element (a target page element in a target module) identification, which is not limited in this embodiment of the present invention.

[0159] In addition, for a target page element that carries a target page element embedding identifier, it indicates that the target page element needs to be embedded. Usually, it is necessary to declare the target page element embedding identifier in the custom attribute of the target page element. In this way, the target page element can carry the target page element embedding identifier, and the embedding of the target page element can be implemented subsequently. The embodiments of the present invention are not limited to this.

[0160] S203: Determine a target page element event set for the target page element through the target page element embedding identifier.

[0161] In an embodiment of the present invention, for a target page element embedding identifier, a target page element event set for the target page element can be determined through the target page element embedding identifier. The target page element event here can be, for example, a click event, a stay event, an exposure event, a disappearance event, etc., which is not limited in the embodiment of the present invention.

[0162] S204, associating the target page element event with the target page element to implement tracking of the target page element.

[0163] In the embodiment of the present invention, for the target page element and the target page element event, the target page element event can be associated with the target page element to implement the embedding of the target page element, thereby implementing the embedding of the target page element. The association may refer to binding.

[0164] By associating the target page element event with the target page element in this way, you can implement tracking of the target page element. Compared with code tracking, it reduces the workload and does not intrude into the specific business logic, which can reduce the complexity of the tracking process to a certain extent.

[0165] Through the above description of the technical solution provided by the embodiment of the present invention, by obtaining a target page object set, for each target page object in the target page object set, the target page element contained in the target page object and carrying the target page element burying point identifier is determined, and the target page element event set for the target page element is determined through the target page element burying point identifier, and the target page element event is associated with the target page element to realize the burying point of the target page element. By associating the target page element event with the target page element, the burying point of the target page element can be realized. Compared with code burying point, it reduces the workload and will not invade the specific business logic, and can reduce the complexity of the burying point process to a certain extent.

[0166] like Figure 3 FIG. 1 is a schematic diagram of an implementation flow of another method for tracking points provided by an embodiment of the present invention. The method is applied to an electronic device and may specifically include the following steps:

[0167] S301, obtaining a target page object set.

[0168] In the embodiment of the present invention, this step is similar to the above-mentioned step S201, and the embodiment of the present invention will not be described in detail here.

[0169] S302: For any target page object in the target page object set, traverse the document page object model tree of the target page object to obtain all page elements included in the target page object.

[0170] S303, looping through all page elements, and determining the target page element that carries the target page element embedding identifier and is contained in the target page object through the custom attribute declaration on the page element.

[0171] In the embodiment of the present invention, for a target page object set, for any target page object in the target page object set, a document page object model tree of the target page object, i.e., a DOM (Document Object Model) tree, is traversed in depth first to obtain all page elements contained in the target page object, wherein the page elements are DOM nodes of the DOM tree.

[0172] For all page elements contained in the target page object, all page elements are looped through, and the target page elements contained in the target page object that carry the target page element embedding identifier are determined through the custom attribute declaration on the page element. It should be noted that if embedding is performed on the target page element, the target page element embedding identifier needs to be declared in the custom attribute of the target page element, which is not limited in the embodiment of the present invention.

[0173] S304, obtaining a page element association correspondence table.

[0174] In an embodiment of the present invention, a data page burying point configuration is obtained, wherein the data page burying point configuration includes burying point configurations of multiple data pages (a data page may be a page or a page element, and a data page is a page that carries data information and expresses data information). For the burying point configuration of any data page, the triggering timing of the event in the burying point configuration of the data page is set, and a first correspondence between a data page burying point identifier and a data page event type in the burying point configuration of the data page is established; wherein the data page burying point identifier of the data page is set through the burying point configuration of the data page, and a second correspondence between the data page event type in the burying point configuration of the data page and the custom attribute of the data page event is established, and the first correspondence and the second correspondence are configured into a data page association correspondence table.

[0175] The above data page can be a page element, thereby obtaining a page element associated correspondence table, wherein the page element associated correspondence table records the first correspondence between the page element embedding point identifier and the page element event type, and the second correspondence between the page element event type and the page element event custom attribute.

[0176] It should be noted that for page element event types, such as click, stay, exposure, disappearance, etc., the custom attributes of page element events are used to declare the required dynamic data, which can be understood as buried point data, such as file-ID, file-type, and the embodiments of the present invention are not limited to this.

[0177] Among them, for the page element association correspondence table, it can be obtained by Figure 4 The method shown is obtained. Figure 4 FIG. 1 is a schematic diagram of an implementation flow of a method for generating a page element association table provided by an embodiment of the present invention. The method is applied to an electronic device and may specifically include the following steps:

[0178] S401, obtaining a page element embedding configuration, wherein the page element embedding configuration includes embedding configurations of multiple page elements.

[0179] In an embodiment of the present invention, a page element burying configuration is obtained, wherein the page element burying configuration includes burying configurations of multiple page elements.

[0180] There are two ways to obtain the tracking configuration of page elements: you can pull it from the tracking platform through the server-side interface API, or export the local configuration file and introduce it into the project.

[0181] In addition, the configuration of page element tracking can be obtained through a series of input operations on the tracking platform. Figure 5FIG. 1 is a schematic diagram of an implementation flow of a method for generating a page element embedding configuration according to an embodiment of the present invention. The method is applied to an electronic device and may specifically include the following steps:

[0182] S501, in response to a user's new page creation operation, displaying a new page creation dialog box, where the new page creation dialog box is used to configure the page.

[0183] S502, in response to a page entry operation of a user in a new page dialog box, obtaining a page configuration entered by the user, where the page configuration at least includes a page identifier.

[0184] In the embodiment of the present invention, in the data era, using data to drive product iteration has become an industry consensus. In order to better optimize and improve products, it is often necessary to collect data from Web applications to analyze page access and user usage in specific scenarios. Based on this, it is necessary to determine the Web application to be buried so that the page or page element in the application can be buried later.

[0185] To this end, the user can perform a new application creation operation, and in response to the user's new application creation operation, a new application creation dialog box can be displayed, and the new application creation dialog box is used to configure the application. The user can subsequently configure the application in the new application dialog box, and in response to the user's application entry operation in the new application dialog box, the application configuration entered by the user is obtained.

[0186] For example, a user performs a new application creation operation, and in response to the user's new application creation operation, a new application creation dialog box can be displayed, and the new application creation dialog box is used to configure the application. The user can subsequently configure the application in the new application dialog box, and in response to the user's application entry operation in the new application dialog box, the application configuration entered by the user, such as the application name "Daoke" or the like, is obtained.

[0187] After the application is entered, the user performs a new page operation, so that in response to the user's new page operation, a new page dialog box can be displayed, and the user configures the page in the application in the new page dialog box. Subsequently, the user can configure the page in the new page dialog box, so that in response to the user's page entry operation in the new page dialog box, the page configuration entered by the user can be obtained, wherein the page configuration at least includes a page identifier (such as a page name), and may also include other page configurations, such as Figure 6 shown.

[0188] S503, in response to the user's module creation operation, displaying a module creation dialog box, where the module creation dialog box is used to configure the module in the page.

[0189] S504, in response to the module entry operation of the user in the module creation dialog box, obtaining the module configuration entered by the user, where the module configuration at least includes a module identifier.

[0190] In an embodiment of the present invention, after the page entry is completed, the user performs a module creation operation, so that in response to the user's module creation operation, a module creation dialog box can be displayed, and the module creation dialog box is used to configure the module in the page. The user can subsequently configure the module in the module creation dialog box, so that in response to the user's module entry operation in the module creation dialog box, the module configuration entered by the user is obtained, wherein the module configuration at least includes a module identifier (such as a module name), and may also include other module configurations, such as Figure 7 shown.

[0191] S505, in response to the user's page element creation operation, displaying a page element creation dialog box, where the page element creation dialog box is used to configure the page elements in the module.

[0192] S506, in response to the user's page element entry operation in the page element new dialog box, obtaining the page element configuration entered by the user, where the page element configuration at least includes a page element identifier.

[0193] In an embodiment of the present invention, after the module is entered, the user performs an element creation operation, so that in response to the user's page element creation operation, a page element creation dialog box can be displayed, and the page element creation dialog box is used to configure the page elements in the module. The user can subsequently configure the page elements in the page element creation dialog box, so that in response to the user's page element entry operation in the page element creation dialog box, the page element configuration entered by the user is obtained, and the page element configuration at least includes a page element identifier (for example, a page element name).

[0194] S507, in response to the user's page element event creation operation, displaying a page element event creation dialog box, where the page element event creation dialog box is used to configure the page element event.

[0195] S508, in response to the user's page element event entry operation in the page element event new dialog box, obtaining the page element event configuration entered by the user, the page element event configuration at least including the page element event custom attributes and the page element event type.

[0196] S509, page element embedding configuration is composed of page configuration, module configuration, page element configuration and page element event configuration.

[0197] In an embodiment of the present invention, after the page element is entered, the user can perform a page element event creation operation, so that in response to the user's page element event creation operation, a page element event creation dialog box can be displayed, and the page element event creation dialog box is used to configure the event of the page element. The user can subsequently configure the event of the page element in the page element event creation dialog box, so that in response to the user's page element event entry operation in the page element event creation dialog box, the page element event configuration entered by the user is obtained. The page element event configuration at least includes the page element event custom attributes, the page element event type (for example, click), and may also include other page element event configurations, such as Figure 8 shown.

[0198] After the page element event configuration is entered, the entire page element embedding configuration entry process ends, wherein the above steps can be repeated, and the embodiment of the present invention does not limit this. Thus, the page element embedding configuration can be composed of page configuration, module configuration, page element configuration and page element event configuration.

[0199] S402: For any page element's tracking configuration, set the triggering timing of an event in the tracking configuration of the page element.

[0200] In the embodiment of the present invention, for the embedding configuration of any page element, the triggering timing of the event in the embedding configuration of the page element is set. The triggering timing of the event in the embedding configuration of the page element can be set according to actual needs, and the embodiment of the present invention does not limit this.

[0201] The triggering timing of events in the tracking configuration of page elements can be as follows:

[0202] 1. Page elements exposed / disappeared

[0203] Rule 1: Display ratio ratio (0-1), for example, ratio = 0.5, which means it is triggered when half of the area is exposed / disappeared.

[0204] Rule 2: Is it triggered once? If so, only the first trigger will be reported.

[0205] The implementation method is to monitor page elements through the IntersectionObserver API. Whenever the page elements display changes, they can be handled by asynchronous callback notifications.

[0206] 2. Mouse over page elements

[0207] Rule: dwell time (unit: ms), for example, time = 500ms, which means the dwell time exceeds 500 milliseconds and the event is triggered after the mouse is moved out.

[0208] The implementation method is through mouseenter and mouseleave events. Basic information such as dwell time can be stored in the DOM node, so that the two events can communicate and simulate dwell events.

[0209] S403, establishing a first correspondence between a page element embedding identifier of a page element and a page element event type in the embedding configuration of the page element; wherein the page element embedding identifier of the page element is set through the embedding configuration of the page element.

[0210] S404, establishing a second correspondence between the page element event type in the embedding configuration of the page element and the page element event custom attribute.

[0211] S405: configure the first correspondence relationship and the second correspondence relationship into a page element association correspondence table.

[0212] In the embodiment of the present invention, in order to distinguish between page element embedding points and page embedding points, different embedding point identifiers are designed respectively. The page element embedding point identifier is usually composed of a page identifier, a module identifier, and a page element identifier.

[0213] Based on this, for the tracking configuration of the page element, which includes the page ID, module ID, and page element ID, the page element tracking ID of the page element can be composed of the page ID, module ID, and page element ID in the tracking configuration of the page element.

[0214] For example, the tracking configuration of a page element includes page-name, module-name, and element-name, which can be concatenated into the page element tracking identifier of the page element, that is, ${page-name}.${module-name}.${element-name}.

[0215] In an embodiment of the present invention, the embedding configuration of the page element includes the page element event type, thereby establishing a first correspondence between the page element embedding identifier of the page element and the page element event type in the embedding configuration of the page element. The page element embedding identifier of the page element is set by the embedding configuration of the page element.

[0216] In addition, the tracking configuration of the page element includes the page element event type and the page element event custom attributes, thereby establishing a second correspondence between the page element event type and the page element event custom attributes in the tracking configuration of the page element, and then configuring the first correspondence and the second correspondence into a page element association correspondence table.

[0217] S305: Determine the target page element event type corresponding to the target page element embedding identifier through the page element association correspondence table.

[0218] In an embodiment of the present invention, for a page element association correspondence table, which records the first correspondence between the page element embedding point identifier and the page element event type, the target page element event type corresponding to the target page element embedding point identifier can be determined through the page element association correspondence table.

[0219] S306: Determine a page element event corresponding to the target page element event type, and determine the page element event as a target page element event set for the target page element.

[0220] In the embodiment of the present invention, for the target page element event type, a page element event corresponding to the target page element event type may be searched, and the page element event may be determined as the target page element event set for the target page element.

[0221] S307, associating the target page element event with the target page element to implement tracking of the target page element.

[0222] In the embodiment of the present invention, this step is similar to the above-mentioned step S204, and the embodiment of the present invention will not be described in detail here.

[0223] S308: When a target page element event is triggered, a target page element event custom attribute corresponding to the target page element event type is searched through a page element association corresponding table.

[0224] In the embodiment of the present invention, the page element event can be triggered because the triggering time is set. Therefore, when the target page element event is triggered, the target page element event custom attribute corresponding to the target page element event type can be found through the page element association corresponding table.

[0225] It should be noted that for the page element association correspondence table, the second correspondence between the page element event type and the page element event custom attribute is recorded therein. In this way, the target page element event custom attribute corresponding to the target page element event type can be found through the page element association correspondence table to declare the required dynamic data, which can be understood as buried point data, such as file-ID and file-type.

[0226] S309, obtaining page element dynamic parameters generated by the target page element event triggering, and filling the page element dynamic parameters as page element attribute values ​​of the target page element event custom attributes.

[0227] In an embodiment of the present invention, for a target page element event, if it is triggered, some page element dynamic parameters will be generated, thereby obtaining the page element dynamic parameters generated by the triggering of the target page element event, and filling the page element dynamic parameters as the page element attribute values ​​of the custom attributes of the target page element event.

[0228] Among them, there are several ways to obtain dynamic parameters of page elements: 1. Obtain through the data attribute of the DOM node; 2. Obtain through the query parameter on the URL; 3. Obtain through the custom event interface parameter; 4. Obtain through the beforBuild lifecycle hook injection.

[0229] In addition, in the process of filling the page element dynamic parameters as the page element attribute values ​​of the target page element event custom attributes, the page element dynamic parameters are matched with the target page element event custom attributes. If they do not match, they will not be injected, thereby ensuring the correctness of the attribute values ​​and preventing incorrect attribute values ​​from being injected.

[0230] For example, the page element dynamic parameter fileid: "1111", and the target page element event custom attribute file-id, here the page element dynamic parameter is matched with the target page element event custom attribute. Here fileid and file-id cannot match, then "1111" cannot be filled as the page element attribute value of the target page element event custom attribute.

[0231] It should be noted that, for the target page element event, the custom attributes can indicate the fields required for the embedding, and the page element attribute value can indicate the field value required for the embedding. The field and the field value together constitute the data required for the page element embedding, and the embodiment of the present invention does not limit this.

[0232] S310, verifying the page element attribute value, and reporting the target page element event custom attribute and the page element attribute value.

[0233] In the embodiment of the present invention, the page element attribute value can be verified, and the target page element event custom attribute and the page element attribute value form the data required for the page element embedding point for reporting.

[0234] In the embodiment of the present invention, the type of the page element attribute value can be determined, and the page element attribute value can be verified according to the type of the page element attribute value. The types are roughly divided into: constant, array, and undefined.

[0235] Constant check: Check whether the value is consistent with the original configuration constant and cannot be modified.

[0236] Array check: Check whether the value is in the enumeration array.

[0237] Undefined check: Check if the value is missing.

[0238] In addition, the tracking SDK does not have built-in sending capabilities during its reporting phase because different environments rely on different APIs. Therefore, the tracking SDK is decoupled from the sending logic, and the specific sending capabilities are passed in through the lifecycle hook beforeSend.

[0239] Through the above description of the technical solution provided by the embodiment of the present invention, by obtaining a target page object set, for each target page object in the target page object set, traversing the document page object model tree of the target page object, obtaining all page elements contained in the target page object, looping through all page elements, determining the target page element contained in the target page object and carrying the target page element burying point identifier through the custom attribute declaration on the page element, obtaining the page element association correspondence table, determining the target page element event type corresponding to the target page element burying point identifier through the page element association correspondence table, determining the page element event corresponding to the target page element event type, determining the page element event as the target page element event set for the target page element, associating the target page element event with the target page element to achieve burying of the target page element, thus associating the target page element event with the target page element, the burying of the target page element can be achieved, compared with code burying, the workload is reduced, and the specific business logic will not be invaded, which can reduce the complexity of the burying process to a certain extent. And when the target page element event is triggered, the target page element event custom attribute corresponding to the target page element event type is found through the page element association correspondence table, the page element dynamic parameters generated by the target page element event triggering are obtained, the page element dynamic parameters are filled as the page element attribute values ​​of the target page element event custom attributes, the page element attribute values ​​are verified, and the target page element event custom attributes and page element attribute values ​​are reported, which can automatically realize the collection, verification, and reporting of the data required for the embedding point.

[0240] like Fig. 9 FIG. 1 is a schematic diagram of an implementation flow of another method for tracking points provided by an embodiment of the present invention. The method is applied to an electronic device and may specifically include the following steps:

[0241] S901, when a jump of the target page is detected, determine whether the target page carries a target page embedding identifier.

[0242] In the embodiment of the present invention, in addition to embedding points on page elements, embedding points can also be performed on pages. Based on this, when a jump of a target page is detected, it is determined whether the target page carries a target page embedding point identifier.

[0243] It should be noted that the target page embedding identifier is usually composed of a target page identifier, for example, the target page embedding identifier is the target page name, and the embodiment of the present invention does not limit this.

[0244] In addition, there are two modes for page jump: hash mode and history mode. Both modes use two features of the browser to implement front-end routing. The history mode is implemented using the API of the browsing history stack, and the hash mode is implemented by listening to the location object hash value change event.

[0245] Based on this, determine the mode of the front-end route of the target page. If the mode is hash mode (hash mode processing uses hashchange events for monitoring. Whenever the hashpath in the url changes, the hashchange event will be notified), then bind the hashchange event to the hash mode. If it is history mode (history mode uses the history object with an API interface to jump pages, and the popstate event can be used to listen to the go, back, and forward operations of history, but the pushState and replaceState operations of history do not have native event support. It is necessary to use high-order functions to encapsulate custom events and simulate the listening of pushState and replaceState events), then bind the history mode to the popstate event. If pushState and replaceState operations are involved, bind the custom events related to pushState and replaceState operations to the history mode. After the above processing, the jump of the target page can be monitored through the event bound to the mode of the front-end route of the target page.

[0246] S902: When the target page carries a target page embedding identifier, determine a target page event set for the target page through the target page embedding identifier.

[0247] In an embodiment of the present invention, when the target page carries a target page burying point identifier, it indicates that the target page needs to be buried. At this time, the target page event set for the target page can be determined through the target page burying point identifier.

[0248] It should be noted that the above target page event may be, for example, a click event, a stay event, an exposure event, a disappearance event, etc., which is not limited in the embodiment of the present invention.

[0249] S903, associating the target page event with the target page to implement tracking of the target page.

[0250] In the embodiment of the present invention, for the target page and the target page event, the target page event can be associated with the target page to implement the embedding of the target page, thereby implementing the embedding of the target page. The association may refer to binding.

[0251] By associating the target page event with the target page in this way, you can implement tracking of the target page. Compared with code tracking, this reduces the workload and does not intrude into the specific business logic, which can reduce the complexity of the tracking process to a certain extent.

[0252] Through the above description of the technical solution provided by the embodiment of the present invention, when the target page jumps, it is determined whether the target page carries the target page burying point identifier. If the target page carries the target page burying point identifier, the target page event set for the target page is determined through the target page burying point identifier, and the target page event is associated with the target page to achieve burying of the target page. By associating the target page event with the target page in this way, the burying point of the target page can be achieved. Compared with code burying, it reduces the workload and does not invade the specific business logic, which can reduce the complexity of the burying point process to a certain extent.

[0253] like Fig.10 FIG. 1 is a schematic diagram of an implementation flow of another method for tracking points provided by an embodiment of the present invention. The method is applied to an electronic device and may specifically include the following steps:

[0254] S1001, when a jump of a target page is detected, the corresponding relationship between a preset address path identifier and a page embedding identifier, and a target address path identifier of the target page are obtained.

[0255] In an embodiment of the present invention, when a jump of a target page is detected, the corresponding relationship between a preset address path identifier and a page embedding identifier, and a target address path identifier of the target page are obtained.

[0256] Among them, the correspondence between the preset address path identifier and the page embedding point identifier can be expressed as the correspondence between the address pathname (address path identifier) ​​and the page_name (page embedding point identifier), for example, and the embodiment of the present invention does not limit this.

[0257] S1002, according to the corresponding relationship, search for the target page embedding point identifier corresponding to the target address path identifier.

[0258] S1003, when the target page burying point identifier corresponding to the target address path identifier is found, it is determined that the target page carries the target page burying point identifier.

[0259] S1004: When the target page burying point identifier corresponding to the target address path identifier is not found, it is determined that the target page does not carry the target page burying point identifier.

[0260] In an embodiment of the present invention, for the correspondence between the preset address path identifier and the page embedding point identifier, based on the correspondence, the target page embedding point identifier corresponding to the target address path identifier is searched. When the target page embedding point identifier corresponding to the target address path identifier is found, it is determined that the target page carries the target page embedding point identifier. When the target page embedding point identifier corresponding to the target address path identifier is not found, it is determined that the target page does not carry the target page embedding point identifier.

[0261] S1005, when the target page carries a target page embedding point identifier, obtain a page association correspondence table, which records the third correspondence between the page embedding point identifier and the page event type, and the fourth correspondence between the page event type and the page event custom attribute.

[0262] In an embodiment of the present invention, a data page burying point configuration is obtained, wherein the data page burying point configuration includes burying point configurations of multiple data pages, and for the burying point configuration of any data page, a triggering timing of an event in the burying point configuration of the data page is set, and a third correspondence between a data page burying point identifier of the data page and a data page event type in the burying point configuration of the data page is established; wherein the data page burying point identifier of the data page is set through the burying point configuration of the data page, and a fourth correspondence between the data page event type in the burying point configuration of the data page and a custom attribute of the data page event is established, and the third correspondence and the fourth correspondence are combined into a data page association correspondence table.

[0263] The above-mentioned data page can be a page. Therefore, when the target page carries a target page embedding identifier, it means that the target page needs to be embedded. At this time, the page association correspondence table is obtained, wherein the page association correspondence table records the third correspondence between the page embedding identifier and the page event type, and the fourth correspondence between the page event type and the custom attribute of the page event.

[0264] It should be noted that for page event types, such as click, stay, exposure, disappearance, etc., the custom attributes of page events are used to declare the required dynamic data, which can be understood as embedded point data, such as file-ID, file-type, and the embodiments of the present invention are not limited to this.

[0265] Among them, for the page association correspondence table, it can be obtained by Fig.11 The method shown is obtained. Fig.11 FIG. 1 is a schematic diagram of an implementation flow of a method for generating a page association correspondence table provided by an embodiment of the present invention. The method is applied to an electronic device and may specifically include the following steps:

[0266] S1101, obtaining a page embedding configuration, wherein the page embedding configuration includes embedding configurations of multiple pages.

[0267] In an embodiment of the present invention, a page burying point configuration is obtained, wherein the page burying point configuration includes burying point configurations of multiple pages.

[0268] There are two ways to obtain page tracking configuration: you can pull it from the tracking platform through the server-side API, or export the local configuration file and introduce it into the project.

[0269] In addition, the page tracking configuration can be obtained through a series of input operations on the tracking platform. Fig.12 FIG. 1 is a schematic diagram of an implementation flow of a method for generating a page embedding configuration provided by an embodiment of the present invention. The method is applied to an electronic device and may specifically include the following steps:

[0270] S1201, in response to a user's new page creation operation, displaying a new page creation dialog box, where the new page creation dialog box is used to configure the page.

[0271] In the embodiment of the present invention, this step is similar to the above step S501, and the embodiment of the present invention will not be described in detail here.

[0272] S1202, in response to a page entry operation of a user in a new page dialog box, obtaining a page configuration entered by the user, where the page configuration at least includes a page identifier.

[0273] In the embodiment of the present invention, this step is similar to the above step S502, and the embodiment of the present invention will not be described in detail here.

[0274] S1203, in response to the user's page event creation operation, displaying a page event creation dialog box, where the page event creation dialog box is used to configure page events.

[0275] In the embodiment of the present invention, this step is similar to the above step S503, and the embodiment of the present invention will not be described in detail here.

[0276] S1204, in response to the user's page event entry operation in the page event creation dialog box, obtaining the page event configuration entered by the user, the page event configuration at least including the page event custom attributes and the page event type.

[0277] In the embodiment of the present invention, this step is similar to the above step S504, and the embodiment of the present invention will not be described in detail here.

[0278] S1205, the page element embedding configuration is composed of the page configuration and the page element event configuration.

[0279] In the embodiment of the present invention, this step is similar to the above step S505, and the embodiment of the present invention will not be described in detail here.

[0280] S1102, for the tracking configuration of any page, set the triggering timing of the event in the tracking configuration of the page.

[0281] In the embodiment of the present invention, for any page's embedding configuration, the triggering time of the event in the embedding configuration of the page is set. The triggering time of the event in the embedding configuration of the page can be set according to actual needs, and the embodiment of the present invention does not limit this.

[0282] The triggering timing of events in the page tracking configuration can be as follows:

[0283] 1. Page exposure / disappearance

[0284] Rule 1: Display ratio ratio (0-1), for example, ratio = 0.5, which means it is triggered when half of the area is exposed / disappeared.

[0285] Rule 2: Is it triggered once? If so, only the first trigger will be reported.

[0286] The implementation method is to monitor the page through the IntersectionObserver API. Whenever the page display changes, it can be handled by asynchronous callback notification.

[0287] 2. The mouse stays on the page

[0288] Rule: dwell time (unit: ms), for example, time = 500ms, which means the dwell time exceeds 500 milliseconds and the event is triggered after the mouse is moved out.

[0289] The implementation method is through mouseenter and mouseleave events. Basic information such as dwell time can be stored in the DOM node, so that the two events can communicate and simulate dwell events.

[0290] S1103, establishing a third correspondence between the page embedding point identifier of the page and the page event type in the embedding point configuration of the page; wherein, the page embedding point identifier of the page is set through the embedding point configuration of the page.

[0291] S1104, establishing a fourth correspondence between the page event type in the page tracking configuration and the page event custom attribute.

[0292] S1105: configure the third corresponding relationship and the fourth corresponding relationship into a page association corresponding table.

[0293] In the embodiment of the present invention, in order to distinguish between page element embedding points and page embedding points, different embedding point identifiers are designed respectively. The page embedding point identifier of a page is usually composed of a page identifier, that is, the page embedding point identifier is a page identifier.

[0294] For example, for a page's tracking configuration, which includes page-name, the page tracking identifier can be concatenated from page-name, that is, ${page-name}.

[0295] In an embodiment of the present invention, the page embedding configuration includes a page event type, thereby establishing a third correspondence between the page embedding identifier of the page and the page event type in the page embedding configuration. The page embedding identifier of the page is set by the page embedding configuration.

[0296] In addition, the page's tracking configuration includes page event types and page event custom attributes, thereby establishing a fourth correspondence between the page event type and the page event custom attributes in the page's tracking configuration, and then configuring the third correspondence and the fourth correspondence into a page association correspondence table.

[0297] S1006, determining the target page event type corresponding to the target page embedding point identifier through the page association correspondence table.

[0298] In an embodiment of the present invention, for a page association correspondence table, which records the third correspondence between a page embedding point identifier and a page event type, the target page event type corresponding to the target page embedding point identifier can be determined through the page association correspondence table.

[0299] S1007: searching for a page event corresponding to the target page event type, and determining the page event as a target page event set for the target page.

[0300] In the embodiment of the present invention, for the target page event type, a page event corresponding to the target page event type may be searched, and the page event may be determined as a target page event set for the target page.

[0301] S1008, associating the target page event with the target page to implement embedding of the target page.

[0302] In the embodiment of the present invention, this step is similar to the above step S903, and the embodiment of the present invention will not be described in detail here.

[0303] S1009: When a target page event is triggered, a target page event custom attribute corresponding to the target page event type is searched through a page association corresponding table.

[0304] In the embodiment of the present invention, the page event can be triggered because the triggering time is set. Therefore, when the target page event is triggered, the target page event custom attribute corresponding to the target page event type is searched through the page association corresponding table.

[0305] It should be noted that the page association correspondence table records the fourth correspondence between the page event type and the page event custom attribute, so that the target page event custom attribute corresponding to the target page event type can be found through the page association correspondence table.

[0306] S1010, obtaining page dynamic parameters generated by the target page event triggering, and filling the page dynamic parameters as page attribute values ​​of the target page event custom attributes.

[0307] In an embodiment of the present invention, if a target page event is triggered, some page dynamic parameters will be generated, thereby obtaining the page dynamic parameters generated by the triggering of the target page event, and filling the page dynamic parameters as page attribute values ​​of the target page event custom attributes.

[0308] Among them, there are several ways to obtain dynamic parameters of the page: 1. Obtain through the data attribute of the DOM node; 2. Obtain through the query parameter on the URL; 3. Obtain through the custom event interface parameter; 4. Obtain through the beforBuild lifecycle hook injection.

[0309] In addition, in the process of filling the page dynamic parameters as the page attribute values ​​of the target page event custom attributes, the page dynamic parameters are matched with the target page event custom attributes. If they do not match, they will not be injected, thereby ensuring the correctness of the attribute values ​​and preventing incorrect attribute values ​​from being injected.

[0310] For example, the page dynamic parameter fileid: "1111", and the target page event custom attribute file-id, here the page dynamic parameter is matched with the target page event custom attribute, here fileid and file-id cannot match, then "1111" cannot be filled as the page attribute value of the target page event custom attribute.

[0311] It should be noted that, for the target page event, the custom attributes can indicate the fields required for the embedding point, and the page attribute value can indicate the field value required for the embedding point. The field and the field value together constitute the data required for the page embedding point, and the embodiment of the present invention does not limit this.

[0312] S1011, verify the page attribute value, and report the target page event custom attribute and page attribute value.

[0313] In the embodiment of the present invention, the page attribute value can be verified, and the target page event custom attribute and the page attribute value form the data required for the page embedding point for reporting.

[0314] In the embodiment of the present invention, the type of the page attribute value can be determined, and the page attribute value can be checked according to the type of the page attribute value. The types are roughly divided into: constant, array, and undefined.

[0315] Constant check: Check whether the value is consistent with the original configuration constant and cannot be modified.

[0316] Array check: Check whether the value is in the enumeration array.

[0317] Undefined check: Check if the value is missing.

[0318] In addition, the tracking SDK does not have built-in sending capabilities during its reporting phase because different environments rely on different APIs. Therefore, the tracking SDK is decoupled from the sending logic, and the specific sending capabilities are passed in through the lifecycle hook beforeSend.

[0319] Among them, Fig.13 The figure is a schematic diagram of the life cycle of a tracking SDK provided by an embodiment of the present invention. Five stages are defined in the entire tracking SDK process: initialization configuration > data collection > data assembly > data verification > data reporting.

[0320] Each stage provides two lifecycle hooks to the outside, one before the current stage and one after the stage, so that web applications can handle business expansion and embed data more flexibly. Based on these lifecycle hooks, 10 lifecycle hooks are provided, which are mainly divided into two categories: callback class and processing class.

[0321] Callback class: only execute callback, does not affect the continued execution of the process. Contains the stages: initialization configuration, data collection; Processing class: execute and return the modified valid value. If an invalid value is returned, the current behavior event will no longer be executed and the report will be terminated. Contains the stages: assembling data, checking data, and reporting data.

[0322] Lifecycle hooks:

[0323] beforeConfig (before initialization configuration): called before initialization configuration, event configuration and tracking configuration parameters can be adjusted.

[0324] Config (after initial configuration): Called after the initial configuration phase is completed. At this time, event configuration and tracking rule association have been set up.

[0325] berforeWatch (before collecting data): called before collecting data, when event monitoring has not yet started.

[0326] watch (after collecting data): called after data collection is completed, at which time element events, page events, and custom events have been monitored.

[0327] berforeBuild (before assembling data): called before assembling data, you can also inject parameters for assembly.

[0328] Build (after assembling data): Called after the data is assembled. If an invalid value is returned, the execution will be interrupted and no further execution will be performed.

[0329] berforeVaildate (before verifying data): Called before verifying data. If an invalid value is returned, no verification is performed and the verification phase is skipped and the execution proceeds.

[0330] vaildate(after verifying data): Called after verifying data. If an invalid value is returned, the execution will be interrupted and no further execution will be performed.

[0331] berforeSend (before reporting data): called before reporting data, you can pass in the send tracking point execution. If an invalid value is returned, the execution will be interrupted and no longer executed.

[0332] Send (after reporting data): called after the data reporting is completed.

[0333] In addition, if the application event timing cannot meet the business needs, a custom event method can be used. For example, if there is a report that needs to be sent after the page data request, the trigger timing is after the interface request, which is not suitable for general application behavior triggering and can be called by the business itself.

[0334] Based on this, the tracking SDK provides a custom collection interface method for calling, passing in the custom tracking ID. If the custom tracking ID does not include the module ID, it will be treated as page event collection (similar to the above page tracking), otherwise it will be treated as page element event collection (similar to the above page element tracking).

[0335] Corresponding to the above method embodiment, the embodiment of the present invention also provides a point embedding device, such as Fig.14As shown, the device may include: a set acquisition module 1410, an element determination module 1420, an event determination module 1430, and an event and element association module 1440.

[0336] A collection acquisition module 1410 is used to acquire a target page object collection;

[0337] The element determination module 1420 is used to determine, for any target page object in the target page object set, a target page element that carries a target page element embedding identifier and is contained in the target page object;

[0338] An event determination module 1430 is used to determine a target page element event set for the target page element through the target page element embedding identifier;

[0339] The event and element association module 1440 is used to associate the target page element event with the target page element to implement tracking of the target page element.

[0340] The embodiment of the present invention further provides an electronic device, such as Fig.15 As shown, it includes a processor 151, a communication interface 152, a memory 153 and a communication bus 154, wherein the processor 151, the communication interface 152, and the memory 153 communicate with each other through the communication bus 154.

[0341] Memory 153, used for storing computer programs;

[0342] The processor 151 is used to execute the program stored in the memory 153 to implement the following steps:

[0343] Obtain a target page object set, and for any target page object in the target page object set, determine a target page element contained in the target page object and carrying a target page element burying point identifier; determine a target page element event set for the target page element through the target page element burying point identifier; and associate the target page element event with the target page element to implement burying of the target page element.

[0344] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0345] The communication interface is used for communication between the above electronic device and other devices.

[0346] The memory may include a random access memory (RAM) or a non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0347] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0348] In another embodiment of the present invention, a storage medium is provided, in which instructions are stored. When the storage medium is run on a computer, the computer executes any of the tracking methods described in the above embodiments.

[0349] In another embodiment provided by the present invention, a computer program product including instructions is also provided, which, when executed on a computer, enables the computer to execute any of the tracking methods described in the above embodiments.

[0350] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a storage medium, or transmitted from one storage medium to another storage medium. For example, the computer instructions can be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk Solid State Disk (SSD)), etc.

[0351] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0352] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0353] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.

Claims

1. A method for embedding a point, characterized in that: The method comprises: Obtain a target page object set, and for any target page object in the target page object set, determine a target page element that carries a target page element embedding identifier and is contained in the target page object; Determine the target page element event set for the target page element through the target page element embedding identifier; The target page element event is associated with the target page element to implement tracking of the target page element.

2. The method according to claim 1, characterized in that The determining the target page element contained in the target page object and carrying the target page element embedding identifier includes: Traversing the document page object model tree of the target page object to obtain all page elements contained in the target page object; All the page elements are traversed in a loop, and the target page element that carries the target page element embedding identifier and is contained in the target page object is determined through the custom attribute declaration on the page element.

3. The method according to claim 1, characterized in that: The step of determining a target page element event set for the target page element by using the target page element embedding identifier includes: Get the page element association table; Determine the target page element event type corresponding to the target page element embedding point identifier through the page element association corresponding table, and determine the page element event corresponding to the target page element event type; The page element event is determined as a target page element event set for the target page element.

4. The method according to claim 1, characterized in that: The method further comprises: When a jump to a target page is detected, determining whether the target page carries a target page embedding identifier; In the case where the target page carries the target page embedding identifier, determining a target page event set for the target page through the target page embedding identifier; The target page event is associated with the target page to implement embedding of the target page.

5. The method according to claim 4, characterized in that The determining whether the target page carries a target page embedding identifier includes: Obtaining the correspondence between the preset address path identifier and the page embedding identifier, as well as the target address path identifier of the target page; According to the corresponding relationship, searching for the target page embedding point identifier corresponding to the target address path identifier; In the case where a target page embedding identifier corresponding to the target address path identifier is found, determining that the target page carries the target page embedding identifier; When the target page burying point identifier corresponding to the target address path identifier is not found, it is determined that the target page does not carry the target page burying point identifier.

6. The method according to claim 4, characterized in that The step of determining a target page event set for the target page through the target page embedding identifier includes: Obtain a page association correspondence table, wherein the page association correspondence table records a third correspondence between a page embedding point identifier and a page event type, and a fourth correspondence between a page event type and a page event custom attribute; Determine the target page event type corresponding to the target page embedding identifier through the page association correspondence table; A page event corresponding to the target page event type is searched, and the page event is determined as a target page event set for the target page.

7. The method according to any one of claims 1 to 6, characterized in that: Before executing the tracking method, the method further includes: Obtaining a data page embedding configuration, wherein the data page embedding configuration includes embedding configurations of multiple data pages; For any of the tracking configurations of the data page, set the triggering timing of the event in the tracking configuration of the data page.

8. The method according to claim 7, characterized in that After obtaining the data page embedding configuration, In the case where the data page is a page element, the method further includes: for any of the page element's embedding configurations, establishing a first correspondence between the page element embedding identifier of the page element and the page element event type in the page element's embedding configuration; wherein the page element embedding identifier of the page element is set via the page element's embedding configuration; establishing a second correspondence between the page element event type in the page element's embedding configuration and the page element event custom attribute; configuring the first correspondence and the second correspondence into a page element association correspondence table; or, In the case where the data page is a page, the method also includes: for any of the burying point configurations of the page, establishing a third correspondence between the page burying point identifier of the page and the page event type in the burying point configuration of the page; wherein the page burying point identifier of the page is set through the burying point configuration of the page; establishing a fourth correspondence between the page event type in the burying point configuration of the page and the custom attribute of the page event; and configuring the third correspondence and the fourth correspondence into a page association correspondence table.

9. The method according to claims 4 to 6, characterized in that: After associating the target page element event with the target page element, the method further includes: When the target page element event is triggered, search the target page element event custom attribute corresponding to the target page element event type through the page element association correspondence table; obtain the page element dynamic parameter generated by the triggering of the target page element event, and fill the page element dynamic parameter as the page element attribute value of the target page element event custom attribute; verify the page element attribute value, and report the target page element event custom attribute and the page element attribute value; or, After associating the target page event with the target page, the method further includes: when the target page event is triggered, searching for the target page event custom attribute corresponding to the target page event type through the page association correspondence table; obtaining the page dynamic parameters generated by the triggering of the target page event, and filling the page dynamic parameters as page attribute values ​​of the target page event custom attribute; verifying the page attribute value, and reporting the target page event custom attribute and the page attribute value.

10. A point embedding device, characterized in that: The device comprises: A collection acquisition module is used to acquire a target page object collection; An element determination module, for determining, for any target page object in the target page object set, a target page element contained in the target page object and carrying a target page element embedding identifier; An event determination module, used to determine a target page element event set for the target page element through the target page element embedding identifier; The event and element association module is used to associate the target page element event with the target page element to implement the embedding of the target page element.

11. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, for implementing the method steps described in any one of claims 1 to 9 when executing a program stored in a memory.

12. A storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 9 is implemented.