WO2017167042A1 - Statistical method and apparatus for behaviors of front-end users - Google Patents

Statistical method and apparatus for behaviors of front-end users Download PDF

Info

Publication number
WO2017167042A1
WO2017167042A1 PCT/CN2017/077244 CN2017077244W WO2017167042A1 WO 2017167042 A1 WO2017167042 A1 WO 2017167042A1 CN 2017077244 W CN2017077244 W CN 2017077244W WO 2017167042 A1 WO2017167042 A1 WO 2017167042A1
Authority
WO
WIPO (PCT)
Prior art keywords
page
file
end user
burying
rule
Prior art date
Application number
PCT/CN2017/077244
Other languages
French (fr)
Chinese (zh)
Inventor
罗健
Original Assignee
阿里巴巴集团控股有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 阿里巴巴集团控股有限公司 filed Critical 阿里巴巴集团控股有限公司
Publication of WO2017167042A1 publication Critical patent/WO2017167042A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/535Tracking the activity of the user
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0201Market modelling; Market analysis; Collecting market data

Definitions

  • the present invention relates to the field of data processing technologies, and in particular, to a front-end user behavior statistics method and apparatus.
  • the user's click behavior is usually recorded by burying the page.
  • the page burying point is an operation of collecting user access and clicking data through a scripting language (JavaScript, JS for short).
  • JavaScript JavaScript
  • JS scripting language
  • the specified button is manually buried, and the user's behavior is counted based on the click operation of the designated button.
  • the process of manually burying the points is cumbersome and has a problem of poor convenience.
  • the invention provides a front-end user behavior statistics method and device, which are used to solve the problem that the manual burying process is relatively cumbersome and convenient when the page is globally statistic.
  • the present invention provides a front-end user behavior statistics method, including:
  • the page click event of the page is monitored
  • the behavior data of the front end user of the page is counted according to the buried point rule.
  • the present invention provides a front-end user behavior statistics device, including:
  • the obtaining module is configured to obtain a burying rule preset for the page
  • a monitoring module configured to monitor a page click event of the page during the running of the page
  • the statistic module is configured to collect behavior data of the front end user of the page based on the burying point rule after the page click event is monitored.
  • the front-end user behavior statistics method and device acquires a burying rule preset for a page, monitors a page click event of a page during a page running process, and monitors a page click event based on a burying point
  • the rules count the behavior data of the front-end users of the page.
  • the burying rule is set for the page first, and the burying point is triggered by the page click event when the page is running, which solves the problem that the existing manual burying point is cumbersome and convenient.
  • the problem, and the ability to global statistics on the behavior of the front-end users of the page the statistical efficiency is higher.
  • FIG. 1 is a schematic flowchart of a front-end user behavior statistics method according to Embodiment 1 of the present invention
  • FIG. 2 is a schematic flowchart of a front-end user behavior statistics method according to Embodiment 2 of the present invention
  • FIG. 3 is a schematic flowchart of a front-end user behavior statistics method according to Embodiment 3 of the present invention.
  • FIG. 4 is a schematic flowchart of a front-end user behavior statistics method according to Embodiment 4 of the present invention.
  • FIG. 5 is a schematic flowchart of a front-end user behavior statistics method according to Embodiment 5 of the present invention.
  • FIG. 6 is a schematic structural diagram of a front-end user behavior statistics apparatus according to Embodiment 6 of the present invention.
  • FIG. 7 is a schematic structural diagram of a front-end user behavior statistics apparatus according to Embodiment 7 of the present invention.
  • FIG. 1 it is a schematic flowchart of a front-end user behavior statistics method according to Embodiment 1 of the present invention.
  • the front-end user behavior statistics method includes:
  • a burying rule is set for the page in advance, specifically, all the controls of the page are acquired, and burying rules are set for different controls according to statistical requirements.
  • burying rules are set for different controls according to statistical requirements.
  • the buried point rule defines a buried point object of the page, and a statistical strategy corresponding to the buried point object is set.
  • the burying rule of the page needs to be obtained. Specifically, when the page is started, the burying rule is loaded into the business file of the page.
  • the business file of the page is the business process flow of the page.
  • the business file of the page can be executed, that is, the business process of the page is started, and during the process of executing the process, the page click event belonging to the page is monitored. That is to say, when the current end user clicks on the webpage, a page click event can be triggered, and the corresponding business file of the page can monitor the click event of the page.
  • the page is buried, and when the page is loaded, the page's business file is loaded, and the corresponding point burying rule is loaded at the same time, and the function of burying the point is opened accordingly, and all the controls under the page are Page click events are monitored.
  • the target object corresponding to the page click event is determined. Further, after the target object is determined, it is necessary to determine whether the target object starts to bury the point.
  • the object that opens the buried point is defined in the burying rule, and the object of the burying point may be a button label or other specified label and the like.
  • the burying point rule defines a statistical strategy corresponding to the burying point object and the burying point object.
  • Two options for burying a point to open a buried point are as follows:
  • the buried point object is turned on for buried point recording.
  • the burying point is automatically turned on for all the button labels and the like that belong to the page.
  • each buried point object has a corresponding statistical strategy under the page. If the statistical strategy of the buried object is not empty, it indicates that the target object has a buried point, and the behavior data of the front-end user can be based on the statistical policy of the target object. Perform statistics. If the target object's statistical policy is empty, indicating that the target object does not open the buried point, the target object is not counted.
  • the target object When it is determined that the target object has opened the burying point, it indicates that the target object can be buried and recorded, and the button, time and coordinates of the click event are optionally recorded, wherein the coordinates of the click event are positions in the page, which may also be referred to as coordinates. Further, obtaining a statistical strategy of the target object, according to the statistical policy, performing statistics on the buried point record of the target object, that is, performing statistics on the location of the click, the click event, the user ID, and the module to which the control belongs, so that Get behavior data to front-end users.
  • the control type is a button class, that is, the corresponding HTML tag is (button/a/span)
  • the position of the control, the click time, the user ID, the module to which the control belongs, and the application to which the current operation belongs may be recorded, if the page is clicked.
  • the event triggers a background request, the background request Uniform Resource Locator (URL), the time of the background request, and the background request are recorded. Success and other information.
  • the statistical policy corresponding to the control is obtained according to the control and the control type of the control, and then the statistics are calculated according to the statistical policy.
  • User behavior data for this control In the process of using the page, the user behavior of the front-end user can be supervised based on the burying rule, so that the behavior data of the front-end user when using the page can be statistically obtained.
  • the front-end user behavior statistics method obtains a burying rule pre-set for the page, monitors the page click event of the page during the running of the page, and monitors the page click event based on the burying rule. Count the behavior data of the front-end users of the page.
  • the burying rule is set for the page first, and the burying point is triggered by the page click event when the page is running, which solves the problem that the existing manual burying point is cumbersome and convenient. The problem, and the ability to global statistics on the behavior of the front-end users of the page, the statistical efficiency is higher.
  • FIG. 2 it is a schematic flowchart of a front-end user behavior statistics method according to Embodiment 2 of the present invention.
  • the front-end user behavior statistics method provided by this embodiment needs to be performed on the basis of modularizing the front end of the page.
  • the front-end user behavior statistics method includes:
  • the page has gradually become an Internet application.
  • the JS code embedded in the web page is getting larger and larger, more and more complicated, and the page is more and more More like a desktop application, it requires division of labor, progress management, unit testing, and so on.
  • developers can program the front end of the page based on modularity.
  • the purpose of front-end modularization of the page is to enable multi-person collaborative development of the page, improve page development speed and reduce maintenance difficulty.
  • a burying rule is configured in advance for the corresponding module of the page. Specifically, all the controls, control types, and modules to which the controls belong are acquired. Since different modules can set different burying rules, a burying rule can also be set globally. Get the type of the control that needs to be buried, set the corresponding burying rule for the control type, and categorize the burying rules of the control type belonging to the same module into a file to form the burying rule of the module.
  • S203 Perform a service page to execute a page, and listen to a page click event in the running process.
  • the service of the corresponding module of the page needs to be obtained before the page is run.
  • the file where the business file is the business process flow of the corresponding module of the page. Execute the business file, that is, run the business process of the module corresponding to the page. In this embodiment, when the service file is executed, the burying rule of the corresponding module of the page is simultaneously loaded.
  • the buried point object defined in the burying point rule may be used. Specifically, when the page corresponding module opens the burying point, the click events of all the controls under the module are monitored, and the corresponding module is tied according to the corresponding module.
  • the fixed burying rule when monitoring the control corresponding to the click event is a buried point control, obtains the behavior data of the front end user of the page.
  • the user behavior of the front-end user can be supervised based on the burying rule, so that the behavior data of the front-end user when using the page can be statistically obtained.
  • the front-end user behavior statistics method provided by this embodiment is based on the modularization of the page, and the burying point rule is configured for the page corresponding module.
  • the corresponding burying rule is obtained, and the business file is executed.
  • the behavior data of the front-end user of the page is obtained, and the global automatic burying of the page is realized, and the global statistics of the user behavior of the front end of the page can be obtained, and the statistical efficiency is high.
  • FIG. 3 it is a schematic flowchart of a front-end user behavior statistics method according to Embodiment 3 of the present invention.
  • the front-end user behavior statistics method provided by this embodiment needs to be performed on the basis of modularizing the front end of the page.
  • the front-end user behavior statistics method includes:
  • the developer modularizes the front end of the page.
  • the service file of the corresponding module of the page needs to be obtained before the page is run.
  • the service file is the service processing flow of the corresponding module of the page.
  • the module corresponding to the page in the modular process writes dependent code files according to the defined dependencies.
  • the business file is analyzed, and the dependent file required for the page corresponding module to run may be determined.
  • the general page corresponding module includes three kinds of dependent files: HyperText Markup Language (HTML) dependent files, Cascading Style Sheets (CSS) dependent files, and JS dependent files.
  • HTML HyperText Markup Language
  • CSS Cascading Style Sheets
  • JS JS dependent files.
  • the dependent file After determining the required dependency file of the corresponding module of the page, the dependent file is loaded.
  • a burying point rule is configured in advance for the page corresponding module, and the burying point object of the module is defined in the burying point rule.
  • the object of the buried point can be a button label or other specified label. While loading the dependent file, you also need to load the burying rules that are configured in advance for the page object module.
  • the service file of the module corresponding to the page is executed, that is, the service processing flow of the corresponding module of the page is executed.
  • the behavior data of the front end user of the page may be obtained based on the burying point object defined in the burying rule.
  • the user can click on the control in the page.
  • the control can be monitored.
  • the control that clicks on the click is a buried object
  • the control can be obtained. Buried record.
  • the burying point rule further includes a statistic strategy of the burying point object, and after obtaining the burying point record of the burying point object, acquiring a statistical strategy of the burying point object, if the statistic strategy of the burying point object is empty, then The buried point record of the buried point object is counted. If a statistical strategy is obtained, the buried point record is counted according to the statistical strategy.
  • the control type is a button class, that is, the corresponding HTML tag is (button/a/span)
  • the position of the control, the click time, the user ID, the module to which the control belongs, and the application to which the current operation belongs may be recorded, if the click event If a background request is triggered, the background request Uniform Resource Locator (URL), the time spent in the background request, and the success of the background request are recorded.
  • the query corresponding to the control is obtained from the background database.
  • the statistical strategy and then the user behavior data of the control is counted according to the statistical strategy.
  • the statistical policy is stored in the background database, so that real-time modification can be performed.
  • the user behavior of the front-end user can be supervised based on the burying rule, so that the behavior data of the front-end user when using the page can be statistically obtained.
  • the front-end user behavior statistics method determines the dependency file required to determine the running of the corresponding module of the page according to the service file of the corresponding module of the page, loads the dependent file, and pre-sets the burying rules for the corresponding module of the page, and executes the service.
  • the file obtains the behavior data of the user at the front end of the page based on the buried point object defined in the burying rule.
  • the embodiment provides a global burying mechanism, and writes a burying rule of the module while loading the dependent file, and can perform statistics on the behavior of the front-end user based on the burying rule, and automatically bury the page on the page, and can implement the page. Global statistics of front-end user behavior, and statistical efficiency is high.
  • FIG. 4 it is a schematic flowchart of a front-end user behavior statistics method according to Embodiment 4 of the present invention.
  • RequireJS is a very small JavaScript module loading framework.
  • the RequireJS framework is selected as the underlying dependency implementation, and on this basis, the front end of the page is modularized.
  • the process of loading a preset burying rule into a service file corresponding to a page includes:
  • the service file of the corresponding module of the page needs to be called before running, where the service file is the service processing flow of the corresponding module of the page.
  • the business file of the corresponding module of the page is loaded based on the RequireJS framework, and the business file is a file JS file written with a JavaScript scripting language and with a JS extension.
  • the business file is parsed to obtain the dependency file of the module.
  • the dependency of the module can be defined, and the developer can write the relevant code file according to the definition of the dependency.
  • the general page module includes three dependent files: HTML dependent files, CSS dependent files, and JS dependent files.
  • RequireJS since RequireJS only supports dependency resolution of JS dependent files, in order to implement parsing of HTML dependent files and CSS dependent files, a third-party plug-in needs to be inserted in the RequireJS framework, so that the RequireJS framework can support parsing HTML dependent files. And CSS dependent files.
  • the dependent file of the module is loaded.
  • the RequireJS framework loads the JS dependency file of the module
  • the business file of the module is directly executed.
  • the module in addition to loading the JS dependent file, the module needs to load the HTML dependent file and the CSS dependent file.
  • the business process flow of the business file of the module is encapsulated based on the RequireJS framework in this embodiment, and the business process flow after the encapsulation will not be executed again. The package will not be executed until it is released.
  • the burying point rule configured in advance for the module is loaded at the same time as the dependent file of the module is loaded.
  • the object of the burying point is opened in the code of the burying rule.
  • the object to be buried can be a button label or other specified label. Specifically, button labels can be applied to all Dom files belonging to the module. (button/span/a) These objects automatically open the burying point so that all the button labels of the module can be used for burying statistics.
  • the template and the rendering of the template are required.
  • the template file is used to perform HTML template rendering and CSS rendering on the business file of the module.
  • the service file of the module After the service file of the module is rendered, the service file of the module needs to be decapsulated, so that the service file of the module can be executed.
  • the business file is executed based on the RequireJS framework.
  • the click behavior of the front-end user is recorded based on the buried point object defined in the burying rule, so that the behavior data of the front-end user can be counted. .
  • RequierJS as the underlying dependency implementation is a complete example herein and is not intended as a limitation of the invention.
  • the front-end user statistics method can also be implemented based on the underlying dependencies such as the SeaJS framework.
  • the front-end user behavior statistics method provided in this embodiment is to parse the service file of the service file acquisition module by loading the service file of the corresponding module of the page, to encapsulate the service processing flow of the service file, and to load the dependency file of the module and the preset point of the module.
  • the rule is to perform HTML template rendering and CSS rendering on the business file, to unpack the business file, and execute the business file to obtain the behavior data of the front end user of the page based on the buried point object statistics defined in the burying rule.
  • This embodiment provides a global burying mechanism, which writes a burying rule of a module while loading a dependent file, and the burying point object based on the burying point rule can perform statistics on the behavior of the front-end user, and automatically bury the page globally. Point, can achieve global statistics on the user behavior of the front end of the page, and the statistical efficiency is high.
  • FIG. 5 it is a schematic flowchart of a front-end user behavior statistics method according to Embodiment 5 of the present invention. Based on the above embodiment, the front-end user behavior statistics method includes the following steps:
  • S501 Listening to a page click event belonging to the page in the process of executing the business file.
  • the business process of the business file can be executed.
  • the business file monitors the page click event of the module corresponding to the subordinate page. That is to say, when the current end user clicks on the webpage, a page click event can be triggered, and the service file corresponding to the module to which the click event belongs can monitor the page click event.
  • the page is modularized, and then the page is buryed by the module.
  • the burying rule configured for the page is loaded at the same time, and the module is opened when the module starts to bury the point. All under The page click event of the control is monitored.
  • the target object corresponding to the page click event is determined.
  • the burying rule preset for the page is loaded at the same time.
  • the burying point rule defines a burying point object corresponding to the page corresponding module, and sets a statistical strategy corresponding to the burying point object.
  • the object that opens the buried point is defined in the code of the buried point rule, and the object of the buried point may be a button label or other specified label and the like.
  • the burying point rule defines a statistical strategy corresponding to the burying point object and the burying point object. There are two options for opening the buried point: one is to open the buried point object for buried point recording when the page is loaded.
  • the buried point is automatically turned on for the buried point object such as the button label in all the Dom files belonging to the page.
  • the statistical strategy of the buried point object is not empty, it indicates that the target object has the buried point function enabled, and the user's behavior data statistics can be performed based on the buried point object. If the target object's statistical policy is empty, indicating that the target object does not have the buried point function enabled, the target object is not counted.
  • S504 Perform a buried point record on the click behavior of the target object, and collect behavior data of the front-end user according to the buried point record and the statistical strategy of the target object.
  • the target object When it is determined that the target object has opened the burying point, it indicates that the target object can be buried and recorded, and the button, time and coordinates of the click event are optionally recorded, wherein the coordinates of the click event are positions in the page, which may also be referred to as coordinates.
  • obtaining a statistical strategy of the target object performing statistics on the buried point record of the target object, that is, performing statistics on the location of the click, the click event, the user ID, and the module to which the control belongs, so that Get behavior data to front-end users.
  • each click behavior of the front-end user corresponds to a request event of the webpage, and each request event has a certain business logic.
  • the click behavior of the target user is recorded, and the click behavior is recorded accordingly.
  • the business logic of the request event is the business logic of the request event.
  • S507. Determine whether a page refresh event or a page close event is detected during the execution of the business file.
  • the behavior data and the service logic are locally saved in the front end.
  • the recorded behavior data and business logic can be written to the log file for storage in batches. That is to say, in the process of recording, the number of times of recording is compared with a preset threshold, and when the number of times of recording exceeds the threshold, the recorded behavior data and business logic are written into the log file in batches.
  • the recorded behavior data and business logic may be sent to the server for storage in batches. After receiving the behavior data and business logic, the server may follow The set data format is written to the log file.
  • the page refresh event and the page close event of the page may be monitored, and when the page refresh event or the page close event is monitored, the recorded behavior data and the business logic are written.
  • the recorded behavior data and business logic are sent to the back-end server for storage.
  • the server After receiving the behavior data and business logic, the server can write to the log file according to the set data format.
  • the log file including the behavior data is analyzed, and based on the statistical behavior data of the front-end user, the operation data of some web pages can be obtained.
  • the number of independent visitors Unique Visitor referred to as UV
  • page views or clicks Page View referred to as PV
  • module heat project heat
  • request time-consuming statistics request success rate
  • specified button statistics specify the module statistics of the page
  • click the heat map of the specified page click the heat map of the specified page, and so on.
  • the results of the analysis can be displayed to the developer of the webpage, and the developer can use the operational data as reference data to provide reference for actual product operation and design troubleshooting, and provide a basis for front-end interaction design.
  • the front-end user behavior statistics method monitors the page click event belonging to the page in the process of executing the business file of the corresponding module of the page, determines the target object corresponding to the page click event, and determines the target object. Whether it is a buried point object defined in the burying rule, when the target object turns on the burying point function, the front end user's click behavior can be buried and recorded, and the front end user's behavior data is counted according to the burying point record.
  • global statistics on the front-end user behavior of the webpage are obtained, and the behavior data of the global page can be obtained, which is convenient for providing reference for the later maintenance or improvement of the page.
  • FIG. 6 is a schematic structural diagram of a front-end user behavior statistics apparatus according to Embodiment 6 of the present invention.
  • the front-end user behavior statistics device includes: an obtaining module 11, a listening module 12, and a statistics module 13.
  • the obtaining module 11 is configured to acquire a burying rule preset for the page.
  • a burying rule is set for the page in advance, specifically, all the controls of the page are acquired, and burying rules are set for different controls according to statistical requirements.
  • burying rules are set for different controls according to statistical requirements.
  • the buried point rule defines a buried point object of the page, and a statistical strategy corresponding to the buried point object is set.
  • the obtaining module 11 needs to obtain the burying rule of the page. Specifically, when the page is started, the obtaining module 11 loads the burying rule into the business file of the page.
  • the business file of the page is the business process flow of the page.
  • the monitoring module 12 is configured to monitor a page click event of the page during the running of the page.
  • the business file of the page can be executed, that is, the business process flow of the page is started.
  • the monitoring module 12 monitors the page click event belonging to the page. That is to say, when the current end user clicks on the webpage, a page click event can be triggered, and the corresponding business file of the page can monitor the click event of the page.
  • the page is buried, and when the page is loaded, the page's business file is loaded, and the corresponding point burying rule is loaded at the same time, and the function of burying the point is opened accordingly, and all the controls under the page are Page click events are monitored by the listening module 12.
  • the statistics module 13 is configured to collect behavior data of the front-end user of the page based on the burying point rule after the page click event is monitored.
  • the statistic module 13 determines the target object corresponding to the page click event. Further, after determining the target object, the statistic module 13 needs to determine whether the target object starts the burying point.
  • the object that opens the buried point is defined in the burying rule, and the object of the burying point may be a button label or other specified label and the like.
  • the statistics module 13 supervises the user behavior of the front-end user based on the statistical policy corresponding to the target object, so that the front-end user can use the statistics. Behavior data at the time.
  • the front-end user behavior statistics device obtains a pre-set burying rule for the page.
  • the page click event of the page is monitored, and after the page click event is monitored, the behavior data of the front end user of the page is counted based on the burying point rule.
  • the burying rule is set for the page first, and the burying point is triggered by the page click event when the page is running, which solves the problem that the existing manual burying point is cumbersome and convenient.
  • the problem, and the ability to global statistics on the behavior of the front-end users of the page the statistical efficiency is higher.
  • FIG. 7 is a schematic structural diagram of a front-end user behavior statistics apparatus according to Embodiment 7 of the present invention.
  • the front-end user behavior statistics device includes: an obtaining module 11, a listening module 12, and a statistics module 13.
  • the statistic module 13 includes an obtaining unit 131, a determining unit 132, a recording unit 133, and a writing unit 134.
  • the obtaining unit 131 is configured to determine a target object corresponding to the page click event that is monitored;
  • the determining unit 132 is configured to determine whether the target object opens a buried point
  • a recording unit 133 configured to: when the determining unit determines that the target object opens a buried point, perform a buried point recording on the click behavior of the target object, and according to the buried point record and the statistical strategy of the target object Statistics of the behavior of the front-end user.
  • the recording unit 133 is further configured to determine a request event corresponding to the click behavior while performing a buried point recording on the click behavior of the target object, and record the business logic of the request event.
  • the writing unit 134 is configured to write the behavior data and the business logic into a log file when the number of times of recording exceeds a threshold.
  • monitoring module 12 is further configured to monitor a page refresh event or a page close event during the running of the page.
  • the writing unit 134 is further configured to write the behavior data and the business logic to the log file when the listening module 12 listens to the page refresh event or the page close event.
  • the behavior data and the service logic are locally saved in the front end.
  • the recorded behavior data and the business logic may be sent to the server in batches when the number of records exceeds the threshold. After saving, after receiving the behavior data and business logic, the server can write to the log file according to the set data format.
  • the recorded behavior data and business logic are sent to the server at the back end for storage.
  • the server can write to the log file according to the set data format.
  • an optional structure of the obtaining module 11 includes: a modular unit 111 and an obtaining unit 112.
  • the modular unit 11 is configured to perform modular processing on the page.
  • the obtaining unit 112 is configured to load the burying rule into a service file of a module corresponding to the page when the page is started.
  • the service file is a service processing flow of the page.
  • An optional structure of the obtaining unit 112 includes: a loading subunit 1121, a parsing subunit 1122, a packaging subunit 1123, a rendering subunit 1124, and a decapsulating subunit 1125.
  • the parsing subunit 1122 is configured to parse the service file to obtain the dependency file.
  • the parsing subunit 1122 is configured to parse the service file after the loading subunit 1121 loads the service file of the page corresponding module to obtain the dependent file of the page corresponding module.
  • the general page module has three dependent file HTML dependent files, CSS dependent files, and JS dependent files.
  • the loading sub-unit 1121 is specifically configured to load a business file of the page, and a burying rule of the business file in the loading page. Further, the loading sub-unit 1121 is specifically configured to load a hypertext markup language HTML dependent file, a cascading style sheet CSS dependent file, and a JS dependent file.
  • the encapsulation subunit 1123 is configured to encapsulate the service file.
  • the packaging subunit 1123 encapsulates the service processing flow of the service file before the loading subunit 1121 loads the dependency file and the burying rule configured in advance for the page corresponding module.
  • the decapsulation subunit 1125 is configured to release the encapsulation of the service file.
  • the decapsulation subunit 1125 releases the encapsulation of the service file.
  • the rendering sub-unit 1124 is configured to perform hypertext markup language HTML template rendering and cascading style sheet CSS rendering on the business file.
  • the business file Before the decapsulation subunit 1125 unpacks the business file, the business file is subjected to HTML template rendering and CSS rendering using a dependency file.
  • the function modules of the front-end user behavior statistics device provided in this embodiment can be used to execute the flow of the front-end user behavior statistics method shown in FIG. 1 to FIG. 5, and the specific working principle is not described here. For details, refer to the description of the method embodiment.
  • a burying rule is configured for the page corresponding module, and when the business file of the page is executed, the corresponding burying rule is obtained, and the burying point is performed in the process of executing the business file.
  • the rule obtains the behavior data of the user at the front end of the page, realizes the global automatic burying of the page, and can globally count the behavior of the user at the front end of the page, and the statistical efficiency is high.
  • the aforementioned program can be stored in a computer readable storage medium.
  • the program when executed, performs the steps including the foregoing method embodiments; and the foregoing storage medium includes various media that can store program codes, such as a ROM, a RAM, a magnetic disk, or an optical disk.

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • Finance (AREA)
  • Accounting & Taxation (AREA)
  • Development Economics (AREA)
  • Strategic Management (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Databases & Information Systems (AREA)
  • Game Theory and Decision Science (AREA)
  • Marketing (AREA)
  • General Business, Economics & Management (AREA)
  • Economics (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Computer Hardware Design (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The present invention provides a statistical method and apparatus for behaviors of front-end users. The method comprises: obtaining a point burying rule preset for a page; monitoring a page click event of the page in a page operating process; and after the page click event is monitored, collecting statistics on behavior data of front-end users of the page according to the point burying rule. In the present invention, to implement automatic point burying, a point burying rule is set for a page first, the starting of point burying is triggered by a page click event when the page operates, so that the problems of frequent occurrence of errors and poor convenience in manual point burying in the prior art are resolved, and global statistics collection can be performed on behaviors of front-end users of the page, and the statistical efficiency is high.

Description

前端用户行为统计方法及装置Front-end user behavior statistics method and device
本申请要求2016年04月01日递交的申请号为201610204743.X、发明名称为“前端用户行为统计方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。The present application claims priority to Chinese Patent Application Serial No. No. No. No. No. No. No. No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No No
技术领域Technical field
本发明涉及数据处理技术领域,尤其涉及一种前端用户行为统计方法及装置。The present invention relates to the field of data processing technologies, and in particular, to a front-end user behavior statistics method and apparatus.
背景技术Background technique
在互联网高速发展的今天,无论是作为一个电商店铺的运营人员还是个人站长,如果能够对用户在页面停留期间的一些点击行为了如指掌,并且能够很好地进行分析的话,将会对在改进网页的用户体验和吸引用户点击方面提供最直接和高效的帮助。Today, with the rapid development of the Internet, whether it is an operator of an e-commerce store or a personal webmaster, if you can know some of the click behaviors of the user during the page stay, and can analyze it well, it will be improved. The most direct and efficient help for the user experience of the web page and the attraction of user clicks.
通常通过对页面进行埋点操作来记录用户的点击行为,通俗的讲,页面埋点就是通过脚本语言(JavaScript,简称JS)方法收集用户访问和点击数据的一种操作。当用户打开一个网页并点击的时候,页面中的埋点JS代码就会被执行,该JS代码会将收集完的数据回传给网站服务器。The user's click behavior is usually recorded by burying the page. In layman's terms, the page burying point is an operation of collecting user access and clicking data through a scripting language (JavaScript, JS for short). When the user opens a web page and clicks, the buried JS code in the page will be executed, and the JS code will pass the collected data back to the web server.
在目前的埋点技术中,手动为指定的按钮进行埋点,基于指定按钮的点击操作对用户的行为进行统计。实际应用中需要对页面进行全局统计时,这种手工埋点的过程较为繁琐,存在便捷性较差的问题。In the current buried point technology, the specified button is manually buried, and the user's behavior is counted based on the click operation of the designated button. When the actual application needs to perform global statistics on the page, the process of manually burying the points is cumbersome and has a problem of poor convenience.
发明内容Summary of the invention
本发明提供一种前端用户行为统计方法及装置,用于解决当对页面进行全局统计时,通过手工埋点过程较为繁琐便捷性较差的问题。The invention provides a front-end user behavior statistics method and device, which are used to solve the problem that the manual burying process is relatively cumbersome and convenient when the page is globally statistic.
为了实现上述目的,本发明提供了一种前端用户行为统计方法,包括:To achieve the above objective, the present invention provides a front-end user behavior statistics method, including:
获取为页面预先设定的埋点规则;Obtain a burying rule pre-set for the page;
在所述页面运行过程中,对所述页面的页面点击事件进行监听;During the running of the page, the page click event of the page is monitored;
在监听到所述页面点击事件后,基于所述埋点规则统计所述页面前端用户的行为数据。After the page click event is monitored, the behavior data of the front end user of the page is counted according to the buried point rule.
为了实现上述目的,本发明提供了一种前端用户行为统计装置,包括:In order to achieve the above object, the present invention provides a front-end user behavior statistics device, including:
获取模块,用于获取为页面预先设定的埋点规则; The obtaining module is configured to obtain a burying rule preset for the page;
监听模块,用于在所述页面运行过程中,对所述页面的页面点击事件进行监听;a monitoring module, configured to monitor a page click event of the page during the running of the page;
统计模块,用于在监听到所述页面点击事件后,基于所述埋点规则统计所述页面前端用户的行为数据。The statistic module is configured to collect behavior data of the front end user of the page based on the burying point rule after the page click event is monitored.
本发明提供的前端用户行为统计方法及装置,通过获取为页面预先设定的埋点规则,在页面运行过程中,对页面的页面点击事件进行监听,在监听到页面点击事件后,基于埋点规则统计该页面前端用户的行为数据。本发明中为了实现了对页面的自动埋点,先为页面设置埋点规则,在页面运行时由页面点击事件触发埋点开启,解决了现有通过手动埋点存在过错繁琐便捷性较差的问题,而且能够对页面前端用户的行为进行全局统计,统计效率较高。The front-end user behavior statistics method and device provided by the present invention acquires a burying rule preset for a page, monitors a page click event of a page during a page running process, and monitors a page click event based on a burying point The rules count the behavior data of the front-end users of the page. In the invention, in order to realize the automatic burying of the page, the burying rule is set for the page first, and the burying point is triggered by the page click event when the page is running, which solves the problem that the existing manual burying point is cumbersome and convenient. The problem, and the ability to global statistics on the behavior of the front-end users of the page, the statistical efficiency is higher.
附图说明DRAWINGS
图1为本发明实施例一的前端用户行为统计方法的流程示意图;1 is a schematic flowchart of a front-end user behavior statistics method according to Embodiment 1 of the present invention;
图2为本发明实施例二的前端用户行为统计方法的流程示意图;2 is a schematic flowchart of a front-end user behavior statistics method according to Embodiment 2 of the present invention;
图3为本发明实施例三的前端用户行为统计方法的流程示意图;3 is a schematic flowchart of a front-end user behavior statistics method according to Embodiment 3 of the present invention;
图4为本发明实施例四的前端用户行为统计方法的流程示意图;4 is a schematic flowchart of a front-end user behavior statistics method according to Embodiment 4 of the present invention;
图5为本发明实施例五的前端用户行为统计方法的流程示意图;5 is a schematic flowchart of a front-end user behavior statistics method according to Embodiment 5 of the present invention;
图6为本发明实施例六的前端用户行为统计装置的结构示意图;6 is a schematic structural diagram of a front-end user behavior statistics apparatus according to Embodiment 6 of the present invention;
图7为本发明实施例七的前端用户行为统计装置的结构示意图。FIG. 7 is a schematic structural diagram of a front-end user behavior statistics apparatus according to Embodiment 7 of the present invention.
具体实施方式detailed description
下面结合附图对本发明实施例提供的前端用户行为统计方法及装置进行详细描述。The front-end user behavior statistics method and apparatus provided by the embodiments of the present invention are described in detail below with reference to the accompanying drawings.
实施例一Embodiment 1
如图1所示,其为本发明实施例一的前端用户行为统计方法的流程示意图。As shown in FIG. 1 , it is a schematic flowchart of a front-end user behavior statistics method according to Embodiment 1 of the present invention.
该前端用户行为统计方法包括:The front-end user behavior statistics method includes:
S101、获取为页面预先设定的埋点规则。S101. Acquire a burying rule preset for the page.
本实施例中,预先为页面设置埋点规则,具体地,获取页面的所有控件,根据统计需求为不同的控件设置埋点规则。可选地获取各控件的类型,为同一个类型的所有控件设置相同的埋点规则。In this embodiment, a burying rule is set for the page in advance, specifically, all the controls of the page are acquired, and burying rules are set for different controls according to statistical requirements. Optionally get the type of each control and set the same burying rule for all controls of the same type.
其中,埋点规则中限定了该页面的埋点对象,并且设置有与埋点对象相应的统计策略。 The buried point rule defines a buried point object of the page, and a statistical strategy corresponding to the buried point object is set.
在页面运行之间,需要获取该页面的埋点规则,具体地,在启动页面时,将埋点规则加载到页面的业务文件中。其中,页面的业务文件为页面的业务处理流程。During the running of the page, the burying rule of the page needs to be obtained. Specifically, when the page is started, the burying rule is loaded into the business file of the page. The business file of the page is the business process flow of the page.
S102、在页面运行过程中,对页面的页面点击事件进行监听。S102: Listening to a page click event of the page during the running of the page.
当用户开启页面后,页面的业务文件就可以执行,即页面的业务处理流程被启动,在执行处理流程的过程中,对隶属该页面的页面点击事件进行监听。也就是说,当前端用户在网页上进行页面点击时,能够触发一个页面点击事件,页面对应的业务文件就可以监听到该页面点击事件。After the user opens the page, the business file of the page can be executed, that is, the business process of the page is started, and during the process of executing the process, the page click event belonging to the page is monitored. That is to say, when the current end user clicks on the webpage, a page click event can be triggered, and the corresponding business file of the page can monitor the click event of the page.
本实施例中,对页面进行埋点,在该页面启动时即加载页面的业务文件的时候,同时加载该页面对应的埋点规则,相应地就开启埋点的功能,则页面下所有控件的页面点击事件均会被监听。In this embodiment, the page is buried, and when the page is loaded, the page's business file is loaded, and the corresponding point burying rule is loaded at the same time, and the function of burying the point is opened accordingly, and all the controls under the page are Page click events are monitored.
S103、在监听到页面点击事件后,基于埋点规则统计该页面前端用户的行为数据。S103. After listening to the page click event, calculate behavior data of the front end user of the page based on the burying rule.
在监听到页面点击事件后,确定该页面点击事件对应的目标对象,进一步地,当确定出目标对象后,需要判断该目标对象是否开启埋点。本实施例中,开启埋点的对象在埋点规则中进行定义,埋点的对象可以是按钮标签或其它指定的标签等控件。After the page click event is monitored, the target object corresponding to the page click event is determined. Further, after the target object is determined, it is necessary to determine whether the target object starts to bury the point. In this embodiment, the object that opens the buried point is defined in the burying rule, and the object of the burying point may be a button label or other specified label and the like.
本实施例中,埋点规则限定了埋点对象以及埋点对象对应的统计策略。埋点对象开启埋点的两种可选方式如下:In this embodiment, the burying point rule defines a statistical strategy corresponding to the burying point object and the burying point object. Two options for burying a point to open a buried point are as follows:
一是在页面加载时就会开启埋点对象进行埋点记录。具体地,在加载预置的埋点规则时,就对属于该页面的所有的按钮标签等埋点对象自动开启埋点。First, when the page is loaded, the buried point object is turned on for buried point recording. Specifically, when the preset burying rule is loaded, the burying point is automatically turned on for all the button labels and the like that belong to the page.
二判断页面下每个埋点对象是否具有相应的统计策略,如果埋点对象的统计策略不为空,说明该目标对象开启了埋点,可以基于该目标对象的统计策略对前端用户的行为数据进行统计。如果该目标对象的统计策略为空,说明该目标对象未开启埋点,则不对该目标对象的进行统计。2. Determine whether each buried point object has a corresponding statistical strategy under the page. If the statistical strategy of the buried object is not empty, it indicates that the target object has a buried point, and the behavior data of the front-end user can be based on the statistical policy of the target object. Perform statistics. If the target object's statistical policy is empty, indicating that the target object does not open the buried point, the target object is not counted.
当判断出目标对象开启了埋点,说明可以对目标对象进行埋点记录,可选地记录点击事件的按钮、时间、坐标,其中点击事件的坐标为页面中的位置,也可称为坐标。进一步地,获取该目标对象的统计策略,根据统计策略可以对目标对象的埋点记录进行统计,即可以对点击的位置、点击事件、用户ID、控件所隶属的模块等信息进行统计,从而可以获取到前端用户的行为数据。例如当控件类型为按钮类时,即对应HTML标签为(button/a/span),就可以记录该控件位置、点击时间、用户ID、控件所属的模块以及当前操作所属的应用,若该页面点击事件有触发后台请求,则记录后台请求统一资源定位符(Uniform Resource Locator,简称URL)、后台请求的耗时以及后台请求是否 成功等信息。进一步地,在获取到该控件的上述信息后,在特定时间需要对该控件进行统计时,根据该控件以及该控件的控件类型,获取与该控件对应的统计策略,进而根据该统计策略统计出该控件的用户行为数据。在使用页面的过程中,基于埋点规则就可以对前端用户的用户行为进行监督,这样就可以统计获取到前端用户在使用页面时的行为数据。When it is determined that the target object has opened the burying point, it indicates that the target object can be buried and recorded, and the button, time and coordinates of the click event are optionally recorded, wherein the coordinates of the click event are positions in the page, which may also be referred to as coordinates. Further, obtaining a statistical strategy of the target object, according to the statistical policy, performing statistics on the buried point record of the target object, that is, performing statistics on the location of the click, the click event, the user ID, and the module to which the control belongs, so that Get behavior data to front-end users. For example, when the control type is a button class, that is, the corresponding HTML tag is (button/a/span), the position of the control, the click time, the user ID, the module to which the control belongs, and the application to which the current operation belongs may be recorded, if the page is clicked. If the event triggers a background request, the background request Uniform Resource Locator (URL), the time of the background request, and the background request are recorded. Success and other information. Further, after obtaining the above information of the control, when the control needs to be counted at a specific time, the statistical policy corresponding to the control is obtained according to the control and the control type of the control, and then the statistics are calculated according to the statistical policy. User behavior data for this control. In the process of using the page, the user behavior of the front-end user can be supervised based on the burying rule, so that the behavior data of the front-end user when using the page can be statistically obtained.
本实施例提供的前端用户行为统计方法,通过获取为页面预先设定的埋点规则,在页面运行过程中,对页面的页面点击事件进行监听,在监听到页面点击事件后,基于埋点规则统计该页面前端用户的行为数据。本实施例中为了实现了对页面的自动埋点,先为页面设置埋点规则,在页面运行时由页面点击事件触发埋点开启,解决了现有通过手动埋点存在过错繁琐便捷性较差的问题,而且能够对页面前端用户的行为进行全局统计,统计效率较高。The front-end user behavior statistics method provided in this embodiment obtains a burying rule pre-set for the page, monitors the page click event of the page during the running of the page, and monitors the page click event based on the burying rule. Count the behavior data of the front-end users of the page. In this embodiment, in order to realize the automatic burying of the page, the burying rule is set for the page first, and the burying point is triggered by the page click event when the page is running, which solves the problem that the existing manual burying point is cumbersome and convenient. The problem, and the ability to global statistics on the behavior of the front-end users of the page, the statistical efficiency is higher.
实施例二Embodiment 2
如图2所示,其为本发明实施例二的前端用户行为统计方法的流程示意图。本实施例提供的前端用户行为统计方法需要在对页面的前端进行模块化的基础上执行。该前端用户行为统计方法包括:As shown in FIG. 2, it is a schematic flowchart of a front-end user behavior statistics method according to Embodiment 2 of the present invention. The front-end user behavior statistics method provided by this embodiment needs to be performed on the basis of modularizing the front end of the page. The front-end user behavior statistics method includes:
S201、将页面进行模块化处理。S201, the page is modularized.
在互联网快速发展的当下,页面逐渐变成了互联网应用程序,为了适应激烈的市场竞争,以满足用户对多样化的需求,嵌入网页的JS代码越来越庞大,越来越复杂,页面也越来越像桌面程序,需要分工协作、进度管理、单元测试等等。为了提升开发者的开发体验,并为性能优化提供良好的支持,开发者可以基于模块化对页面的前端进行编程。对页面进行前端模块化的目的,可以实现多人协同开发页面,提高页面研发速度和降低维护难度。At the moment of the rapid development of the Internet, the page has gradually become an Internet application. In order to adapt to the fierce market competition and meet the needs of users for diversification, the JS code embedded in the web page is getting larger and larger, more and more complicated, and the page is more and more More like a desktop application, it requires division of labor, progress management, unit testing, and so on. To enhance the developer's development experience and provide good support for performance optimization, developers can program the front end of the page based on modularity. The purpose of front-end modularization of the page is to enable multi-person collaborative development of the page, improve page development speed and reduce maintenance difficulty.
S202、为页面对应模块配置埋点规则。S202. Configure a burying rule for the page corresponding module.
为了实现对页面的全局统计,预先为页面对应模块配置埋点规则。具体地,获取页面的所有控件、控件类型以及各控件所隶属的模块,由于不同的模块可以设置不同的埋点规则,也可以全局设置一个埋点规则。获取需要埋点的控件类型,为控件类型设置相应的埋点规则,将隶属同一模块的控件类型的埋点规则归结到一个文件中形成该模块的埋点规则。In order to implement global statistics on the page, a burying rule is configured in advance for the corresponding module of the page. Specifically, all the controls, control types, and modules to which the controls belong are acquired. Since different modules can set different burying rules, a burying rule can also be set globally. Get the type of the control that needs to be buried, set the corresponding burying rule for the control type, and categorize the burying rules of the control type belonging to the same module into a file to form the burying rule of the module.
S203、通过执行业务文件运行页面,在运行过程中对隶属于页面点击事件进行监听。S203. Perform a service page to execute a page, and listen to a page click event in the running process.
当前端用户试图使用页面时,在运行该页面之前,需要获取该页面对应模块的业务 文件,其中业务文件为该页面对应模块的业务处理流程。执行该业务文件,即运行该页面对应模块的业务处理流程。本实施例中,在执行业务文件时,会同时加载该页面对应模块的埋点规则。When the current user tries to use the page, the service of the corresponding module of the page needs to be obtained before the page is run. The file, where the business file is the business process flow of the corresponding module of the page. Execute the business file, that is, run the business process of the module corresponding to the page. In this embodiment, when the service file is executed, the burying rule of the corresponding module of the page is simultaneously loaded.
在业务文件的运行过程中,可以基于该埋点规则中限定的埋点对象,具体地,当页面对应模块开启埋点的情况下,该模块下所有控件的点击事件均监控,根据相应模块绑定的埋点规则,当监控到点击事件对应的控件为埋点的控件时,就获取页面前端用户的行为数据。During the running of the service file, the buried point object defined in the burying point rule may be used. Specifically, when the page corresponding module opens the burying point, the click events of all the controls under the module are monitored, and the corresponding module is tied according to the corresponding module. The fixed burying rule, when monitoring the control corresponding to the click event is a buried point control, obtains the behavior data of the front end user of the page.
S204、在监听到页面点击事件后,基于埋点规则统计页面前端用户的行为数据。S204. After monitoring the page click event, the behavior data of the front end user of the page is counted based on the burying point rule.
在使用页面的过程中,基于埋点规则就可以对前端用户的用户行为进行监督,这样就可以统计获取到前端用户在使用页面时的行为数据。具体地过程可参见上述实施例二中相关内容的记载,此处不再赘述。In the process of using the page, the user behavior of the front-end user can be supervised based on the burying rule, so that the behavior data of the front-end user when using the page can be statistically obtained. For details, refer to the description of related content in the foregoing Embodiment 2, and details are not described herein again.
本实施例提供的前端用户行为统计方法,在页面进行了模块化的基础之上,为页面对应模块配置埋点规则,当执行页面的业务文件,则获取相应的埋点规则,在执行业务文件的过程中基于埋点规则,获取页面前端用户的行为数据,实现对页面的全局自动埋点,能够对页面前端用户行为的全局统计,且统计效率较高。The front-end user behavior statistics method provided by this embodiment is based on the modularization of the page, and the burying point rule is configured for the page corresponding module. When the business file of the page is executed, the corresponding burying rule is obtained, and the business file is executed. In the process, based on the burial rules, the behavior data of the front-end user of the page is obtained, and the global automatic burying of the page is realized, and the global statistics of the user behavior of the front end of the page can be obtained, and the statistical efficiency is high.
实施例三Embodiment 3
如图3所示,其为本发明实施例三的前端用户行为统计方法的流程示意图。本实施例提供的前端用户行为统计方法需要在对页面的前端进行模块化的基础上执行。As shown in FIG. 3, it is a schematic flowchart of a front-end user behavior statistics method according to Embodiment 3 of the present invention. The front-end user behavior statistics method provided by this embodiment needs to be performed on the basis of modularizing the front end of the page.
该前端用户行为统计方法包括:The front-end user behavior statistics method includes:
S301、根据页面对应模块的业务文件,确定页面对应模块运行时所需的依赖文件。S301. Determine, according to the service file of the corresponding module of the page, a dependency file required for the page corresponding module to run.
当前,为了便于对页面的优化,开发者对页面的前端进行模块化编程。当前端用户试图使用页面时,在运行该页面之前,需要获取该页面对应模块的业务文件,其中业务文件为该页面对应模块的业务处理流程。Currently, in order to facilitate the optimization of the page, the developer modularizes the front end of the page. When the current user tries to use the page, the service file of the corresponding module of the page needs to be obtained before the page is run. The service file is the service processing flow of the corresponding module of the page.
通常在页面中,模块化的过程中页面对应的模块根据定义的依赖,编写依赖的相关代码文件。在获取到该页面对应模块的业务文件后,对该业务文件进行分析,可以确定出页面对应模块运行时所需的依赖文件。一般页面对应模块包括三种依赖文件:超文本标记语言(HyperText Markup Language,简称HTML)依赖文件、层叠样式表(Cascading Style Sheets,简称CSS)依赖文件和JS依赖文件。Usually in the page, the module corresponding to the page in the modular process writes dependent code files according to the defined dependencies. After obtaining the business file of the corresponding module of the page, the business file is analyzed, and the dependent file required for the page corresponding module to run may be determined. The general page corresponding module includes three kinds of dependent files: HyperText Markup Language (HTML) dependent files, Cascading Style Sheets (CSS) dependent files, and JS dependent files.
S302、加载依赖文件和预先为页面对应模块配置的埋点规则。S302. Load a dependency file and a burying rule configured in advance for the corresponding module of the page.
在确定出页面对应模块的所需的依赖文件后,对依赖文件进行加载,本实施例中, 为了实现全局埋点机制,预先为页面对应模块配置埋点规则,该埋点规则中限定有模块的埋点对象。例如,埋点的对象可以是按钮标签或其它指定的标签。在加载依赖文件的同时,还需要加载预先为页面对象模块配置的埋点规则。After determining the required dependency file of the corresponding module of the page, the dependent file is loaded. In this embodiment, In order to implement the global burying mechanism, a burying point rule is configured in advance for the page corresponding module, and the burying point object of the module is defined in the burying point rule. For example, the object of the buried point can be a button label or other specified label. While loading the dependent file, you also need to load the burying rules that are configured in advance for the page object module.
S303、执行业务文件基于埋点规则,以统计获取页面前端用户的行为数据。S303. Execute the business file based on the burying rule, and obtain the behavior data of the front end user of the page by statistics.
在依赖文件和埋点规则加载完成后,执行页面对应模块的业务文件,即运行该页面对应模块的业务处理流程。本实施例中,由于加载了该模块对应的埋点规则,在业务文件的运行过程中,可以基于该埋点规则中限定的埋点对象,获取页面前端用户的行为数据。After the dependent file and the burying rule are loaded, the service file of the module corresponding to the page is executed, that is, the service processing flow of the corresponding module of the page is executed. In this embodiment, since the burying rule corresponding to the module is loaded, during the running of the service file, the behavior data of the front end user of the page may be obtained based on the burying point object defined in the burying rule.
具体地,当前端用户在使用页面时,可以对页面中的控件进行点击操作,本实施例中可以对控件进行监控,当监控到点击的控件为埋点对象时,就可以获取到该控件的埋点记录。进一步地,埋点规则中还包括埋点对象的统计策略,在获取到埋点对象的埋点记录后,获取该埋点对象的统计策略,如果该埋点对象的统计策略为空,则不对该埋点对象的埋点记录进行统计,如果获取到统计策略,则根据统计策略对埋点记录进行统计。Specifically, when the current end user uses the page, the user can click on the control in the page. In this embodiment, the control can be monitored. When the control that clicks on the click is a buried object, the control can be obtained. Buried record. Further, the burying point rule further includes a statistic strategy of the burying point object, and after obtaining the burying point record of the burying point object, acquiring a statistical strategy of the burying point object, if the statistic strategy of the burying point object is empty, then The buried point record of the buried point object is counted. If a statistical strategy is obtained, the buried point record is counted according to the statistical strategy.
例如当控件类型为按钮类时,即对应HTML标签为(button/a/span),就可以记录该控件位置、点击时间、用户ID、控件所属的模块以及当前操作所属的应用,若该点击事件有触发后台请求,则记录后台请求统一资源定位符(Uniform Resource Locator,简称URL)、后台请求的耗时以及后台请求是否成功等信息。进一步地,在获取到该控件的上述信息后,在特定时间需要对该控件进行统计时,根据该控件所隶属模块的名称以及该控件的控件类型,从后台数据库中查询获取与该控制对应的统计策略,进而根据该统计策略统计出该控件的用户行为数据。本实施例中统计策略存储在后台数据库中,从而可以进行实时修改。For example, when the control type is a button class, that is, the corresponding HTML tag is (button/a/span), the position of the control, the click time, the user ID, the module to which the control belongs, and the application to which the current operation belongs may be recorded, if the click event If a background request is triggered, the background request Uniform Resource Locator (URL), the time spent in the background request, and the success of the background request are recorded. Further, after obtaining the above information of the control, when the control needs to be counted at a specific time, according to the name of the module to which the control belongs and the control type of the control, the query corresponding to the control is obtained from the background database. The statistical strategy, and then the user behavior data of the control is counted according to the statistical strategy. In this embodiment, the statistical policy is stored in the background database, so that real-time modification can be performed.
在使用页面的过程中,基于埋点规则就可以对前端用户的用户行为进行监督,这样就可以统计获取到前端用户在使用页面时的行为数据。In the process of using the page, the user behavior of the front-end user can be supervised based on the burying rule, so that the behavior data of the front-end user when using the page can be statistically obtained.
本实施例提供的前端用户行为统计方法,通过根据页面对应模块的业务文件,确定确定页面对应模块运行时所需的依赖文件,加载依赖文件和预先为页面对应模块配置的埋点规则,执行业务文件基于埋点规则中限定的埋点对象,获取页面前端用户的行为数据。本实施例提供了全局埋点机制,在加载依赖文件的同时写入模块的埋点规则,基于该埋点规则能够对前端用户的行为进行统计,对页面的全局自动埋点,能够实现对页面前端用户行为的全局统计,而且统计效率较高。The front-end user behavior statistics method provided by the embodiment determines the dependency file required to determine the running of the corresponding module of the page according to the service file of the corresponding module of the page, loads the dependent file, and pre-sets the burying rules for the corresponding module of the page, and executes the service. The file obtains the behavior data of the user at the front end of the page based on the buried point object defined in the burying rule. The embodiment provides a global burying mechanism, and writes a burying rule of the module while loading the dependent file, and can perform statistics on the behavior of the front-end user based on the burying rule, and automatically bury the page on the page, and can implement the page. Global statistics of front-end user behavior, and statistical efficiency is high.
实施例四 Embodiment 4
如图4所示,其为本发明实施例四的前端用户行为统计方法的流程示意图。目前RequireJS是一个非常小巧的JavaScript模块载入框架,本实施例选取RequireJS框架作为底层的依赖实现,并在此基础上实现对页面的前端模块化。在上述实施例的基础上,将预设的埋点规则加载到页面对应的业务文件的过程包括:As shown in FIG. 4, it is a schematic flowchart of a front-end user behavior statistics method according to Embodiment 4 of the present invention. At present, RequireJS is a very small JavaScript module loading framework. In this embodiment, the RequireJS framework is selected as the underlying dependency implementation, and on this basis, the front end of the page is modularized. On the basis of the foregoing embodiment, the process of loading a preset burying rule into a service file corresponding to a page includes:
S401、加载页面的业务文件。S401. Load a business file of the page.
在前端用户试图使用页面时,在运行之前,需要对页面对应模块的业务文件进行调用,其中,业务文件为该页面对应模块的业务处理流程。本实施例中,基于RequireJS框架加载页面对应模块的业务文件,业务文件是用JavaScript脚本语言编写的,以JS为扩展名的文件JS文件。When the front-end user tries to use the page, the service file of the corresponding module of the page needs to be called before running, where the service file is the service processing flow of the corresponding module of the page. In this embodiment, the business file of the corresponding module of the page is loaded based on the RequireJS framework, and the business file is a file JS file written with a JavaScript scripting language and with a JS extension.
S402、对业务文件进行解析,以获取页面运行时所需的依赖文件。S402. Parse the business file to obtain a dependency file required for the page to run.
在调用业务文件的过程中,对该业务文件进行解析,获取该模块的依赖文件。在页面模块化的过程中,可以对模块的依赖进行定义,开发者能够根据依赖的定义编写相关代码文件。一般页面的模块包括三种依赖文件:HTML依赖文件、CSS依赖文件和JS依赖文件。In the process of calling the business file, the business file is parsed to obtain the dependency file of the module. In the process of modularizing the page, the dependency of the module can be defined, and the developer can write the relevant code file according to the definition of the dependency. The general page module includes three dependent files: HTML dependent files, CSS dependent files, and JS dependent files.
在本实施例中,由于RequireJS只支持JS依赖文件的依赖解析,为了实现对HTML依赖文件和CSS依赖文件的解析,需要在该RequireJS框架中插入第三方插件,使得RequireJS框架能够支持解析HTML依赖文件和CSS依赖文件。In this embodiment, since RequireJS only supports dependency resolution of JS dependent files, in order to implement parsing of HTML dependent files and CSS dependent files, a third-party plug-in needs to be inserted in the RequireJS framework, so that the RequireJS framework can support parsing HTML dependent files. And CSS dependent files.
S403、封装业务文件。S403. Encapsulating a business file.
在解析出页面对应模块的所需的依赖文件后,对模块的依赖文件进行加载,实际中由于RequireJS框架在模块的JS依赖文件加载完成后,就会直接执行模块的业务文件。本实施例中模块除了需要对JS依赖文件进行加载之外,还需要加载HTML依赖文件和CSS依赖文件。After the required dependency file of the corresponding module of the page is parsed, the dependent file of the module is loaded. In fact, since the RequireJS framework loads the JS dependency file of the module, the business file of the module is directly executed. In this embodiment, in addition to loading the JS dependent file, the module needs to load the HTML dependent file and the CSS dependent file.
为了在加载完所有的依赖文件之后再执行模块的业务处理流程,本实施例中基于RequireJS框架将模块的业务文件的业务处理流程进行封装,封装后业务处理流程将不会再被执行,只有等到封装解除后才会被执行。In order to perform the business process flow of the module after loading all the dependent files, the business process flow of the business file of the module is encapsulated based on the RequireJS framework in this embodiment, and the business process flow after the encapsulation will not be executed again. The package will not be executed until it is released.
S404、加载依赖文件和页面的埋点规则。S404, loading dependent files and burying rules of the page.
为了实现对页面的全局统计的机制,本实施例中在加载模块的依赖文件的同时,加载预先为模块配置的埋点规则,本实施例中,开启埋点的对象在埋点规则的代码中进行定义,也就是说,在埋点规则中设置该模块的埋点对象。埋点的对象可以是按钮标签或其它指定的标签。具体地,可以对属于该模块的所有Dom文件中按钮标签 (button/span/a)这些对象自动开启埋点,这样就可以通过模块的所有按钮标签进行埋点统计。In the embodiment, in the embodiment, the burying point rule configured in advance for the module is loaded at the same time as the dependent file of the module is loaded. In this embodiment, the object of the burying point is opened in the code of the burying rule. Define, that is, set the buried point object of the module in the burying rule. The object to be buried can be a button label or other specified label. Specifically, button labels can be applied to all Dom files belonging to the module. (button/span/a) These objects automatically open the burying point so that all the button labels of the module can be used for burying statistics.
S405、对业务文件进行HTML模板渲染和CSS渲染。S405. Perform HTML template rendering and CSS rendering on the business file.
实际中,需要对页面进行模板和样式的渲染,本实施例中,在完成依赖文件加载后,基于依赖文件对模块的业务文件进行HTML模板渲染和CSS渲染。In practice, the template and the rendering of the template are required. In this embodiment, after the dependent file is loaded, the template file is used to perform HTML template rendering and CSS rendering on the business file of the module.
S406、解除业务文件的封装。S406. Release the encapsulation of the service file.
在对模块的业务文件进行渲染后,由于模块的业务文件在之前进行了封装,需要对该业务文件的业务处理流程进行解封装,以便于该模块的业务文件能够被执行。After the service file of the module is rendered, the service file of the module needs to be decapsulated, so that the service file of the module can be executed.
在解除模块的业务文件的封装后,基于RequireJS框架执行该业务文件。在执行业务文件的过程中,由于该业务文件中加载了模块的埋点规则,基于该埋点规则中限定的埋点对象来记录前端用户的点击行为,从而能够对前端用户的行为数据进行统计。After the module's business file is unpacked, the business file is executed based on the RequireJS framework. In the process of executing the business file, because the burying rule of the module is loaded in the business file, the click behavior of the front-end user is recorded based on the buried point object defined in the burying rule, so that the behavior data of the front-end user can be counted. .
此处需要说明,使用RequierJS作为底层的依赖实现此处为一个完整的示例,不作为限制本发明的条件。该前端用户统计方法也可以基于SeaJS框架等底层依赖来实现。It should be noted here that the use of RequierJS as the underlying dependency implementation is a complete example herein and is not intended as a limitation of the invention. The front-end user statistics method can also be implemented based on the underlying dependencies such as the SeaJS framework.
本实施例中提供的前端用户行为统计方法,通过加载页面对应模块的业务文件,解析业务文件获取模块的依赖文件,封装业务文件的业务处理流程,加载模块的依赖文件和模块预置的埋点规则,对业务文件进行HTML模板渲染和CSS渲染,解除业务文件的封装,执行业务文件基于埋点规则中限定的埋点对象统计获取页面前端用户的行为数据。本实施例提供了一种全局埋点机制,在加载依赖文件的同时写入模块的埋点规则,基于埋点规则中的埋点对象能够对前端用户的行为进行统计,对页面的全局自动埋点,能够实现对页面前端用户行为的全局统计,而且统计效率较高。The front-end user behavior statistics method provided in this embodiment is to parse the service file of the service file acquisition module by loading the service file of the corresponding module of the page, to encapsulate the service processing flow of the service file, and to load the dependency file of the module and the preset point of the module. The rule is to perform HTML template rendering and CSS rendering on the business file, to unpack the business file, and execute the business file to obtain the behavior data of the front end user of the page based on the buried point object statistics defined in the burying rule. This embodiment provides a global burying mechanism, which writes a burying rule of a module while loading a dependent file, and the burying point object based on the burying point rule can perform statistics on the behavior of the front-end user, and automatically bury the page globally. Point, can achieve global statistics on the user behavior of the front end of the page, and the statistical efficiency is high.
实施例五Embodiment 5
如图5所示,其为本发明实施例五的前端用户行为统计方法的流程示意图。在上述实施例的基础之上,该前端用户行为统计方法包括以下步骤:As shown in FIG. 5, it is a schematic flowchart of a front-end user behavior statistics method according to Embodiment 5 of the present invention. Based on the above embodiment, the front-end user behavior statistics method includes the following steps:
S501、在执行业务文件的过程中对隶属于页面的页面点击事件进行监听。S501: Listening to a page click event belonging to the page in the process of executing the business file.
当业务文件加载和渲染完成后,可以执行该业务文件的业务处理流程,在执行处理流程的过程中,业务文件对隶属页面对应模块的页面点击事件进行监听。也就是说,当前端用户在网页上进行页面点击时,能够触发一个页面点击事件,该页面点击事件所隶属的模块对应的业务文件就可以监听到该页面点击事件。After the business file is loaded and rendered, the business process of the business file can be executed. During the process of executing the process, the business file monitors the page click event of the module corresponding to the subordinate page. That is to say, when the current end user clicks on the webpage, a page click event can be triggered, and the service file corresponding to the module to which the click event belongs can monitor the page click event.
本实施例中,对页面进行模块化处理,然后对页面应模块进行埋点,在该模块加载的时候,同时加载为页面配置的埋点规则,在该模块开启埋点的情况下,该模块下所有 控件的页面点击事件均会被监控。In this embodiment, the page is modularized, and then the page is buryed by the module. When the module is loaded, the burying rule configured for the page is loaded at the same time, and the module is opened when the module starts to bury the point. All under The page click event of the control is monitored.
S502、确定监听到的页面点击事件对应的目标对象。S502. Determine a target object corresponding to the monitored page click event.
当页面的业务文件监听到页面点击事件后,确定该页面点击事件对应的目标对象。After the page's business file listens to the page click event, the target object corresponding to the page click event is determined.
S503、判断目标对象是否开启埋点功能。S503. Determine whether the target object has a buried point function.
上述实施例中在业务文件加载依赖文件时,同时加载了为该页面预先设置的埋点规则。其中,埋点规则中限定了页面对应模块的埋点对象,并且设置有与埋点对象相应的统计策略。本实施例中,开启埋点的对象在埋点规则的代码中进行定义,埋点的对象可以是按钮标签或其它指定的标签等控件。本实施例中,埋点规则限定了埋点对象以及埋点对象对应的统计策略。开启埋点有两种可选方式:一是在页面加载时就会开启埋点对象进行埋点记录。具体地,在加载预置的埋点规则时,就对属于该页面的所有Dom文件中按钮标签等埋点对象自动开启埋点。二判断每个埋点对象是否具有相应的统计策略,如果埋点对象的统计策略不为空,说明该目标对象开启了埋点功能,可以基于该埋点对象进行用户的行为数据统计。如果该目标对象的统计策略为空,说明该目标对象未开启埋点功能,则不对该目标对象的进行统计。In the above embodiment, when the business file loads the dependent file, the burying rule preset for the page is loaded at the same time. The burying point rule defines a burying point object corresponding to the page corresponding module, and sets a statistical strategy corresponding to the burying point object. In this embodiment, the object that opens the buried point is defined in the code of the buried point rule, and the object of the buried point may be a button label or other specified label and the like. In this embodiment, the burying point rule defines a statistical strategy corresponding to the burying point object and the burying point object. There are two options for opening the buried point: one is to open the buried point object for buried point recording when the page is loaded. Specifically, when the preset buried point rule is loaded, the buried point is automatically turned on for the buried point object such as the button label in all the Dom files belonging to the page. Second, it is determined whether each buried point object has a corresponding statistical strategy. If the statistical strategy of the buried point object is not empty, it indicates that the target object has the buried point function enabled, and the user's behavior data statistics can be performed based on the buried point object. If the target object's statistical policy is empty, indicating that the target object does not have the buried point function enabled, the target object is not counted.
如果判断出目标对象开启埋点功能,则执行S504;否则,返回执行S501。If it is determined that the target object turns on the burying point function, then S504 is performed; otherwise, the process returns to S501.
S504、对目标对象的点击行为进行埋点记录,并依据埋点记录和目标对象的统计策略统计前端用户的行为数据。S504: Perform a buried point record on the click behavior of the target object, and collect behavior data of the front-end user according to the buried point record and the statistical strategy of the target object.
当判断出目标对象开启了埋点,说明可以对目标对象进行埋点记录,可选地记录点击事件的按钮、时间、坐标,其中点击事件的坐标为页面中的位置,也可称为坐标。When it is determined that the target object has opened the burying point, it indicates that the target object can be buried and recorded, and the button, time and coordinates of the click event are optionally recorded, wherein the coordinates of the click event are positions in the page, which may also be referred to as coordinates.
进一步地,获取该目标对象的统计策略,根据统计策略可以对目标对象的埋点记录进行统计,即可以对点击的位置、点击事件、用户ID、控件所隶属的模块等信息进行统计,从而可以获取到前端用户的行为数据。Further, obtaining a statistical strategy of the target object, according to the statistical policy, performing statistics on the buried point record of the target object, that is, performing statistics on the location of the click, the click event, the user ID, and the module to which the control belongs, so that Get behavior data to front-end users.
S505、在对目标对象的点击行为进行埋点记录的同时,获取与该点击行为对应的请求事件,对请求事件的业务逻辑进行记录。S505. Acquire a request event corresponding to the click behavior while performing a buried point record on the click behavior of the target object, and record the business logic of the request event.
进一步地,前端用户的每次点击行为,都会对应网页的一个请求事件,每个请求事件会有一定的业务逻辑,本实施例中,对目标用户的点击行为进行记录的同时,记录点击行为相应的请求事件的业务逻辑。Further, each click behavior of the front-end user corresponds to a request event of the webpage, and each request event has a certain business logic. In this embodiment, the click behavior of the target user is recorded, and the click behavior is recorded accordingly. The business logic of the request event.
S506、判断记录的次数是否超出阈值。S506. Determine whether the number of records exceeds a threshold.
如果判断结果为否,执行S507;否则执行S508。If the result of the determination is no, S507 is performed; otherwise, S508 is performed.
S507、判断在执行业务文件过程中是否监听到页面刷新事件或者页面关闭事件。 S507. Determine whether a page refresh event or a page close event is detected during the execution of the business file.
如果判断结果为是,执行S508;否则返回执行S501继续对页面点击事件进行监听。If the result of the determination is yes, execute S508; otherwise, return to execution S501 to continue monitoring the page click event.
S508、将前端用户的行为数据和记录的业务逻辑写入日志文件。S508. Write the behavior data of the front-end user and the business logic of the record to the log file.
本实施例中,行为数据和业务逻辑先在前端进行本地保存,当记录满N条后,可以批量地将记录的行为数据和业务逻辑写入到日志文件中进行保存。也就是说,在记录的过程中,将记录的次数与预设的阈值进行比较,当记录的次数超过阈值时,批量地将记录的行为数据和业务逻辑写入到日志文件中。实际应用中,为了缓解本地存储的压力,可以在记录的次数超过阈值时,批量地将记录的行为数据和业务逻辑发送到服务器上进行保存,在接收到行为数据和业务逻辑后,服务器可以按照设定的数据格式写入到日志文件中。In this embodiment, the behavior data and the service logic are locally saved in the front end. After the records are full, the recorded behavior data and business logic can be written to the log file for storage in batches. That is to say, in the process of recording, the number of times of recording is compared with a preset threshold, and when the number of times of recording exceeds the threshold, the recorded behavior data and business logic are written into the log file in batches. In actual application, in order to alleviate the pressure of local storage, when the number of records exceeds the threshold, the recorded behavior data and business logic may be sent to the server for storage in batches. After receiving the behavior data and business logic, the server may follow The set data format is written to the log file.
进一步地,本实施例中在执行业务文件的过程中还可以对页面的页面刷新事件和页面关闭事件进行监听,当监听到页面刷新事件或者页面关闭事件后,将记录的行为数据和业务逻辑写入日志文件中。为了避免信息的丢失,将记录的行为数据和业务逻辑发送到后端的服务器进行保存。服务器在接收到行为数据和业务逻辑后,可以按照设定的数据格式写入到日志文件中。Further, in the process of executing the service file in this embodiment, the page refresh event and the page close event of the page may be monitored, and when the page refresh event or the page close event is monitored, the recorded behavior data and the business logic are written. Into the log file. In order to avoid the loss of information, the recorded behavior data and business logic are sent to the back-end server for storage. After receiving the behavior data and business logic, the server can write to the log file according to the set data format.
进一步地,对包含行为数据的日志文件进行分析,基于该统计出的前端用户的行为数据,可以获取到一些网页的运营数据。其中,运营数据可以包括的独立访问者数量(Unique Visitor简称UV)、页面浏览量或点击量(Page View简称PV)、模块热度、项目热度、请求耗时统计、请求成功率、指定按钮的统计、指定页面的部分模块统计、指定页面的点击热力图等。进一步地可以将分析的结果展示给网页的开发者,开发者可以将这些运营数据作为参考数据,为实际的产品运营、设计排查错误提供参考,为前端交互设计提供依据。Further, the log file including the behavior data is analyzed, and based on the statistical behavior data of the front-end user, the operation data of some web pages can be obtained. Among them, the number of independent visitors (Unique Visitor referred to as UV), page views or clicks (Page View referred to as PV), module heat, project heat, request time-consuming statistics, request success rate, specified button statistics , specify the module statistics of the page, click the heat map of the specified page, and so on. Further, the results of the analysis can be displayed to the developer of the webpage, and the developer can use the operational data as reference data to provide reference for actual product operation and design troubleshooting, and provide a basis for front-end interaction design.
本实施例中提供的前端用户行为统计方法,通过在执行页面对应模块的业务文件的过程中,对隶属于页面的页面点击事件进行监听,确定监听到页面点击事件对应的目标对象,判断目标对象是否为埋点规则中限定的埋点对象,在目标对象开启埋点功能时,则可以对前端用户的点击行为进行埋点记录,依据埋点记录统计前端用户的行为数据。本实施例基于在模块中加载的埋点规则,实现对网页的前端用户行为的全局统计,能够获取页面全局的行为数据,便于对页面后期维护或者完善提供参考依据。The front-end user behavior statistics method provided in this embodiment monitors the page click event belonging to the page in the process of executing the business file of the corresponding module of the page, determines the target object corresponding to the page click event, and determines the target object. Whether it is a buried point object defined in the burying rule, when the target object turns on the burying point function, the front end user's click behavior can be buried and recorded, and the front end user's behavior data is counted according to the burying point record. In this embodiment, based on the burying rules loaded in the module, global statistics on the front-end user behavior of the webpage are obtained, and the behavior data of the global page can be obtained, which is convenient for providing reference for the later maintenance or improvement of the page.
实施例六Embodiment 6
如图6所示,其为本发明实施例六的前端用户行为统计装置的结构示意图。该前端用户行为统计装置包括:获取模块11、监听模块12和统计模块13。 FIG. 6 is a schematic structural diagram of a front-end user behavior statistics apparatus according to Embodiment 6 of the present invention. The front-end user behavior statistics device includes: an obtaining module 11, a listening module 12, and a statistics module 13.
其中,获取模块11,用于获取为页面预先设定的埋点规则。The obtaining module 11 is configured to acquire a burying rule preset for the page.
本实施例中,预先为页面设置埋点规则,具体地,获取页面的所有控件,根据统计需求为不同的控件设置埋点规则。可选地获取各控件的类型,为同一个类型的所有控件设置相同的埋点规则。In this embodiment, a burying rule is set for the page in advance, specifically, all the controls of the page are acquired, and burying rules are set for different controls according to statistical requirements. Optionally get the type of each control and set the same burying rule for all controls of the same type.
其中,埋点规则中限定了该页面的埋点对象,并且设置有与埋点对象相应的统计策略。The buried point rule defines a buried point object of the page, and a statistical strategy corresponding to the buried point object is set.
在页面运行之间,获取模块11需要获取该页面的埋点规则,具体地,在启动页面时,获取模块11将埋点规则加载到页面的业务文件中。其中,页面的业务文件为页面的业务处理流程。During the running of the page, the obtaining module 11 needs to obtain the burying rule of the page. Specifically, when the page is started, the obtaining module 11 loads the burying rule into the business file of the page. The business file of the page is the business process flow of the page.
监听模块12,用于在页面运行过程中,对页面的页面点击事件进行监听。The monitoring module 12 is configured to monitor a page click event of the page during the running of the page.
当用户开启页面后,页面的业务文件就可以执行,即页面的业务处理流程被启动,在执行处理流程的过程中,监听模块12对隶属该页面的页面点击事件进行监听。也就是说,当前端用户在网页上进行页面点击时,能够触发一个页面点击事件,页面对应的业务文件就可以监听到该页面点击事件。After the user opens the page, the business file of the page can be executed, that is, the business process flow of the page is started. During the process of executing the process, the monitoring module 12 monitors the page click event belonging to the page. That is to say, when the current end user clicks on the webpage, a page click event can be triggered, and the corresponding business file of the page can monitor the click event of the page.
本实施例中,对页面进行埋点,在该页面启动时即加载页面的业务文件的时候,同时加载该页面对应的埋点规则,相应地就开启埋点的功能,则页面下所有控件的页面点击事件均会被监听模块12监听。In this embodiment, the page is buried, and when the page is loaded, the page's business file is loaded, and the corresponding point burying rule is loaded at the same time, and the function of burying the point is opened accordingly, and all the controls under the page are Page click events are monitored by the listening module 12.
统计模块13,用于在监听到页面点击事件后,基于埋点规则统计页面前端用户的行为数据。The statistics module 13 is configured to collect behavior data of the front-end user of the page based on the burying point rule after the page click event is monitored.
在监听到页面点击事件后,统计模块13确定该页面点击事件对应的目标对象,进一步地,当确定出目标对象后,统计模块13需要判断该目标对象是否开启埋点。本实施例中,开启埋点的对象在埋点规则中进行定义,埋点的对象可以是按钮标签或其它指定的标签等控件。After the page click event is detected, the statistic module 13 determines the target object corresponding to the page click event. Further, after determining the target object, the statistic module 13 needs to determine whether the target object starts the burying point. In this embodiment, the object that opens the buried point is defined in the burying rule, and the object of the burying point may be a button label or other specified label and the like.
本实施例中,埋点对象开启埋点的两种可选方式,可参见上述实施例中的相关记载,此处不再赘述。In this embodiment, the two alternatives for the burying point to open the burying point can be referred to the related description in the foregoing embodiment, and details are not described herein again.
当判断出目标对象开启了埋点,说明可以对目标对象进行埋点记录,统计模块13基于目标对象对应的统计策略对前端用户的用户行为进行监督,这样就可以统计获取到前端用户在使用页面时的行为数据。具体内容可参见上述实施例中相关记载,此处不再赘述。When it is determined that the target object is turned on, it indicates that the target object can be buried. The statistics module 13 supervises the user behavior of the front-end user based on the statistical policy corresponding to the target object, so that the front-end user can use the statistics. Behavior data at the time. For details, refer to related descriptions in the foregoing embodiments, and details are not described herein again.
本实施例提供的前端用户行为统计装置,通过获取为页面预先设定的埋点规则,在 页面运行过程中,对页面的页面点击事件进行监听,在监听到页面点击事件后,基于埋点规则统计该页面前端用户的行为数据。本实施例中为了实现了对页面的自动埋点,先为页面设置埋点规则,在页面运行时由页面点击事件触发埋点开启,解决了现有通过手动埋点存在过错繁琐便捷性较差的问题,而且能够对页面前端用户的行为进行全局统计,统计效率较高。The front-end user behavior statistics device provided in this embodiment obtains a pre-set burying rule for the page, During the running of the page, the page click event of the page is monitored, and after the page click event is monitored, the behavior data of the front end user of the page is counted based on the burying point rule. In this embodiment, in order to realize the automatic burying of the page, the burying rule is set for the page first, and the burying point is triggered by the page click event when the page is running, which solves the problem that the existing manual burying point is cumbersome and convenient. The problem, and the ability to global statistics on the behavior of the front-end users of the page, the statistical efficiency is higher.
实施例七Example 7
如图7所示,其为本发明实施例七的前端用户行为统计装置的结构示意图。该前端用户行为统计装置包括:获取模块11、监听模块12和统计模块13。FIG. 7 is a schematic structural diagram of a front-end user behavior statistics apparatus according to Embodiment 7 of the present invention. The front-end user behavior statistics device includes: an obtaining module 11, a listening module 12, and a statistics module 13.
本实施例中,统计模块13一种可选地结构方式包括:获取单元131、判断单元132、记录单元133和写入单元134。In this embodiment, the statistic module 13 includes an obtaining unit 131, a determining unit 132, a recording unit 133, and a writing unit 134.
其中,获取单元131,用于确定监听到的所述页面点击事件对应的目标对象;The obtaining unit 131 is configured to determine a target object corresponding to the page click event that is monitored;
判断单元132,用于判断所述目标对象是否开启埋点;The determining unit 132 is configured to determine whether the target object opens a buried point;
记录单元133,用于在所述判断单元判断出所述目标对象开启埋点时,对所述目标对象的点击行为进行埋点记录,并依据所述埋点记录和所述目标对象的统计策略统计所述前端用户的行为数据。a recording unit 133, configured to: when the determining unit determines that the target object opens a buried point, perform a buried point recording on the click behavior of the target object, and according to the buried point record and the statistical strategy of the target object Statistics of the behavior of the front-end user.
进一步地,记录单元133,还用于在对所述目标对象的点击行为进行埋点记录的同时,确定与所述点击行为对应的请求事件,对所述请求事件的业务逻辑进行记录。Further, the recording unit 133 is further configured to determine a request event corresponding to the click behavior while performing a buried point recording on the click behavior of the target object, and record the business logic of the request event.
写入单元134,用于在记录的次数超过阈值时,将所述行为数据和所述业务逻辑写入日志文件。The writing unit 134 is configured to write the behavior data and the business logic into a log file when the number of times of recording exceeds a threshold.
进一步地,监听模块12,还用于在所述页面运行的过程中,对页面刷新事件或者页面关闭事件进行监听。Further, the monitoring module 12 is further configured to monitor a page refresh event or a page close event during the running of the page.
写入单元134,还用于在监听模块12监听到所述页面刷新事件或者所述页面关闭事件时,将所述行为数据和所述业务逻辑写入日志文件。The writing unit 134 is further configured to write the behavior data and the business logic to the log file when the listening module 12 listens to the page refresh event or the page close event.
可选地,行为数据和业务逻辑先在前端进行本地保存,实际应用中,为了缓解本地存储的压力,可以在记录的次数超过阈值时,批量地将记录的行为数据和业务逻辑发送到服务器上进行保存,在接收到行为数据和业务逻辑后,服务器可以按照设定的数据格式写入到日志文件中。Optionally, the behavior data and the service logic are locally saved in the front end. In actual application, in order to alleviate the pressure of the local storage, the recorded behavior data and the business logic may be sent to the server in batches when the number of records exceeds the threshold. After saving, after receiving the behavior data and business logic, the server can write to the log file according to the set data format.
可选地,当监听到页面刷新事件或者页面关闭事件后,为了避免信息的丢失,将记录的行为数据和业务逻辑发送到后端的服务器进行保存。服务器在接收到行为数据和业务逻辑后,可以按照设定的数据格式写入到日志文件中。 Optionally, after the page refresh event or the page close event is detected, in order to avoid information loss, the recorded behavior data and business logic are sent to the server at the back end for storage. After receiving the behavior data and business logic, the server can write to the log file according to the set data format.
本实施例中,获取模块11一种可选地结构方式包括:模块化单元111和获取单元112。In this embodiment, an optional structure of the obtaining module 11 includes: a modular unit 111 and an obtaining unit 112.
其中,模块化单元11,用于将所述页面进行模块化处理。The modular unit 11 is configured to perform modular processing on the page.
获取单元112,用于在启动所述页面时,将所述埋点规则加载到所述页面对应的模块的业务文件中。其中,所述业务文件为所述页面的业务处理流程。The obtaining unit 112 is configured to load the burying rule into a service file of a module corresponding to the page when the page is started. The service file is a service processing flow of the page.
获取单元112一种可选地结构方式包括:加载子单元1121、解析子单元1122、封装子单元1123、渲染子单元1124和解封装子单元1125。An optional structure of the obtaining unit 112 includes: a loading subunit 1121, a parsing subunit 1122, a packaging subunit 1123, a rendering subunit 1124, and a decapsulating subunit 1125.
解析子单元1122,用于对所述业务文件解析,以获取所述依赖文件。The parsing subunit 1122 is configured to parse the service file to obtain the dependency file.
解析子单元1122用于在加载子单元1121加载页面对应模块的业务文件之后,解析业务文件,以获取页面对应模块的依赖文件。The parsing subunit 1122 is configured to parse the service file after the loading subunit 1121 loads the service file of the page corresponding module to obtain the dependent file of the page corresponding module.
一般页面的模块会有三种依赖文件HTML依赖文件、CSS依赖文件和JS依赖文件。The general page module has three dependent file HTML dependent files, CSS dependent files, and JS dependent files.
加载子单元1121具体用于加载页面的业务文件,在加载页面的业务文件的埋点规则。进一步地,加载子单元1121具体用于加载超级文本标记语言HTML依赖文件、层叠样式表CSS依赖文件和JS依赖文件。The loading sub-unit 1121 is specifically configured to load a business file of the page, and a burying rule of the business file in the loading page. Further, the loading sub-unit 1121 is specifically configured to load a hypertext markup language HTML dependent file, a cascading style sheet CSS dependent file, and a JS dependent file.
封装子单元1123,用于封装所述业务文件。The encapsulation subunit 1123 is configured to encapsulate the service file.
在加载子单元1121加载依赖文件和预先为页面对应模块配置的埋点规则之前,封装子单元1123封装该业务文件的业务处理流程。The packaging subunit 1123 encapsulates the service processing flow of the service file before the loading subunit 1121 loads the dependency file and the burying rule configured in advance for the page corresponding module.
解封装子单元1125,用于解除对所述业务文件的封装。The decapsulation subunit 1125 is configured to release the encapsulation of the service file.
在统计模块13执行业务文件基于埋点规则限定的埋点对象,统计获取页面前端用户的行为数据之前,解封装子单元1125解除对该业务文件的封装。Before the statistic module 13 executes the burying point object defined by the traversing point rule of the service file, and before collecting the behavior data of the front end user of the page, the decapsulation subunit 1125 releases the encapsulation of the service file.
渲染子单元1124用于对所述业务文件进行超级文本标记语言HTML模板渲染和层叠样式表CSS渲染。The rendering sub-unit 1124 is configured to perform hypertext markup language HTML template rendering and cascading style sheet CSS rendering on the business file.
在解封装子单元1125解除对业务文件的封装之前,使用依赖文件对该业务文件进行HTML模板渲染和CSS渲染。Before the decapsulation subunit 1125 unpacks the business file, the business file is subjected to HTML template rendering and CSS rendering using a dependency file.
本实施例提供的前端用户行为统计装置的各功能模块可用于执行图1~5所示的前端用户行为统计方法的流程,其具体工作原理不再赘述,详见方法实施例的描述。The function modules of the front-end user behavior statistics device provided in this embodiment can be used to execute the flow of the front-end user behavior statistics method shown in FIG. 1 to FIG. 5, and the specific working principle is not described here. For details, refer to the description of the method embodiment.
本实施例中,在页面进行了模块化的基础之上,为页面对应模块配置埋点规则,当执行页面的业务文件,则获取相应的埋点规则,在执行业务文件的过程中基于埋点规则,获取页面前端用户的行为数据,实现对页面的全局自动埋点,能够对页面前端用户行为的全局统计,且统计效率较高。 In this embodiment, on the basis of the modularization of the page, a burying rule is configured for the page corresponding module, and when the business file of the page is executed, the corresponding burying rule is obtained, and the burying point is performed in the process of executing the business file. The rule obtains the behavior data of the user at the front end of the page, realizes the global automatic burying of the page, and can globally count the behavior of the user at the front end of the page, and the statistical efficiency is high.
本领域普通技术人员可以理解:实现上述各方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成。前述的程序可以存储于一计算机可读取存储介质中。该程序在执行时,执行包括上述各方法实施例的步骤;而前述的存储介质包括:ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。One of ordinary skill in the art will appreciate that all or part of the steps to implement the various method embodiments described above may be accomplished by hardware associated with the program instructions. The aforementioned program can be stored in a computer readable storage medium. The program, when executed, performs the steps including the foregoing method embodiments; and the foregoing storage medium includes various media that can store program codes, such as a ROM, a RAM, a magnetic disk, or an optical disk.
最后应说明的是:以上各实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述各实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的范围。 Finally, it should be noted that the above embodiments are merely illustrative of the technical solutions of the present invention, and are not intended to be limiting; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art will understand that The technical solutions described in the foregoing embodiments may be modified, or some or all of the technical features may be equivalently replaced; and the modifications or substitutions do not deviate from the technical solutions of the embodiments of the present invention. range.

Claims (16)

  1. 一种前端用户行为统计方法,其特征在于,包括:A front-end user behavior statistics method, comprising:
    获取为页面预先设定的埋点规则;Obtain a burying rule pre-set for the page;
    在所述页面运行过程中,对所述页面的页面点击事件进行监听;During the running of the page, the page click event of the page is monitored;
    在监听到所述页面点击事件后,基于所述埋点规则统计所述页面前端用户的行为数据。After the page click event is monitored, the behavior data of the front end user of the page is counted according to the buried point rule.
  2. 根据权利要求1所述的前端用户行为统计方法,其特征在于,所述在监听到所述页面点击事件后,基于所述埋点规则统计所述页面前端用户的行为数据,包括:The front-end user behavior statistics method according to claim 1, wherein after the monitoring of the page click event, the behavior data of the front-end user of the page is calculated based on the burying point rule, including:
    确定监听到的所述页面点击事件对应的目标对象;Determining a target object corresponding to the page click event that is monitored;
    判断所述目标对象是否开启埋点;Determining whether the target object opens a buried point;
    如果判断结果为是,对所述目标对象的点击行为进行埋点记录,并依据所述埋点记录和所述目标对象对应的统计策略统计所述前端用户的行为数据。If the result of the determination is yes, the click behavior of the target object is buried, and the behavior data of the front-end user is counted according to the buried point record and a statistical policy corresponding to the target object.
  3. 根据权利要求2所述的前端用户行为统计方法,其特征在于,还包括:The front-end user behavior statistics method according to claim 2, further comprising:
    在对所述目标对象的点击行为进行埋点记录的同时,确定与所述点击行为对应的请求事件,对所述请求事件的业务逻辑进行记录。While performing a buried point recording on the click behavior of the target object, determining a request event corresponding to the click behavior, and recording a business logic of the request event.
  4. 根据权利要求3所述的前端用户行为统计方法,其特征在于,所述依据所述埋点记录和所述目标对象对应的统计策略统计前端用户的所述行为数据之后,还包括:The front-end user behavior statistics method according to claim 3, wherein the collecting the behavior data of the front-end user according to the burying point record and the statistical policy corresponding to the target object further includes:
    在记录的次数超过阈值时,将所述行为数据和所述业务逻辑写入日志文件。The behavior data and the business logic are written to the log file when the number of records exceeds a threshold.
  5. 根据权利要求4所述的前端用户行为统计方法,其特征在于,所述依据所述埋点记录和所述目标对象对应的统计策略统计前端用户的所述行为数据之后,还包括:The front-end user behavior statistics method according to claim 4, wherein the calculating the behavior data of the front-end user according to the burying point record and the statistical policy corresponding to the target object further includes:
    在所述页面运行的过程中,对页面刷新事件或者页面关闭事件进行监听;Listening to a page refresh event or a page close event during the running of the page;
    当监听到所述页面刷新事件或者所述页面关闭事件时,将所述行为数据和所述业务逻辑写入日志文件。The behavior data and the business logic are written to the log file when the page refresh event or the page close event is listened to.
  6. 根据权利要求1-5任一项所述的前端用户行为统计方法,其特征在于,所述获取为页面预先设定的埋点规则,包括:The front-end user behavior statistics method according to any one of claims 1-5, wherein the obtaining is a pre-set burying rule for the page, including:
    将所述页面进行模块化处理;Modulating the page;
    在启动所述页面时,将所述埋点规则加载到所述页面对应的模块的业务文件中;When the page is started, the burying rule is loaded into a service file of a module corresponding to the page;
    其中,所述业务文件为所述页面的业务处理流程。The service file is a service processing flow of the page.
  7. 根据权利要求6所述的前端用户行为统计方法,其特征在于,所述在启动所述页面时,将预设的埋点规则加载到所述页面对应的模块的业务文件中,包括: The front-end user behavior statistics method according to claim 6, wherein when the page is started, the preset burying rule is loaded into the service file of the module corresponding to the page, including:
    加载所述页面的业务文件;Loading the business file of the page;
    对所述业务文件解析,以获取所述页面运行时所需的依赖文件;Parsing the business file to obtain a dependency file required for the page to run;
    封装所述业务文件;Encapsulating the business file;
    加载所述依赖文件和所述埋点规则;Loading the dependency file and the burying rule;
    对所述业务文件进行超级文本标记语言HTML模板渲染和层叠样式表CSS渲染;Performing a hypertext markup language HTML template rendering and a cascading style sheet CSS rendering on the business file;
    解除对所述业务文件的封装。Unpack the business file.
  8. 根据权利要求7所述的前端用户行为统计方法,其特征在于,所述在所述页面运行过程中,对所述页面的页面点击事件进行监听,包括:The front-end user behavior statistics method according to claim 7, wherein the monitoring of the page click event of the page during the running of the page comprises:
    通过执行所述业务文件运行所述页面,在运行过程中对隶属于所述页面点击事件进行监听。The page is accessed by executing the business file, and the click event belonging to the page is monitored during the running process.
  9. 一种前端用户行为统计装置,其特征在于,包括:A front-end user behavior statistics device, comprising:
    获取模块,用于获取为页面预先设定的埋点规则;The obtaining module is configured to obtain a burying rule preset for the page;
    监听模块,用于在所述页面运行过程中,对所述页面的页面点击事件进行监听;a monitoring module, configured to monitor a page click event of the page during the running of the page;
    统计模块,用于在监听到所述页面点击事件后,基于所述埋点规则统计所述页面前端用户的行为数据。The statistic module is configured to collect behavior data of the front end user of the page based on the burying point rule after the page click event is monitored.
  10. 根据权利要求9所述的前端用户行为统计装置,其特征在于,所述统计模块,包括:The front-end user behavior statistics apparatus according to claim 9, wherein the statistics module comprises:
    获取单元,用于确定监听到的所述页面点击事件对应的目标对象;An obtaining unit, configured to determine a target object corresponding to the page click event that is monitored;
    判断单元,用于判断所述目标对象是否开启埋点;a determining unit, configured to determine whether the target object opens a buried point;
    记录单元,用于在所述判断单元判断出所述目标对象开启埋点时,对所述目标对象的点击行为进行埋点记录,并依据所述埋点记录和所述目标对象的统计策略统计所述前端用户的行为数据。a recording unit, configured to: when the determining unit determines that the target object opens a buried point, perform a buried point recording on the click behavior of the target object, and perform statistics according to the buried point record and the statistical strategy of the target object. Behavior data of the front-end user.
  11. 根据权利要求10所述的前端用户行为统计装置,其特征在于,所述记录单元,还用于在对所述目标对象的点击行为进行埋点记录的同时,确定与所述点击行为对应的请求事件,对所述请求事件的业务逻辑进行记录。The front-end user behavior statistics device according to claim 10, wherein the recording unit is further configured to: determine a request corresponding to the click behavior while performing a buried point recording on the click behavior of the target object An event that records the business logic of the request event.
  12. 根据权利要求11所述的前端用户行为统计装置,其特征在于,所述统计模块,还包括:The front-end user behavior statistics apparatus according to claim 11, wherein the statistics module further comprises:
    写入单元,用于在记录的次数超过阈值时,将所述行为数据和所述业务逻辑写入日志文件。a writing unit, configured to write the behavior data and the business logic to a log file when the number of records exceeds a threshold.
  13. 根据权利要求12所述的前端用户行为统计装置,其特征在于,所述监听模块, 还用于在所述页面运行的过程中,对页面刷新事件或者页面关闭事件进行监听;The front-end user behavior statistics device according to claim 12, wherein the monitoring module, It is also used to monitor a page refresh event or a page close event during the running of the page;
    所述写入单元,还用于在所述监听模块监听到所述页面刷新事件或者所述页面关闭事件时,将所述行为数据和所述业务逻辑写入日志文件。The writing unit is further configured to write the behavior data and the service logic into a log file when the listening module listens to the page refresh event or the page close event.
  14. 根据权利要求9-13任一项所述的前端用户行为统计装置,其特征在于,所述获取模块,包括:The front-end user behavior statistics device according to any one of claims 9 to 13, wherein the obtaining module comprises:
    模块化单元,用于将所述页面进行模块化处理;a modular unit for modular processing of the page;
    获取单元,用于在启动所述页面时,将所述埋点规则加载到所述页面对应的模块的业务文件中;An obtaining unit, configured to load the burying rule into a service file of a module corresponding to the page when the page is started;
    其中,所述业务文件为所述页面的业务处理流程。The service file is a service processing flow of the page.
  15. 根据权利要求14所述的前端用户行为统计装置,其特征在于,所述获取单元,包括:The apparatus for estimating the front-end user behavior according to claim 14, wherein the obtaining unit comprises:
    加载子单元,用于加载所述页面的业务文件、所述页面运行时所需的依赖文件以及所述埋点规则;a loading subunit, configured to load a business file of the page, a dependency file required for the page to run, and the burying rule;
    解析子单元,用于对所述业务文件解析,以获取所述依赖文件;a parsing subunit, configured to parse the service file to obtain the dependency file;
    封装子单元,用于封装所述业务文件;a packaging subunit, configured to encapsulate the service file;
    渲染子单元,用于对所述业务文件进行超级文本标记语言HTML模板渲染和层叠样式表CSS渲染;a rendering subunit for performing hypertext markup language HTML template rendering and cascading style sheet CSS rendering on the business file;
    解封装子单元,用于解除对所述业务文件的封装。The decapsulation subunit is configured to release the encapsulation of the service file.
  16. 根据权利要求15所述的前端用户行为统计装置,其特征在于,所述监听模块,具体用于通过执行所述业务文件运行所述页面,在运行过程中对隶属于所述页面点击事件进行监听。 The front-end user behavior statistics device according to claim 15, wherein the monitoring module is configured to: run the page by executing the service file, and monitor the click event belonging to the page during the running process. .
PCT/CN2017/077244 2016-04-01 2017-03-20 Statistical method and apparatus for behaviors of front-end users WO2017167042A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610204743.XA CN107295050B (en) 2016-04-01 2016-04-01 Front-end user behavior statistical method and device
CN201610204743.X 2016-04-01

Publications (1)

Publication Number Publication Date
WO2017167042A1 true WO2017167042A1 (en) 2017-10-05

Family

ID=59963450

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/077244 WO2017167042A1 (en) 2016-04-01 2017-03-20 Statistical method and apparatus for behaviors of front-end users

Country Status (3)

Country Link
CN (1) CN107295050B (en)
TW (1) TWI753887B (en)
WO (1) WO2017167042A1 (en)

Cited By (31)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108536589A (en) * 2018-03-26 2018-09-14 广州小鹏汽车科技有限公司 A kind of application program buries point methods and system
CN108733559A (en) * 2018-04-09 2018-11-02 平安普惠企业管理有限公司 Triggering method, terminal device and the medium of page events
CN109240664A (en) * 2018-08-22 2019-01-18 平安普惠企业管理有限公司 A kind of method and terminal acquiring user behavior information
CN109542529A (en) * 2018-10-26 2019-03-29 深圳壹账通智能科技有限公司 Point methods, device, computer equipment and storage medium are buried based on function name
CN109684583A (en) * 2018-11-12 2019-04-26 深圳壹账通智能科技有限公司 Analysis method, device, terminal and the readable storage medium storing program for executing of Page user behavior
CN109767259A (en) * 2018-12-15 2019-05-17 深圳壹账通智能科技有限公司 Based on operation event promotion method, apparatus, equipment and the medium for burying point data
CN109902253A (en) * 2019-01-18 2019-06-18 中国平安人寿保险股份有限公司 Page data acquisition method and device, electronic equipment, storage medium
CN109960633A (en) * 2019-03-28 2019-07-02 深圳市跃动运营科技有限公司 A kind of data visualization buries point methods, storage medium and intelligent terminal
CN110020912A (en) * 2019-01-31 2019-07-16 阿里巴巴集团控股有限公司 Page display method, device and equipment
WO2019153479A1 (en) * 2018-02-06 2019-08-15 武汉斗鱼网络科技有限公司 Browser page monitoring method and apparatus, and computer device
CN110457089A (en) * 2019-07-05 2019-11-15 中国平安人寿保险股份有限公司 Collecting method, device, computer readable storage medium and computer equipment
CN110659188A (en) * 2019-08-14 2020-01-07 平安普惠企业管理有限公司 Page portrait data processing method and device, computer equipment and storage medium
CN110825594A (en) * 2018-08-07 2020-02-21 北京优酷科技有限公司 Data reporting and issuing method, client and server
CN111061627A (en) * 2019-11-20 2020-04-24 北京达佳互联信息技术有限公司 Webpage point burying method and device, electronic equipment and storage medium
CN111159590A (en) * 2019-12-31 2020-05-15 亚信科技(中国)有限公司 Serial connection method and device based on front-end and back-end service call links
CN111193613A (en) * 2019-12-10 2020-05-22 北京你财富计算机科技有限公司 Method, device and system for collecting dotting information at client application
CN111797025A (en) * 2020-07-17 2020-10-20 北京中指讯博数据信息技术有限公司 Data processing method and device for application
CN111901192A (en) * 2020-07-15 2020-11-06 腾讯科技(深圳)有限公司 Statistical method and device for page access data
CN111930422A (en) * 2020-09-02 2020-11-13 上海优扬新媒信息技术有限公司 Information acquisition method, device, server and storage medium
CN112000541A (en) * 2020-07-23 2020-11-27 招联消费金融有限公司 Buried point data reporting method and device, computer equipment and storage medium
CN112102008A (en) * 2020-09-25 2020-12-18 中国建设银行股份有限公司 Configurable user behavior acquisition method and device
CN112181770A (en) * 2020-09-28 2021-01-05 北京达佳互联信息技术有限公司 Method, device and system for setting buried object
CN112905427A (en) * 2019-12-04 2021-06-04 北京沃东天骏信息技术有限公司 Data processing method and device
CN113010831A (en) * 2021-04-06 2021-06-22 金宝贝网络科技(苏州)有限公司 Thermodynamic diagram optimization method, thermodynamic diagram optimization system and storage medium
CN113239251A (en) * 2021-05-27 2021-08-10 深圳市金蝶天燕云计算股份有限公司 Processing method of buried point data, related device and storage medium
CN113505079A (en) * 2021-07-27 2021-10-15 平安普惠企业管理有限公司 Application program testing method, device, equipment and medium
CN113590959A (en) * 2021-08-02 2021-11-02 北京奇艺世纪科技有限公司 User behavior data acquisition method, device, equipment and storage medium
CN113807880A (en) * 2021-04-21 2021-12-17 北京沃东天骏信息技术有限公司 Method and device for data monitoring, electronic equipment and storage medium
CN115022388A (en) * 2022-05-31 2022-09-06 济南浪潮数据技术有限公司 Data acquisition method, device, equipment and medium
CN115510352A (en) * 2022-11-15 2022-12-23 中国外运股份有限公司 User behavior acquisition method and device, electronic equipment and storage medium
CN117290256A (en) * 2023-11-24 2023-12-26 北京中指实证数据信息技术有限公司 Code burying method for counting user behaviors

Families Citing this family (36)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108810057B (en) * 2017-05-05 2021-05-07 腾讯科技(深圳)有限公司 User behavior data acquisition method and device and storage medium
CN109857461B (en) * 2017-11-27 2021-03-30 北京京东尚科信息技术有限公司 Page generation method and device
CN108038053B (en) * 2017-11-29 2019-07-26 上海恺英网络科技有限公司 A kind of dynamic configuration buries method and apparatus a little
CN110347945A (en) * 2018-01-15 2019-10-18 北京京东金融科技控股有限公司 The method and apparatus for obtaining the data of the page
CN108197002B (en) * 2018-01-16 2021-03-16 吉浦斯信息咨询(深圳)有限公司 Mobile device non-buried point data statistical method, system, terminal and medium
CN110704771B (en) * 2018-06-22 2024-03-01 北京京东尚科信息技术有限公司 Page abnormality monitoring method, system, device, electronic equipment and readable medium
CN109101425B (en) * 2018-08-14 2021-12-07 创新先进技术有限公司 Index point burying method and device for dynamic page AB test
CN111105259B (en) * 2018-10-29 2024-04-02 北京奇虎科技有限公司 User identification method, device, electronic equipment and storage medium
CN109582418A (en) * 2018-11-21 2019-04-05 平安科技(深圳)有限公司 User behavior data collection method, device, computer installation, storage medium
CN109819098A (en) * 2018-12-11 2019-05-28 平安科技(深圳)有限公司 Menu option display methods, server, system and computer readable storage medium
CN109688207B (en) * 2018-12-11 2022-06-03 北京云中融信网络科技有限公司 Log transmission method and device and server
CN109933317B (en) * 2018-12-24 2023-04-11 创新先进技术有限公司 Point burying method, device, server and readable storage medium
CN109885305B (en) * 2019-02-26 2022-10-28 广州虎牙信息科技有限公司 Method, device, equipment and storage medium for processing special topic pages
CN109871212B (en) * 2019-02-26 2022-10-28 广州虎牙信息科技有限公司 Method, device and equipment for processing special topic page and storage medium
CN110083459A (en) * 2019-03-16 2019-08-02 平安城市建设科技(深圳)有限公司 The data in cross-page face bury point methods, device, equipment and storage medium
CN110019079A (en) * 2019-04-19 2019-07-16 山东浪潮云信息技术有限公司 A kind of front end log collecting method and device
CN110109700B (en) * 2019-05-08 2023-06-30 吉旗(成都)科技有限公司 Data statistics method and device for iOS App without buried points
CN110298000A (en) * 2019-05-21 2019-10-01 平安普惠企业管理有限公司 Acquisition methods, terminal device and the medium of page parameter
CN110569185A (en) * 2019-08-02 2019-12-13 贝壳技术有限公司 front-end point burying method and device
CN110781061B (en) * 2019-09-20 2022-11-25 平安科技(深圳)有限公司 Method and device for recording user behavior link
CN110990619B (en) * 2019-10-12 2023-09-01 平安银行股份有限公司 Buried data query method, buried data query device, buried data query system, buried data query device and computer storage medium
CN112711731A (en) * 2019-10-25 2021-04-27 腾讯科技(深圳)有限公司 Data point burying method, device, equipment and storage medium
CN112733008A (en) * 2019-10-28 2021-04-30 浙江大搜车软件技术有限公司 Label value generation method and device, electronic equipment and storage medium
CN111191998A (en) * 2019-10-29 2020-05-22 腾讯科技(深圳)有限公司 Item processing method and device
CN110933165A (en) * 2019-11-27 2020-03-27 中国银行股份有限公司 Operation behavior tracking method and device
CN111241446B (en) * 2020-01-13 2023-10-31 杭州安恒信息技术股份有限公司 Method, device, equipment and medium for extracting text content of web page
CN111695064B (en) * 2020-04-29 2023-08-18 北京城市网邻信息技术有限公司 Buried point loading method and device
CN112148413A (en) * 2020-09-29 2020-12-29 无线生活(杭州)信息科技有限公司 Page optimization method and device
CN112256701A (en) * 2020-10-22 2021-01-22 广东万唯计算机服务有限公司 Dynamic buried point data acquisition system and use method thereof
CN112199267A (en) * 2020-11-12 2021-01-08 支付宝(杭州)信息技术有限公司 Behavior log acquisition method and device
CN113761415A (en) * 2020-11-24 2021-12-07 北京沃东天骏信息技术有限公司 Page display method and device
CN113204463A (en) * 2021-04-21 2021-08-03 宝宝巴士股份有限公司 Embedding point statistical method and device for apk download installation rate
CN113138905A (en) * 2021-05-11 2021-07-20 北京京东拓先科技有限公司 Software function monitoring method and device
CN113485883B (en) * 2021-05-31 2024-02-13 济南浪潮数据技术有限公司 Optimization monitoring method, device, equipment and medium for server virtualization system
CN114138630B (en) * 2021-11-10 2023-06-30 浪潮卓数大数据产业发展有限公司 Buried point data collection method and device based on ES6 decorator
CN114489660B (en) * 2021-12-22 2024-03-08 抖音视界有限公司 Buried point code adding method, device and equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103916293A (en) * 2014-04-15 2014-07-09 浪潮软件股份有限公司 Method for monitoring and analyzing website user behaviors
CN104348650A (en) * 2013-08-05 2015-02-11 腾讯科技(深圳)有限公司 Website monitoring method, business device and website monitoring system
CN104915398A (en) * 2015-05-29 2015-09-16 北京京东尚科信息技术有限公司 Method and device for webpage point burying
CN105162822A (en) * 2015-06-30 2015-12-16 浪潮(北京)电子信息产业有限公司 Website log data processing method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104683294B (en) * 2013-11-27 2019-01-18 阿里巴巴集团控股有限公司 A kind of data processing method and system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104348650A (en) * 2013-08-05 2015-02-11 腾讯科技(深圳)有限公司 Website monitoring method, business device and website monitoring system
CN103916293A (en) * 2014-04-15 2014-07-09 浪潮软件股份有限公司 Method for monitoring and analyzing website user behaviors
CN104915398A (en) * 2015-05-29 2015-09-16 北京京东尚科信息技术有限公司 Method and device for webpage point burying
CN105162822A (en) * 2015-06-30 2015-12-16 浪潮(北京)电子信息产业有限公司 Website log data processing method and device

Cited By (43)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019153479A1 (en) * 2018-02-06 2019-08-15 武汉斗鱼网络科技有限公司 Browser page monitoring method and apparatus, and computer device
CN108536589A (en) * 2018-03-26 2018-09-14 广州小鹏汽车科技有限公司 A kind of application program buries point methods and system
CN108733559A (en) * 2018-04-09 2018-11-02 平安普惠企业管理有限公司 Triggering method, terminal device and the medium of page events
CN108733559B (en) * 2018-04-09 2023-03-28 平安普惠企业管理有限公司 Page event triggering method, terminal equipment and medium
CN110825594B (en) * 2018-08-07 2023-10-24 阿里巴巴(中国)有限公司 Data reporting and issuing method, client and server
CN110825594A (en) * 2018-08-07 2020-02-21 北京优酷科技有限公司 Data reporting and issuing method, client and server
CN109240664A (en) * 2018-08-22 2019-01-18 平安普惠企业管理有限公司 A kind of method and terminal acquiring user behavior information
CN109240664B (en) * 2018-08-22 2023-04-28 平安普惠企业管理有限公司 Method and terminal for collecting user behavior information
CN109542529A (en) * 2018-10-26 2019-03-29 深圳壹账通智能科技有限公司 Point methods, device, computer equipment and storage medium are buried based on function name
CN109542529B (en) * 2018-10-26 2022-04-05 深圳壹账通智能科技有限公司 Function name-based point burying method and device, computer equipment and storage medium
CN109684583A (en) * 2018-11-12 2019-04-26 深圳壹账通智能科技有限公司 Analysis method, device, terminal and the readable storage medium storing program for executing of Page user behavior
CN109767259A (en) * 2018-12-15 2019-05-17 深圳壹账通智能科技有限公司 Based on operation event promotion method, apparatus, equipment and the medium for burying point data
CN109902253A (en) * 2019-01-18 2019-06-18 中国平安人寿保险股份有限公司 Page data acquisition method and device, electronic equipment, storage medium
CN110020912A (en) * 2019-01-31 2019-07-16 阿里巴巴集团控股有限公司 Page display method, device and equipment
CN110020912B (en) * 2019-01-31 2022-03-22 创新先进技术有限公司 Page display method, device and equipment
CN109960633A (en) * 2019-03-28 2019-07-02 深圳市跃动运营科技有限公司 A kind of data visualization buries point methods, storage medium and intelligent terminal
CN110457089A (en) * 2019-07-05 2019-11-15 中国平安人寿保险股份有限公司 Collecting method, device, computer readable storage medium and computer equipment
CN110457089B (en) * 2019-07-05 2023-09-26 中国平安人寿保险股份有限公司 Data acquisition method, data acquisition device, computer readable storage medium and computer equipment
CN110659188A (en) * 2019-08-14 2020-01-07 平安普惠企业管理有限公司 Page portrait data processing method and device, computer equipment and storage medium
CN111061627A (en) * 2019-11-20 2020-04-24 北京达佳互联信息技术有限公司 Webpage point burying method and device, electronic equipment and storage medium
CN111061627B (en) * 2019-11-20 2023-10-03 北京达佳互联信息技术有限公司 Webpage embedding method and device, electronic equipment and storage medium
CN112905427A (en) * 2019-12-04 2021-06-04 北京沃东天骏信息技术有限公司 Data processing method and device
CN111193613A (en) * 2019-12-10 2020-05-22 北京你财富计算机科技有限公司 Method, device and system for collecting dotting information at client application
CN111159590A (en) * 2019-12-31 2020-05-15 亚信科技(中国)有限公司 Serial connection method and device based on front-end and back-end service call links
CN111901192B (en) * 2020-07-15 2023-09-12 腾讯科技(深圳)有限公司 Statistical method and device for page access data
CN111901192A (en) * 2020-07-15 2020-11-06 腾讯科技(深圳)有限公司 Statistical method and device for page access data
CN111797025B (en) * 2020-07-17 2023-11-14 北京中指讯博数据信息技术有限公司 Application-oriented data processing method and device
CN111797025A (en) * 2020-07-17 2020-10-20 北京中指讯博数据信息技术有限公司 Data processing method and device for application
CN112000541A (en) * 2020-07-23 2020-11-27 招联消费金融有限公司 Buried point data reporting method and device, computer equipment and storage medium
CN111930422B (en) * 2020-09-02 2023-07-25 度小满科技(北京)有限公司 Information acquisition method, device, server and storage medium
CN111930422A (en) * 2020-09-02 2020-11-13 上海优扬新媒信息技术有限公司 Information acquisition method, device, server and storage medium
CN112102008A (en) * 2020-09-25 2020-12-18 中国建设银行股份有限公司 Configurable user behavior acquisition method and device
CN112181770A (en) * 2020-09-28 2021-01-05 北京达佳互联信息技术有限公司 Method, device and system for setting buried object
CN113010831A (en) * 2021-04-06 2021-06-22 金宝贝网络科技(苏州)有限公司 Thermodynamic diagram optimization method, thermodynamic diagram optimization system and storage medium
CN113807880A (en) * 2021-04-21 2021-12-17 北京沃东天骏信息技术有限公司 Method and device for data monitoring, electronic equipment and storage medium
CN113239251A (en) * 2021-05-27 2021-08-10 深圳市金蝶天燕云计算股份有限公司 Processing method of buried point data, related device and storage medium
CN113505079A (en) * 2021-07-27 2021-10-15 平安普惠企业管理有限公司 Application program testing method, device, equipment and medium
CN113590959B (en) * 2021-08-02 2023-07-28 北京奇艺世纪科技有限公司 User behavior data acquisition method, device, equipment and storage medium
CN113590959A (en) * 2021-08-02 2021-11-02 北京奇艺世纪科技有限公司 User behavior data acquisition method, device, equipment and storage medium
CN115022388A (en) * 2022-05-31 2022-09-06 济南浪潮数据技术有限公司 Data acquisition method, device, equipment and medium
CN115510352A (en) * 2022-11-15 2022-12-23 中国外运股份有限公司 User behavior acquisition method and device, electronic equipment and storage medium
CN115510352B (en) * 2022-11-15 2023-05-05 中国外运股份有限公司 User behavior acquisition method and device, electronic equipment and storage medium
CN117290256A (en) * 2023-11-24 2023-12-26 北京中指实证数据信息技术有限公司 Code burying method for counting user behaviors

Also Published As

Publication number Publication date
TWI753887B (en) 2022-02-01
TW201810076A (en) 2018-03-16
CN107295050A (en) 2017-10-24
CN107295050B (en) 2021-05-11

Similar Documents

Publication Publication Date Title
WO2017167042A1 (en) Statistical method and apparatus for behaviors of front-end users
US8413044B2 (en) Method and system of retrieving Ajax web page content
US20200357007A1 (en) Page data acquisition method, apparatus, server, electronic device and computer readable medium
US7941789B2 (en) Common performance trace mechanism
CN102999314B (en) Delay tracker instrument immediately
CN110020339B (en) Webpage data acquisition method and device based on non-buried point
US20140137006A1 (en) Graphical Overlay Related To Data Mining And Analytics
CN108804707A (en) A kind of page processing method, device and relevant device
US20160328314A1 (en) System and method for providing code coverage
CN107632920A (en) A kind of power transmission and transforming equipment monitoring device deep monitored method
CN109635210B (en) Behavior data reporting method, device, equipment and storage medium
CN110188308B (en) Client automatic dotting reporting method, storage medium, equipment and system
CN113656102A (en) Data point burying method and device, storage medium and electronic equipment
US9003378B2 (en) Client-side application script error processing
CN107391528B (en) Front-end component dependent information searching method and equipment
US8756211B2 (en) Electronic content analytics
CN109240664A (en) A kind of method and terminal acquiring user behavior information
CN107729208A (en) A kind of power transmission and transforming equipment monitoring device deep monitored system
WO2023169165A1 (en) Access data processing method and apparatus, electronic device, and computer readable medium
CN104331512A (en) Automatic BBS (bulletin board system) page acquisition method
CN109062784B (en) Interface parameter constraint code entry positioning method and system
US20230065492A1 (en) Method for obtaining browser running data, electronic device, and storage medium
CN105975395A (en) Website state reconnaissance method and device
CN112162954B (en) User operation log generation and path positioning method, device, equipment and medium
CN109062785B (en) Interface parameter constraint code positioning method and system

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17773072

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 17773072

Country of ref document: EP

Kind code of ref document: A1