Buried point processing method and apparatus
By selecting and automatically obtaining the identifiers of the page elements to be analyzed in the buried point information configuration page and generating the buried point configuration file, the problem of high cost of writing code in the existing technology is solved, and efficient buried point data collection and analysis is achieved.
Patent Information
- Application Number
- PCT/CN2024/093330
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-05-15
- Filing Date
- 2024-05-15
- Publication Date
- 2024-11-21
AI Technical Summary
In the prior art, writing buried software code requires a lot of R&D and operation and maintenance costs, and when the application logic or data collection changes, the code needs to be re-written, resulting in high costs.
By selecting the elements of the page to be analyzed in the buried point information configuration page, the identification of similar elements is automatically obtained, and the target configuration information is sent to the server to generate the buried point configuration file to realize data collection without writing software code.
Reduces R&D and operation and maintenance costs, improves the efficiency of buried point analysis, and reduces the requirements for changes to the analysis page.
Smart Images

Figure CN2024093330_21112024_PF_FP_ABST
Abstract
Description
Buried point processing method and device
[0001] This application claims priority to Chinese Patent Application No. 202310544822.5 filed on May 15, 2023, and the contents of the above-mentioned Chinese patent application disclosure are hereby incorporated by reference in their entirety as a part of this application. Technical Field
[0002] The embodiments of the present disclosure relate to a method and device for processing buried points. Background Art
[0003] Tracking analysis is a common data collection method for website analytics. For web applications, developers or operations personnel can write software code corresponding to tracking and run it on the web application to collect the corresponding operating data.
[0004] However, data collection using software code corresponding to tracking points requires significant R&D and maintenance costs. Writing software code corresponding to tracking points requires a certain amount of R&D costs. In addition, when the application logic of the web application changes or the tracking data to be collected changes, the corresponding software code needs to be rewritten, which consumes a lot of maintenance costs.
[0005] Summary of the Invention
[0006] In order to solve or at least partially solve the above technical problems, the embodiments of the present application provide a method and device for processing buried points.
[0007] An embodiment of the present disclosure provides a method for processing buried points, the method comprising:
[0008] In response to a selection operation triggered on a first element in a tracking point information configuration page, obtaining an identifier of the first element, where the first element is an element in a page to be analyzed;
[0009] Determining, based on the identifier of the first element, a plurality of second elements in the page to be analyzed, where the second elements are elements of the same type as the first element;
[0010] The identifier of the first element, the identifier of at least one of the multiple second elements, and the target configuration information configured in the burying point information configuration page are sent to the server, so that the server generates a burying point configuration file corresponding to the page to be analyzed based on the identifier of the first element, the identifier of at least one second element and the target configuration information, and the burying point configuration file is used to collect burying point data for the page to be analyzed.
[0011] Optionally, the identifier of the first element includes a path position of the first element, the path position includes path information and first position information, the path information indicates that the element path of the first element includes N levels, N is an integer greater than 1, and the first position information indicates the numbers corresponding to the tag names of the first element at each of the levels, wherein the N levels include the first level, the first level includes at least one element with the tag name, and the number corresponding to the tag name of the first element at the first level indicates the number of the first element in the at least one element with the tag name. Determining the plurality of second elements in the page to be analyzed based on the identifier of the first element includes:
[0012] Replacing the first number in the first location information with a preset path wildcard to obtain second location information, wherein the preset path wildcard indicates to ignore the first number;
[0013] The plurality of second elements are determined according to the second position information and the path information.
[0014] Optionally, the replacing the first number in the first location information with a preset path wildcard to obtain the second location information includes:
[0015] In accordance with a preset order, the numbers corresponding to each level in the N levels in the first location information are replaced with preset path wildcards in turn to obtain the second location information corresponding to each level, and the numbers corresponding to each level in the first location information include the first number.
[0016] Optionally, the identifier of the first element includes a first cascading style sheet selector of the first element, and determining the plurality of second elements in the to-be-analyzed page according to the identifier of the first element includes:
[0017] Determining a cascading style sheet selector to be selected according to the first cascading style sheet selector;
[0018] Determining a relative CSS path between the first CSS selector and the CSS selector to be selected;
[0019] The plurality of second elements are determined according to the to-be-selected cascading style sheet selector and the relative cascading style sheet selector.
[0020] Optionally, determining a cascading style sheet selector to be selected according to the first cascading style sheet selector includes:
[0021] The cascading style sheet selector to be selected corresponding to each iteration is determined after M rounds of iteration, where M is an integer greater than 1; wherein:
[0022] In the first iteration, determining the first parent CSS selector of the first CSS selector as the CSS selector to be selected corresponding to the first iteration;
[0023] In the i-th iteration, a cascading style sheet selector having an inheritance relationship with the candidate cascading style sheet selector determined in the i-1-th iteration is determined as the candidate cascading style sheet selector corresponding to the i-th iteration, where i is an integer greater than 1 and less than or equal to M.
[0024] Optionally, obtaining a plurality of second elements in the page to be analyzed according to the identifier of the first element includes:
[0025] In response to the automatic acquisition operation of similar elements triggered in the burial point information configuration page, several second elements in the page to be analyzed are determined based on the identifier of the first element.
[0026] Optionally, the method further includes:
[0027] displaying the plurality of second elements;
[0028] In response to a selection operation triggered on the at least one second element among the plurality of elements, an identifier of the at least one second element is obtained.
[0029] Optionally, the target configuration information includes one or more of the following:
[0030] The event type corresponding to the buried data collection, the triggering conditions for the buried data collection, and the attribute values corresponding to the buried element, where the buried element includes the first element and the at least one second element.
[0031] An embodiment of the present disclosure provides a method for processing buried points, the method comprising:
[0032] Receive a tracking configuration file sent by the server, where the tracking configuration file is the tracking configuration file described in any one of the first aspects above;
[0033] Obtain a target event from the page to be analyzed, and match the target event with the embedding configuration file;
[0034] When the target event successfully matches the tracking configuration file, the tracking data corresponding to the target event is collected.
[0035] An embodiment of the present disclosure provides a buried point processing device, the device comprising:
[0036] A first acquiring unit is configured to acquire an identifier of a first element in response to a selection operation triggered on a first element in a tracking point information configuration page, where the first element is an element in a page to be analyzed;
[0037] a determining unit configured to determine, based on the identifier of the first element, a plurality of second elements in the page to be analyzed, where the second elements are elements of the same type as the first element;
[0038] The sending unit is configured to send the identifier of the first element, the identifier of at least one second element among the multiple second elements, and the target configuration information configured in the burying point information configuration page to the server, so that the server generates a burying point configuration file corresponding to the page to be analyzed based on the identifier of the first element, the identifier of at least one second element and the target configuration information, and the burying point configuration file is used to collect burying point data for the page to be analyzed.
[0039] Optionally, the identifier of the first element includes a path position of the first element, the path position includes path information and first position information, the path information indicates that the element path of the first element includes N levels, N is an integer greater than 1, and the first position information indicates the numbers corresponding to the tag names of the first element at each of the levels, wherein the N levels include the first level, the first level includes at least one element with the tag name, and the number corresponding to the tag name of the first element at the first level indicates the number of the first element in the at least one element with the tag name, and the determining unit is configured to:
[0040] Replacing the first number in the first location information with a preset path wildcard to obtain second location information, wherein the preset path wildcard indicates to ignore the first number;
[0041] The plurality of second elements are determined according to the second position information and the path information.
[0042] Optionally, the replacing the first number in the first location information with a preset path wildcard to obtain the second location information includes:
[0043] In accordance with a preset order, the numbers corresponding to each level in the N levels in the first location information are replaced with preset path wildcards in turn to obtain the second location information corresponding to each level, and the numbers corresponding to each level in the first location information include the first number.
[0044] Optionally, the identifier of the first element includes a first cascading style sheet selector of the first element, and the determining unit is configured to:
[0045] Determining a cascading style sheet selector to be selected according to the first cascading style sheet selector;
[0046] Determining a relative CSS path between the first CSS selector and the CSS selector to be selected;
[0047] The plurality of second elements are determined according to the to-be-selected cascading style sheet selector and the relative cascading style sheet selector.
[0048] Optionally, determining a cascading style sheet selector to be selected according to the first cascading style sheet selector includes:
[0049] The cascading style sheet selector to be selected corresponding to each iteration is determined after M rounds of iteration, where M is an integer greater than 1; wherein:
[0050] In the first iteration, determining the first parent CSS selector of the first CSS selector as the CSS selector to be selected corresponding to the first iteration;
[0051] In the i-th iteration, a cascading style sheet selector having an inheritance relationship with the candidate cascading style sheet selector determined in the i-1-th iteration is determined as the candidate cascading style sheet selector corresponding to the i-th iteration, where i is an integer greater than 1 and less than or equal to M.
[0052] Optionally, the determining unit is configured to:
[0053] In response to the automatic acquisition operation of similar elements triggered in the burial point information configuration page, several second elements in the page to be analyzed are determined based on the identifier of the first element.
[0054] Optionally, the device further includes:
[0055] a display unit configured to display the plurality of second elements;
[0056] The second acquiring unit is configured to acquire an identifier of the at least one second element in response to a selection operation triggered on the at least one second element among the plurality of elements.
[0057] Optionally, the target configuration information includes one or more of the following:
[0058] The event type corresponding to the buried data collection, the triggering conditions for the buried data collection, and the attribute values corresponding to the buried element, where the buried element includes the first element and the at least one second element.
[0059] An embodiment of the present disclosure provides a buried point processing device, the device comprising:
[0060] A receiving unit is configured to receive a burying configuration file sent by the server, wherein the burying configuration file is the burying configuration file described in any one of the first aspects above;
[0061] an acquisition unit configured to acquire a target event in the page to be analyzed and match the target event with the embedding configuration file;
[0062] The collection unit is configured to collect the burial point data corresponding to the target event when the target event successfully matches the burial point configuration file.
[0063] An embodiment of the present disclosure provides a buried point processing device, the device including a processor and a memory;
[0064] The processor is configured to execute instructions stored in the memory to enable the device to perform the method as described in any one of the first aspects above, or to enable the device to perform the method as described in the second aspect above.
[0065] An embodiment of the present disclosure provides a computer-readable storage medium, comprising instructions, wherein the instructions instruct a device to execute the method as described in any one of the first aspects above, or the instructions instruct a device to execute the method as described in the second aspect above.
[0066] An embodiment of the present disclosure provides a computer program product. When the computer program product is run on a computer, it enables the computer to execute the method according to any one of the first aspects above, or enables the computer to execute the method according to the second aspect above. BRIEF DESCRIPTION OF THE DRAWINGS
[0067] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments recorded in the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0068] FIG1 is a schematic diagram of an exemplary application scenario provided by an embodiment of the present disclosure;
[0069] FIG2 is a schematic diagram of a process flow of a buried point processing method provided by an embodiment of the present disclosure;
[0070] FIG3 is a flow chart of a method for determining a second element provided by an embodiment of the present disclosure;
[0071] FIG4 is a schematic diagram of a DOM structure of a page to be analyzed provided by an embodiment of the present disclosure;
[0072] FIG5 is a flow chart of another method for determining a second element provided by an embodiment of the present disclosure;
[0073] FIG6 is a schematic diagram of a DOM structure of a page to be analyzed provided by an embodiment of the present disclosure;
[0074] FIG7 is a schematic diagram of a process flow of a buried point processing method provided by an embodiment of the present disclosure;
[0075] FIG8 is a schematic structural diagram of a buried point processing device provided by an embodiment of the present disclosure; and
[0076] FIG9 is a schematic structural diagram of another buried point processing device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0077] In order to enable those skilled in the art to better understand the solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the embodiments described are only part of the embodiments of the present disclosure, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present disclosure without making any creative efforts shall fall within the scope of protection of the present disclosure.
[0078] The embodiment of the present disclosure provides a method for processing buried points. In one example, the method can be applied to a first client. The first client can display a buried point information configuration page, and the buried point information configuration page can display the first element in the page to be analyzed. The user can trigger a selection operation for the first element in the buried point information configuration page, and accordingly, the first client can obtain the identifier of the first element in response to the selection operation triggered for the first element. Furthermore, based on the identifier of the first element, several second elements in the page to be analyzed are determined, and the second elements are elements of the same type as the first element. Furthermore, the identifier of the first element, the identifier of at least one second element among the several second elements, and the target configuration information configured in the buried point information configuration page are sent to the server, so that the server generates a buried point configuration file corresponding to the page to be analyzed based on the identifier of the first element, the identifier of at least one second element and the target configuration information, and the buried point configuration file is used to collect buried point data for the page to be analyzed. It can be seen that, using this solution, the user can select the first element in the burying point information configuration page. After the user selects the first element, the first client can automatically obtain several similar elements of the first element, so that the server can generate a burying point configuration file for burying point data collection for the page to be analyzed based on the first element, at least one second element and the target configuration information configured in the burying point information configuration page. Using this solution, there is no need for the user to write the corresponding software code, and the corresponding configuration can be made in the visual burying point information configuration page. Moreover, for similar elements, the user only needs to select one of the elements (the first element) in the burying point information configuration page, which effectively reduces the R&D and operation and maintenance costs of burying point analysis for the page to be analyzed.
[0079] Accordingly, the second client can receive the aforementioned tracking configuration file sent by the server. And use the tracking configuration file to perform tracking analysis on the page to be analyzed. In a specific example, the second client can obtain the target event in the page to be analyzed and match the target event with the tracking configuration file. If the target event successfully matches the tracking configuration file, the second client can collect the tracking data corresponding to the target event. Using this solution, tracking analysis of the page to be analyzed can be achieved while consuming less R&D and operation and maintenance costs.
[0080] Various non-limiting embodiments of the present disclosure are described in detail below with reference to the accompanying drawings.
[0081] Referring to FIG1 , FIG1 is a schematic diagram of an exemplary application scenario provided by an embodiment of the present disclosure. As shown in FIG1 , a first client 110 can interact with a server 120. A user can configure burying configuration information on the first client 110. Accordingly, the server 120 generates a corresponding burying configuration file based on the burying configuration information configured by the user on the first client 110, and sends the burying configuration file to a second client 130. The second client can collect burying data based on the burying configuration file and report the collected burying data to the data processing terminal 140.
[0082] Next, the method for processing buried points provided by the embodiment of the present disclosure is introduced.
[0083] See Figure 2, which is a flow chart of a method for processing embedded data provided by an embodiment of the present disclosure. The method for processing embedded data shown in Figure 2 can be applied to a first client. In this embodiment, the method for processing embedded data can include the following steps: S101-S103.
[0084] S101: In response to a selection operation triggered on a first element in a tracking point information configuration page, an identifier of the first element is obtained, where the first element is an element in a page to be analyzed.
[0085] The first client may display a tracking information configuration page, which may be a page corresponding to the tracking configuration platform. The user may use the tracking configuration platform to visually configure tracking configuration information for the page to be analyzed, thereby facilitating tracking data collection for the page to be analyzed.
[0086] In an embodiment of the present disclosure, at least one page element in the page to be analyzed may be displayed in the burying point information configuration page. For example, the page to be analyzed may be displayed in the burying point information configuration page. For another example, at least one page element supporting burying points in the page to be analyzed may be displayed in the burying point information configuration page. The at least one page element may include the first element, or the first element may be one of the at least one page elements.
[0087] In the embodiment of the present disclosure, the user can trigger a selection operation for the first element in the burying point information configuration page. The embodiment of the present disclosure does not specifically limit the specific implementation method of the user triggering the selection operation for the first element. For example, the user can circle the first element in the burying point information configuration page, or the user can trigger a double-click operation for the first element in the burying point information configuration page, etc., which are not listed here one by one.
[0088] After the user triggers a selection operation on the first element, the first client can obtain an identifier of the first element in response to the selection operation triggered on the first element, wherein the identifier of the first element is used to uniquely identify the first element in the page to be analyzed.
[0089] In one example, the identifier of the first element may be the path position of the first element. The path position may include path information and first position information.
[0090] The path information is used to indicate the element path of the first element. In one example, the element path of the first element may include N levels, where N is an integer greater than 1. For example, the element path of the first element is: / body / ... / tbody / tr / td / div / span, where span is the tag name of the first element.
[0091] The first position information is used to indicate the number corresponding to the tag name of the first element at each level. Taking the first level among multiple levels as an example, the first level may include at least one element with a tag name. The number corresponding to the tag name of the first element at the first level may be the number of the at least one element with a tag name included in the first level. For example: if the first level includes only one element with a tag name, that is, no other element in the first level has the same tag name as the first element, then the number corresponding to the tag name of the first element at the first level may be 0. For another example: if the first level includes two elements with tag names, that is, there is another element in the first level with the same tag name as the first element, then the number corresponding to the tag name of the first element at the first level may be 0 or 1. If the element path of the first element is: / body / ... / tbody / tr / td / div / span, the first position information may be, for example: ['0',...,'0','1','3','0','0'].
[0092] In yet another example, the identifier of the first element may be a first Cascading Style Sheets Selector (CSS Selector) of the first element.
[0093] In one example, considering web pages, some web page elements may be more appropriately identified by path location, while others may be more appropriately identified by CSS Selector. Therefore, in one example, a first client may obtain the path location and a first CSS Selector of a first element, and display the path location and the first CSS Selector of the first element, allowing the user to select one of the path location and the first CSS Selector as the identifier of the first element.
[0094] S102: Determine a plurality of second elements in the page to be analyzed according to the identifier of the first element, where the second elements are elements of the same type as the first element.
[0095] In the embodiment of the present disclosure, it is considered that the page to be analyzed may include many similar elements, and in some scenarios, the user's tracking requirements for similar elements are the same or similar. Therefore, in the embodiment of the present disclosure, in order to improve the efficiency of users in setting tracking configuration information, after the user triggers a selection operation for the first element, the first client can automatically obtain similar elements of the first element in the page to be analyzed based on the identifier of the first element, and obtain several second elements, without the user having to trigger the selection operation for similar elements of the first element one by one in the tracking information configuration page.
[0096] In one example, the first client may enable the "automatic acquisition of similar elements" function by default. In this case, after obtaining the identifier of the first element, the first client may determine a number of second elements according to the identifier of the first element.
[0097] In another example, the user can determine whether to enable the "automatic acquisition of similar elements" function. In a specific example, the user can trigger the automatic acquisition of similar elements in the buried point information configuration page. Accordingly, after obtaining the identifier of the first element, the first client can respond to the automatic acquisition of similar elements and further determine a number of second elements. Among them, the user triggers the automatic acquisition of similar elements in the buried point information configuration page, which can be understood as the user enabling the aforementioned "automatic acquisition of similar elements" function.
[0098] As mentioned above, the identifier of the first element can be the path position of the first element or the first CSS Selector of the first element. When the identifier of the first element is the path position of the first element, the specific implementation of S102 can refer to the description of S1021-S1022 below, which is not described in detail here. When the identifier of the first element is the first CSS Selector of the first element, the specific implementation of S102 can refer to the specific description of S1023-S1025 below, which is not described in detail here.
[0099] S103: Send the identifier of the first element, the identifier of at least one second element among several second elements, and the target configuration information configured in the burying point information configuration page to the server, so that the server generates a burying point configuration file corresponding to the page to be analyzed based on the identifier of the first element, the identifier of at least one second element and the target configuration information. The burying point configuration file is used to collect burying point data for the page to be analyzed.
[0100] In one example, after the first client determines several second elements, it can display several second elements, and the user can select at least one second element that actually needs to be buried from the several second elements, thereby meeting the user's personalized burying needs.
[0101] As mentioned above, at least one page element in the page to be analyzed can be displayed in the buried point information configuration page. In one example, when the first client displays several elements, it can display several second elements in a specific style during the specific implementation, wherein the specific style is different from the display style of other page elements in at least one page element. For example, a selection mark (such as a box) is displayed around the periphery of several second elements. Accordingly, the user can select at least one second element from the several second elements displayed in a specific style.
[0102] In another example, the first client can display at least one combination of similar elements in the form of a drop-down menu, wherein each combination can include at least one second element. In a specific example, the user can trigger a first operation (such as a click operation) in the similar element input area, and the first client can respond to the first operation and display at least one similar element combination in the form of a drop-down menu (for example, display the name of at least one similar element combination). The user can trigger a second operation (such as a hover operation or a click operation) for the first similar element combination in at least one similar element combination, and the first client can display the second elements included in the first similar element combination in a specific style, so that the user can determine which second elements the first similar element combination includes. Accordingly, the user can select one or more combinations from the drop-down menu to select at least one second element.
[0103] Regarding the first similar element combination, it should be noted that the first similar element combination may include one or more second elements. If several second elements are determined using S1021-S1022 mentioned below, the second element in the first similar element combination may be determined based on the second position information corresponding to a certain level. When several second elements are determined using S1023-S1025 mentioned below, the second element in the first similar element combination may be determined based on the CSS Selector to be selected determined by a certain round of iteration.
[0104] After the first client determines at least one second element, it may obtain an identifier of the second element. For the identifier of the second element, reference may be made to the above description of the identifier of the first element, which will not be repeated here.
[0105] In the disclosed embodiment, in addition to selecting the first element on the tracking point information configuration page, the user may also enter other configuration information on the tracking point information configuration page. In one example, the user may also enter target configuration information on the tracking point information configuration page. The target configuration information is other configuration information used to collect tracking point data for the page to be analyzed. Accordingly, the first client may obtain the target configuration information.
[0106] As an example, the target configuration information may include one or more of the event type corresponding to the embedded data collection, the triggering condition for the embedded data collection, and the attribute value corresponding to the embedded element.
[0107] The event type may include any event type that occurs on a web page, for example, the event type may include a click event, an exposure event, a browsing event, etc.;
[0108] A trigger condition can be a condition that must be met to collect tracking data. For example, a trigger condition may include collecting data corresponding to a specific uniform resource locator (URL); another example may include collecting corresponding tracking data only when the dwell time exceeds a preset time threshold, etc., and the examples are not listed here one by one.
[0109] The attribute value corresponding to the buried point element can be determined according to the actual business scenario. In a specific example, the attribute value corresponding to the buried point element may include the text corresponding to the buried point element, preset system variables and business information. The embodiment of the present disclosure does not specifically limit the preset system variables. The preset system variables include but are not limited to: timestamp, text title, and one or more of the page URL. Business information can be obtained through the business interface. For example, the business request sent or received through the business interface can be obtained, and the business information is determined based on the request method, URL, request body, response body and other data included in the business request.
[0110] After obtaining the identifier of the first element, the identifier of at least one second element, and the target configuration information, the first client can send the identifier of the first element, the identifier of at least one second element, and the target configuration information to the server. After the server receives the identifier of the first element, the identifier of at least one second element, and the target configuration information sent by the first client, it can generate a burying point configuration file corresponding to the page to be analyzed based on the identifier of the first element, the identifier of at least one second element, and the target configuration information. The burying point configuration file is used to collect burying point data for the page to be analyzed. In one example, the server can generate a burying point configuration file in a specific format based on the identifier of the first element, the identifier of at least one second element, and the target configuration information. The burying point configuration file includes the identifier of the first element, the identifier of at least one second element, and the target configuration information.
[0111] In one example, after the server generates the tracking configuration file, it can send the tracking configuration file to the second client, so that the second client can use the tracking configuration file to collect tracking data for the page to be analyzed.
[0112] From the above description, it can be seen that with this solution, users do not need to write corresponding software code, and can make corresponding configurations in the visual tracking information configuration page. Moreover, for the same type of elements, users only need to select one of the elements (the first element) in the tracking information configuration page, which effectively reduces the R&D and operation and maintenance costs of tracking analysis on the page to be analyzed.
[0113] Next, two implementations of S102 are introduced with reference to FIG. 3 to FIG. 6 .
[0114] 3, which is a flow chart of a method for determining a second element according to an embodiment of the present disclosure. The method shown in FIG3 may include, for example, the following steps S1021-S1022.
[0115] S1021: Replace the first number in the first location information with a preset path wildcard to obtain second location information, where the preset path wildcard indicates to ignore the first number.
[0116] As mentioned above, the element path of the first element includes N levels, so the first position information includes N numbers, and the first number can be one of the N numbers.
[0117] In one example, a number may be randomly selected from N numbers as the first number.
[0118] In another example, to identify as many similar elements as possible for the first element, the numbers corresponding to each of the N levels in the first location information may be replaced with a preset path wildcard in a preset order, thereby obtaining second location information corresponding to each level. The present disclosure does not specifically limit the preset order; the preset order may be from lower levels to higher levels, or from higher levels to lower levels.
[0119] In an embodiment of the present disclosure, a preset path wildcard is used to indicate that the first number is ignored. In one example, the preset wildcard may be the character “*”.
[0120] S1022: Determine a plurality of second elements according to the second location information and the path level.
[0121] After determining the second location information and the path hierarchy, a plurality of second elements can be determined based on the second location information and the path hierarchy. Specifically, the elements in the page to be analyzed can be traversed, and an element whose element path is the same as the element path of the first element and whose location information is the second location information can be determined as the second element.
[0122] S1021 - S1022 are now described with reference to FIG4 .
[0123] As shown in Figure 4, Figure 4 is a schematic diagram of the DOM structure of a page to be analyzed provided by an embodiment of the present disclosure. The first element corresponds to node 401, the path information of the first element is: / body / ... / tbody / tr / td / div / span, and the first position information is ['0',..., '0', '1', '3', '0', '0']. Then, in order from low level to high level, the second position information corresponding to each level is obtained in sequence. As shown in Figure 4, second position information 410, 420, 430, 440, 450 and 460 can be obtained, and at least one second element is obtained based on the position information and path information corresponding to each level.
[0124] 5 , which is a flow chart of another method for determining a second element provided by an embodiment of the present disclosure. The method shown in FIG5 , for example, may include the following steps S1023 - S1025 .
[0125] S1023: Determine a CSS Selector to be selected according to the first CSS Selector.
[0126] In one example, a CSS Selector that inherits from the first CSS Selector can be determined as the candidate CSS Selector. The CSS Selector that inherits from the first CSS Selector mentioned here refers to a CSS Selector that has a direct or indirect parent-child relationship with the first CSS Selector. For example, the first parent CSS Selector can be determined as the candidate CSS Selector. For another example, the second parent CSS Selector of the first parent CSS Selector, or the third parent CSS Selector of the second parent CSS Selector, can be determined as the candidate CSS Selector.
[0127] In another example, in order to determine as many similar elements as possible of the first element, M rounds of iterations may be performed to determine the corresponding candidate CSS Selectors for each round of iterations. M is an integer greater than 1.
[0128] In the first iteration, the parent CSS Selector of the first CSS Selector may be determined as the CSS Selector to be selected corresponding to the first iteration.
[0129] In the i-th iteration, the candidate CSS Selector corresponding to the i-th iteration can be determined based on the candidate CSS Selector determined in the i-1-th iteration. In one example, a CSS Selector that inherits from the candidate CSS Selector corresponding to the i-1-th iteration can be determined as the CSS Selector corresponding to the i-th iteration. Here, i is an integer greater than 1 and less than or equal to M.
[0130] S1024: Determine a relative CSS Selector between the first CSS Selector and the CSS Selector to be selected.
[0131] After determining the CSS Selector to be selected, a relative path may be calculated based on the first CSS Selector and the CSS Selector to be selected to obtain a relative CSS Selector, wherein the relative CSS Selector may also be referred to as a relative fragment Selector.
[0132] S1025: Determine a plurality of second elements according to the to-be-selected CSS Selector and the relative CSS Selector.
[0133] After the relative CSS Selector is determined, at least one second CSS Selector whose relative path to the selected CSS Selector is the relative CSS Selector can be determined based on the selected CSS Selector and the relative CSS Selector, and an element corresponding to the at least one second CSS Selector is determined as the second element, thereby obtaining a plurality of second elements.
[0134] S1023 - S1025 are now described with reference to FIG6 , which is a schematic diagram showing a DOM structure of a page to be analyzed.
[0135] As shown in Figure 6 , the first element corresponds to node 601 in Figure 6 . In the first iteration, the parent CSS Selector of the first CSS Selector is determined as the candidate CSS Selector. Accordingly, the second element is determined based on the candidate CSS Selector corresponding to the first iteration. The parent CSS Selector of the first CSS Selector corresponds to node 610 in Figure 6 .
[0136] In the second iteration, according to the CSS Selector of node 610, the CSS Selector corresponding to node 620 is determined as the candidate CSS Selector. Accordingly, the second element is determined based on the candidate CSS Selector corresponding to the second iteration.
[0137] Next, the specific implementation method of the second server to collect the buried data of the page to be analyzed is introduced. See Figure 7, which is a flow chart of a buried data processing method provided by an embodiment of the present disclosure. The method shown in Figure 7 can be applied to the second client. In an example, the method may include, for example, the following S201-S203.
[0138] S201: Receive the tracking configuration file sent by the server.
[0139] For more information about the tracking configuration file, please refer to the previous section for details. I will not repeat them here.
[0140] S202: Obtain a target event in the page to be analyzed, and match the target event with a tracking configuration file.
[0141] S203: When the target event successfully matches the tracking configuration file, collecting tracking data corresponding to the target event.
[0142] In one example, the second client can use the corresponding event acquisition instance to obtain the event that occurs in the page to be analyzed. After obtaining the target event in the page to be analyzed, the target event can be matched with the tracking configuration file. In one example, the second client can go through the configuration information in the tracking configuration file one by one, and match the configuration information with the target event. As an example, the event type corresponding to the tracking data collection in the configuration information is matched with the target event. If the event type included in the configuration information includes the event type of the target event, it can be further determined whether the trigger condition included in the configuration information is met. If the trigger condition is met, it can be determined that the target event is successfully matched with the tracking configuration file. Otherwise, it can be determined that the target event fails to match the tracking configuration file.
[0143] After determining that the target event successfully matches the burying point configuration file, the burying point data corresponding to the target event can be further collected. In one example, the burying point data that needs to be collected can be determined based on the attribute value of the burying point element corresponding to the target event in the burying point configuration file, and the burying point data can be further collected.
[0144] In one example, after collecting the buried point data, the second client can report the buried point data to another data processing terminal, which then processes the buried point data. The data processing terminal mentioned here can be a data warehouse for storing data or a server for analyzing data, and the embodiments of this disclosure do not specifically limit this.
[0145] Next, taking the exposure event as an example, the specific implementation method of S202-S203 is introduced.
[0146] The second client uses the first callback function to loop through the tracking information in the tracking configuration file, which includes the identifier of the first element, and parses the DOM instance corresponding to the first element. It determines whether the DOM instance corresponding to the first element is exposed according to the second callback function. If the DOM instance corresponding to the first element has been exposed, it continues to judge whether other trigger conditions corresponding to the first element are met, for example, whether one or more factors such as URL, exposure frequency, exposure duration and exposure ratio are met. If other trigger conditions are met, data corresponding to the first element is collected according to the attribute value of the first element, and the data is reported to the data processing end.
[0147] Based on the methods provided in the above embodiments, an embodiment of the present disclosure further provides a device, which is described below in conjunction with the accompanying drawings.
[0148] 8 , which is a schematic diagram of a structure of a buried point processing device provided by an embodiment of the present disclosure. The device 800 shown in FIG8 includes: a first acquiring unit 801 , a determining unit 802 , and a sending unit 803 .
[0149] A first acquiring unit 801 is configured to acquire an identifier of a first element in response to a selection operation triggered on a first element in a tracking information configuration page, where the first element is an element in a page to be analyzed;
[0150] The determining unit 802 is configured to determine a plurality of second elements in the page to be analyzed based on the identifier of the first element, where the second elements are similar elements to the first element;
[0151] The sending unit 803 is configured to send the identifier of the first element, the identifier of at least one second element among several second elements, and the target configuration information configured in the burying point information configuration page to the server, so that the server generates a burying point configuration file corresponding to the page to be analyzed based on the identifier of the first element, the identifier of at least one second element and the target configuration information. The burying point configuration file is used to collect burying point data for the page to be analyzed.
[0152] Optionally, the identifier of the first element includes a path position of the first element, the path position includes path information and first position information, the path information indicates that the element path of the first element includes N levels, N is an integer greater than 1, and the first position information indicates the numbers corresponding to the tag name of the first element at each level, wherein the N levels include the first level, the first level includes at least one element with a tag name, and the number corresponding to the tag name of the first element at the first level indicates the number of the first element in the at least one element with the tag name. The determining unit 802 is configured to:
[0153] Replacing the first number in the first location information with a preset path wildcard to obtain second location information, where the preset path wildcard indicates to ignore the first number;
[0154] A plurality of second elements are determined according to the second position information and the path information.
[0155] Optionally, the first number in the first location information is replaced with a preset path wildcard to obtain the second location information, including:
[0156] According to the preset order, the numbers corresponding to each level in the first position information of the N levels are replaced with preset path wildcards in turn to obtain the second position information corresponding to each level, and the numbers corresponding to each level in the first position information include the first number.
[0157] Optionally, the identifier of the first element includes a first cascading style sheet selector of the first element, and the determining unit 802 is configured to:
[0158] Determine a cascading style sheet selector to be selected according to the first cascading style sheet selector;
[0159] Determining a relative CSS path between the first CSS selector and the selected CSS selector;
[0160] A plurality of second elements are determined according to the to-be-selected cascading style sheet selector and the relative cascading style sheet selector.
[0161] Optionally, determining a cascading style sheet selector to be selected according to the first cascading style sheet selector includes:
[0162] After M rounds of iteration, the corresponding cascading style sheet selector to be selected for each round of iteration is determined, where M is an integer greater than 1; wherein:
[0163] In the first iteration, the first parent cascading style sheet selector of the first cascading style sheet selector is determined as the cascading style sheet selector to be selected corresponding to the first iteration;
[0164] In the i-th iteration, the cascading style sheet selector that has an inheritance relationship with the candidate cascading style sheet selector determined in the i-1-th iteration is determined as the candidate cascading style sheet selector corresponding to the i-th iteration, where i is an integer greater than 1 and less than or equal to M.
[0165] Optionally, the determining unit 802 is configured to:
[0166] In response to the automatic acquisition operation of similar elements triggered in the tracking point information configuration page, several second elements in the page to be analyzed are determined based on the identifier of the first element.
[0167] Optionally, the apparatus 800 further includes:
[0168] a display unit configured to display a plurality of second elements;
[0169] The second acquiring unit is configured to acquire an identifier of at least one second element in response to a selection operation triggered on at least one second element among the plurality of elements.
[0170] Optional target configuration information, including one or more of the following:
[0171] The event type corresponding to the buried data collection, the triggering conditions for the buried data collection, and the attribute values corresponding to the buried element, where the buried element includes a first element and at least one second element.
[0172] Since the device 800 is a device corresponding to the point-of-use processing method provided by the above method embodiment and executed by the first client, the specific implementation of each unit of the device 800 is based on the same concept as the above method embodiment. Therefore, regarding the specific implementation of each unit of the device 800, you can refer to the relevant description part of the above method embodiment and will not repeat it here.
[0173] 9 , which is a schematic diagram of the structure of another buried point processing device provided by an embodiment of the present disclosure. The device 900 includes: a receiving unit 901 , an acquiring unit 902 , and a collecting unit 903 .
[0174] The receiving unit 901 is configured to receive a tracking configuration file sent by the server, where the tracking configuration file is the tracking configuration file in the above method embodiment;
[0175] The acquisition unit 902 is configured to acquire a target event in the page to be analyzed and match the target event with a tracking configuration file;
[0176] The collection unit 903 is configured to collect the tracking data corresponding to the target event when the target event successfully matches the tracking configuration file.
[0177] Since the device 900 is a device corresponding to the point-of-use processing method provided by the above method embodiment and executed by the second client, the specific implementation of each unit of the device 900 is based on the same concept as the above method embodiment. Therefore, regarding the specific implementation of each unit of the device 900, you can refer to the relevant description part of the above method embodiment and will not repeat it here.
[0178] The embodiment of the present disclosure further provides a buried point processing device, the buried point processing device including a processor and a memory;
[0179] The processor is configured to execute instructions stored in the memory to cause the device to perform the tracking processing method provided in the above method embodiment. For example, the device may be caused to perform the tracking processing method provided in the above method embodiment and performed by the first client; or, for another example, the device may be caused to perform the tracking processing method provided in the above method embodiment and performed by the second client.
[0180] The present disclosure provides a computer-readable storage medium including instructions for instructing a device to execute the tracking method provided in the above method embodiments. For example, the instructions instruct the device to execute the tracking method provided in the above method embodiments and executed by a first client; or, in another example, the instructions instruct the device to execute the tracking method provided in the above method embodiments and executed by a second client.
[0181] The present disclosure also provides a computer program product that, when executed on a computer, causes the computer to execute the tracking method provided in the above method embodiments. For example, the computer program product causes the computer to execute the tracking method provided in the above method embodiments and executed by the first client; or, for another example, causes the computer to execute the tracking method provided in the above method embodiments and executed by the second client.
[0182] Other embodiments of the present disclosure will readily occur to those skilled in the art after considering the specification and practicing the embodiments disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of the present disclosure that follow from the general principles of the present disclosure and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered as exemplary only, with the true scope and spirit of the present disclosure being indicated by the following claims.
[0183] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes can be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
[0184] The above description is only a preferred embodiment of the present disclosure and is not intended to limit the present disclosure. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present disclosure should be included in the scope of protection of the present disclosure.
Claims
1. A method for processing buried points, comprising: In response to a selection operation triggered on a first element in a tracking point information configuration page, obtaining an identifier of the first element, wherein the first element is an element in a page to be analyzed; Determine, according to the identifier of the first element, a plurality of second elements in the page to be analyzed, wherein the second elements are elements of the same type as the first element; The identifier of the first element, the identifier of at least one of the plurality of second elements, and the target configuration information configured in the burying point information configuration page are sent to the server, so that the server generates a burying point configuration file corresponding to the page to be analyzed based on the identifier of the first element, the identifier of at least one second element, and the target configuration information, wherein the burying point configuration file is used to collect burying point data for the page to be analyzed.
2. The method according to claim 1, wherein: The identifier of the first element includes the path position of the first element, the path position includes path information and first position information, the path information indicates that the element path of the first element includes N levels, N is an integer greater than 1, and the first position information indicates the numbers corresponding to the tag name of the first element at each of the levels, wherein the N levels include the first level, the first level includes at least one element with the tag name, the number corresponding to the tag name of the first element at the first level indicates the number of the first element in the at least one element with the tag name, and determining the plurality of second elements in the page to be analyzed according to the identifier of the first element includes: Replacing the first number in the first location information with a preset path wildcard to obtain second location information, wherein the preset path wildcard indicates to ignore the first number; The plurality of second elements are determined according to the second position information and the path information.
3. The method according to claim 2, wherein: The step of replacing the first number in the first location information with a preset path wildcard to obtain the second location information includes: In accordance with a preset order, the numbers corresponding to each level in the N levels in the first location information are replaced with preset path wildcards in turn to obtain the second location information corresponding to each level, wherein the numbers corresponding to each level in the first location information include the first number.
4. The method according to claim 1, wherein: The identifier of the first element includes a first cascading style sheet selector of the first element, and determining a plurality of second elements in the to-be-analyzed page according to the identifier of the first element includes: Determining a cascading style sheet selector to be selected according to the first cascading style sheet selector; Determining a relative CSS path between the first CSS selector and the CSS selector to be selected; The plurality of second elements are determined according to the to-be-selected cascading style sheet selector and the relative cascading style sheet selector.
5. The method according to claim 4, wherein: The step of determining a cascading style sheet selector to be selected according to the first cascading style sheet selector comprises: The cascading style sheet selector to be selected corresponding to each iteration is determined after M rounds of iteration, where M is an integer greater than 1; wherein: In the first iteration, the first parent cascading style sheet selector of the first cascading style sheet selector is determined as the to-be-selected cascading style sheet selector corresponding to the first iteration; In the i-th round of iteration, a cascading style sheet selector having an inheritance relationship with the candidate cascading style sheet selector determined in the i-1-th round of iteration is determined as the candidate cascading style sheet selector corresponding to the i-th round of iteration, wherein i is an integer greater than 1 and less than or equal to M.
6. The method according to claim 1, wherein: The acquiring, according to the identifier of the first element, a plurality of second elements in the page to be analyzed includes: In response to an automatic acquisition operation of similar elements triggered in the embedding information configuration page, a number of second elements in the page to be analyzed are determined according to the identifier of the first element.
7. The method according to any one of claims 1 to 6, further comprising: displaying the plurality of second elements; In response to a selection operation triggered on the at least one second element among the plurality of elements, an identifier of the at least one second element is obtained.
8. The method according to any one of claims 1 to 7, wherein: The target configuration information includes one or more of the following: The event type corresponding to the buried data collection, the triggering condition of the buried data collection, and the attribute value corresponding to the buried element, and the buried element includes the first element and the at least one second element.
9. A method for processing buried points, comprising: Receive a tracing configuration file sent by the server, wherein the tracing configuration file is the tracing configuration file described in any one of claims 1 to 8; Obtaining a target event in the page to be analyzed, and matching the target event with the embedding configuration file; When the target event successfully matches the tracking configuration file, the tracking data corresponding to the target event is collected.
10. A buried point processing device, comprising: A first acquisition unit is configured to acquire an identifier of a first element in response to a selection operation triggered on a first element in a burying point information configuration page, where the first element is an element in a page to be analyzed; a determining unit configured to determine, according to the identifier of the first element, a plurality of second elements in the to-be-analyzed page, the second elements being elements of the same type as the first element; as well as The sending unit is configured to send the identifier of the first element, the identifier of at least one of the plurality of second elements, and the target configuration information configured in the burying point information configuration page to the server, so that the server generates a burying point configuration file corresponding to the page to be analyzed based on the identifier of the first element, the identifier of at least one second element and the target configuration information, wherein the burying point configuration file is used to collect burying point data for the page to be analyzed.
11. A buried point processing device, comprising: A receiving unit, configured to receive a burying point configuration file sent by a server, wherein the burying point configuration file is the burying point configuration file described in any one of claims 1 to 8; an acquisition unit, configured to acquire a target event in the page to be analyzed, and match the target event with the embedding configuration file; and The collection unit is configured to collect the burying point data corresponding to the target event when the target event successfully matches the burying point configuration file.
12. A buried point processing device, comprising a processor and a memory; in, The processor is configured to execute instructions stored in the memory so that the device performs the method according to any one of claims 1 to 9.
13. A computer-readable storage medium comprising instructions, wherein: The instructions instruct the device to execute the method according to any one of claims 1 to 9.
Citation Information
Patent Citations
Method and system for acquiring interactive data
CN110059282A
Method and device for identifying similar elements and computing equipment
CN110187880A
Application burying point method, device, computing equipment and system
CN110196953A
Application point burying method, device, calculation equipment and system
CN113127771A
Burial point configuration method and device, electronic equipment and storage medium
CN114185795A
