TWI753887B - Front-end user behavior statistics method and device - Google Patents

Front-end user behavior statistics method and device Download PDF

Info

Publication number
TWI753887B
TWI753887B TW106107619A TW106107619A TWI753887B TW I753887 B TWI753887 B TW I753887B TW 106107619 A TW106107619 A TW 106107619A TW 106107619 A TW106107619 A TW 106107619A TW I753887 B TWI753887 B TW I753887B
Authority
TW
Taiwan
Prior art keywords
page
end user
file
business
behavior
Prior art date
Application number
TW106107619A
Other languages
Chinese (zh)
Other versions
TW201810076A (en
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 TW201810076A publication Critical patent/TW201810076A/en
Application granted granted Critical
Publication of TWI753887B publication Critical patent/TWI753887B/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

Landscapes

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

Abstract

本發明提供了前端用戶行為統計方法及裝置,透過獲取為頁面預先設定的埋點規則,在頁面運行過程中,對頁面的頁面點擊事件進行監聽,在監聽到頁面點擊事件後,基於埋點規則統計該頁面前端用戶的行為資料。本發明中為了實現了對頁面的自動埋點,先為頁面設定埋點規則,在頁面運行時由頁面點擊事件觸發埋點開啟,解決了現有透過手動埋點存在過錯繁瑣便捷性較差的問題,而且能夠對頁面前端用戶的行為進行全域統計,統計效率較高。 The invention provides a front-end user behavior statistics method and device. By acquiring the pre-set burying rules for the page, during the running process of the page, the page click event of the page is monitored, and after the page click event is monitored, based on the burying rule Statistics on the behavior data of the front-end users of this page. In the present invention, in order to realize the automatic burying of the page, the burying rule is firstly set for the page, and the page click event triggers the burying to open when the page is running, which solves the problem of the existing manual burying of faults, which is cumbersome, cumbersome, and inconvenient. Moreover, it can conduct global statistics on the behavior of users at the front end of the page, and the statistical efficiency is high.

Description

前端用戶行為統計方法及裝置 Front-end user behavior statistics method and device

本發明關於資料處理技術領域,尤其關於一種前端用戶行為統計方法及裝置。 The present invention relates to the technical field of data processing, and in particular, to a front-end user behavior statistics method and device.

在互聯網高速發展的今天,無論是作為一個電商店鋪的運營人員還是個人站長,如果能夠對用戶在頁面停留期間的一些點擊行為瞭若指掌,並且能夠很好地進行分析的話,將會對在改進網頁的用戶體驗和吸引用戶點擊方面提供最直接和高效的幫助。 In today's rapid development of the Internet, whether as an operator of an e-commerce store or a personal webmaster, if you can understand the click behavior of users during the stay on the page, and can analyze them well, they will be very helpful. Provides the most direct and efficient assistance in improving the user experience of web pages and attracting users to click.

通常透過對頁面進行埋點操作來記錄用戶的點擊行為,通俗的講,頁面埋點就是透過指令碼語言(JavaScript,簡稱JS)方法收集用戶訪問和點擊資料的一種操作。當用戶打開一個網頁並點擊的時候,頁面中的埋點JS代碼就會被執行,該JS代碼會將收集完的資料回傳給網站伺服器。 The user's click behavior is usually recorded by burying the page. In layman's terms, page burying is an operation that collects user access and click data through the scripting language (JavaScript, JS for short) method. When the user opens a web page and clicks, the embedded JS code in the page will be executed, and the JS code will return the collected data to the web server.

在目前的埋點技術中,手動為指定的按鈕進行埋點,基於指定按鈕的點擊操作對用戶的行為進行統計。實際應用中需要對頁面進行全域統計時,這種手工埋點的過程較 為繁瑣,存在便捷性較差的問題。 In the current tracking technology, the specified button is manually embedded, and the user's behavior is counted based on the click operation of the specified button. When it is necessary to perform global statistics on pages in practical applications, this process of manually burying points is relatively difficult. It is cumbersome and has the problem of poor convenience.

本發明提供一種前端用戶行為統計方法及裝置,用於解決當對頁面進行全域統計時,透過手工埋點過程較為繁瑣便捷性較差的問題。 The present invention provides a front-end user behavior statistics method and device, which are used to solve the problem that the manual tracking process is cumbersome and inconvenient when performing global statistics on a page.

為了實現上述目的,本發明提供了一種前端用戶行為統計方法,包括:獲取為頁面預先設定的埋點規則;在所述頁面運行過程中,對所述頁面的頁面點擊事件進行監聽;在監聽到所述頁面點擊事件後,基於所述埋點規則統計所述頁面前端用戶的行為資料。 In order to achieve the above object, the present invention provides a front-end user behavior statistics method, which includes: acquiring a pre-set embedment rule for a page; during the running process of the page, monitoring the page click event of the page; After the page click event, the behavior data of the front-end user of the page is counted based on the point-buying rule.

為了實現上述目的,本發明提供了一種前端用戶行為統計裝置,包括:獲取模組,用於獲取為頁面預先設定的埋點規則;監聽模組,用於在所述頁面運行過程中,對所述頁面的頁面點擊事件進行監聽;統計模組,用於在監聽到所述頁面點擊事件後,基於所述埋點規則統計所述頁面前端用戶的行為資料。 In order to achieve the above purpose, the present invention provides a front-end user behavior statistics device, including: an acquisition module, used for acquiring the pre-set embed rules for the page; The page click event of the page is monitored; the statistics module is used to collect statistics on the behavior data of the front-end users of the page based on the buried point rule after monitoring the page click event.

本發明提供的前端用戶行為統計方法及裝置,透過獲取為頁面預先設定的埋點規則,在頁面運行過程中,對頁面的頁面點擊事件進行監聽,在監聽到頁面點擊事件後,基於埋點規則統計該頁面前端用戶的行為資料。本發明中 為了實現了對頁面的自動埋點,先為頁面設定埋點規則,在頁面運行時由頁面點擊事件觸發埋點開啟,解決了現有透過手動埋點存在過錯繁瑣便捷性較差的問題,而且能夠對頁面前端用戶的行為進行全域統計,統計效率較高。 The front-end user behavior statistics method and device provided by the present invention monitor the page click event of the page during the running process of the page by acquiring the pre-set embed rules for the page, and after monitoring the page click event, based on the embed rules Statistics on the behavior data of the front-end users of this page. In the present invention In order to realize the automatic burying of the page, first set the burying rule for the page, when the page is running, the page click event triggers the burying to open, which solves the problem of the existing manual burying of faults, which is cumbersome and inconvenient. The behavior of users at the front end of the page is counted globally, and the statistical efficiency is high.

101、102、103‧‧‧方法步驟 101, 102, 103‧‧‧Method steps

201、202、203、204‧‧‧方法步驟 201, 202, 203, 204‧‧‧Method steps

301、302、303‧‧‧方法步驟 301, 302, 303‧‧‧Method steps

401、402、403、404、405、406‧‧‧方法步驟 401, 402, 403, 404, 405, 406‧‧‧Method steps

501、502、503、504、505、506、507、508‧‧‧方法步驟 501, 502, 503, 504, 505, 506, 507, 508‧‧‧Method steps

11‧‧‧獲取模組 11‧‧‧Get the module

12‧‧‧監聽模組 12‧‧‧Monitoring module

13‧‧‧統計模組 13‧‧‧Statistical module

131‧‧‧獲取單元 131‧‧‧Acquisition Unit

132‧‧‧判斷單元 132‧‧‧Judgment Unit

133‧‧‧記錄單元 133‧‧‧Recording unit

134‧‧‧寫入單元 134‧‧‧Write Unit

1121‧‧‧載入子單元 1121‧‧‧Load subunit

1122‧‧‧解析子單元 1122‧‧‧Analysis Subunit

1123‧‧‧封裝子單元 1123‧‧‧Packaging subunits

1124‧‧‧渲染子單元 1124‧‧‧Rendering Subunit

1125‧‧‧解封裝子單元 1125‧‧‧Decapsulating Subunits

圖1為本發明實施例一的前端用戶行為統計方法的流程示意圖;圖2為本發明實施例二的前端用戶行為統計方法的流程示意圖;圖3為本發明實施例三的前端用戶行為統計方法的流程示意圖;圖4為本發明實施例四的前端用戶行為統計方法的流程示意圖;圖5為本發明實施例五的前端用戶行為統計方法的流程示意圖;圖6為本發明實施例六的前端用戶行為統計裝置的結構示意圖;圖7為本發明實施例七的前端用戶行為統計裝置的結構示意圖。 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 front-end user behavior statistics method according to Embodiment 3 of the present invention. 4 is a schematic flowchart of a front-end user behavior statistical method according to Embodiment 4 of the present invention; FIG. 5 is a schematic flowchart of a front-end user behavior statistical method according to Embodiment 5 of the present invention; A schematic structural diagram of a user behavior statistics device; FIG. 7 is a schematic structural diagram of a front-end user behavior statistics device according to Embodiment 7 of the present invention.

下面結合附圖對本發明實施例提供的前端用戶行為統計方法及裝置進行詳細描述。 The method and apparatus for front-end user behavior statistics provided by the embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

實施例一 Example 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 methods include:

S101、獲取為頁面預先設定的埋點規則。 S101. Acquire a pre-set embed rule for the page.

本實施例中,預先為頁面設定埋點規則,具體地,獲取頁面的所有控制項,根據統計需求為不同的控制項設定埋點規則。可選地獲取各控制項的類型,為同一個類型的所有控制項設定相同的埋點規則。 In this embodiment, a tracking rule is set for the page in advance. Specifically, all control items of the page are acquired, and tracking rules are set for different control items according to statistical requirements. Optionally obtain the type of each control item, and set the same buried rule for all control items of the same type.

其中,埋點規則中限定了該頁面的埋點物件,並且設定有與埋點對象相應的統計策略。 Among them, the buried point rule defines the buried point object of the page, and a statistical strategy corresponding to the buried point object is set.

在頁面運行之間,需要獲取該頁面的埋點規則,具體地,在啟動頁面時,將埋點規則載入到頁面的業務檔中。其中,頁面的業務檔為頁面的業務處理流程。 Before the page is running, it is necessary to obtain the embedded rules of the page. Specifically, when the page is started, the embedded rules are loaded into the business file of the page. The business file of the page is the business processing flow of the page.

S102、在頁面運行過程中,對頁面的頁面點擊事件進行監聽。 S102. During the running process of the page, monitor the page click event of the page.

當用戶開啟頁面後,頁面的業務檔就可以執行,即頁面的業務處理流程被啟動,在執行處理流程的過程中,對隸屬該頁面的頁面點擊事件進行監聽。也就是說,目前端用戶在網頁上進行頁面點擊時,能夠觸發一個頁面點擊事件,頁面對應的業務檔就可以監聽到該頁面點擊事件。 When the user opens the page, the business file of the page can be executed, that is, the business processing flow of the page is started, and during the execution of the processing flow, the click event of the page belonging to the page is monitored. That is to say, when a current end user clicks a page on a webpage, a page click event can be triggered, and the business file corresponding to the page can monitor the page click event.

本實施例中,對頁面進行埋點,在該頁面啟動時即載入頁面的業務檔的時候,同時載入該頁面對應的埋點規則,相應地就開啟埋點的功能,則頁面下所有控制項的頁 面點擊事件均會被監聽。 In this embodiment, a page is buried, and when the page is started, that is, when the business file of the page is loaded, the corresponding buried rules of the page are loaded at the same time, and the function of buried points is enabled accordingly. page of controls Surface click events are monitored.

S103、在監聽到頁面點擊事件後,基於埋點規則統計該頁面前端用戶的行為資料。 S103, after monitoring the click event of the page, statistics the 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 has a buried point enabled. In this embodiment, the object that enables the buried point is defined in the buried point rule, and the buried point object may be a control item such as a button label or other specified label.

本實施例中,埋點規則限定了埋點物件以及埋點物件對應的統計策略。埋點物件開啟埋點的兩種可選方式如下: In this embodiment, the buried point rule defines the buried point object and the statistical strategy corresponding to the buried point object. There are two optional ways to enable buried objects for buried objects as follows:

一是在頁面載入時就會開啟埋點物件進行埋點記錄。具體地,在載入預置的埋點規則時,就對屬於該頁面的所有的按鈕標籤等埋點物件自動開啟埋點。 First, when the page is loaded, the buried point object will be opened to record the buried point. Specifically, when the preset embed rules are loaded, embeds are automatically enabled for all embed objects such as button labels that belong to the page.

二判斷頁面下每個埋點物件是否具有相應的統計策略,如果埋點物件的統計策略不為空,說明該目標物件開啟了埋點,可以基於該目標物件的統計策略對前端用戶的行為資料進行統計。如果該目標物件的統計策略為空,說明該目標物件未開啟埋點,則不對該目標物件的進行統計。 2. Determine whether each buried point object under the page has a corresponding statistical strategy. If the statistical strategy of the buried point object is not empty, it means that the target object has enabled the buried point. Based on the statistical strategy of the target object, the behavior data of front-end users can be analyzed. Do statistics. If the statistics strategy of the target object is empty, it means that the target object has not opened the buried point, and the statistics of the target object will not be calculated.

當判斷出目標物件開啟了埋點,說明可以對目標物件進行埋點記錄,可選地記錄點擊事件的按鈕、時間、座標,其中點擊事件的座標為頁面中的位置,也可稱為座標。進一步地,獲取該目標物件的統計策略,根據統計策 略可以對目標物件的埋點記錄進行統計,即可以對點擊的位置、點擊事件、用戶ID、控制項所隸屬的模組等資訊進行統計,從而可以獲取到前端用戶的行為資料。例如當控制項類型為按鈕類時,即對應HTML標籤為(button/a/span),就可以記錄該控制項位置、點擊時間、用戶ID、控制項所屬的模組以及目前操作所屬的應用,若該頁面點擊事件有觸發後臺請求,則記錄後臺請求統一資源定位符(Uniform Resource Locator,簡稱URL)、後臺請求的耗時以及後臺請求是否成功等資訊。進一步地,在獲取到該控制項的上述資訊後,在特定時間需要對該控制項進行統計時,根據該控制項以及該控制項的控制項類型,獲取與該控制項對應的統計策略,進而根據該統計策略統計出該控制項的用戶行為資料。在使用頁面的過程中,基於埋點規則就可以對前端用戶的用戶行為進行監督,這樣就可以統計獲取到前端用戶在使用頁面時的行為資料。 When it is determined that the target object has enabled tracking, it means that the tracking can be recorded for the target object, optionally recording the button, time, and coordinates of the click event, where the coordinates of the click event are the positions on the page, which can also be called coordinates. Further, obtain the statistical strategy of the target object, according to the statistical strategy It is possible to perform statistics on the buried point records of the target object, that is, statistics on the clicked location, click event, user ID, module to which the control item belongs, etc., so as to obtain the behavior data of front-end users. For example, when the control item type is a button class, that is, the corresponding HTML tag is (button/a/span), the position of the control item, the click time, the user ID, the module to which the control item belongs, and the application to which the current operation belongs can be recorded. If the click event of the page triggers a background request, information such as the background request uniform resource locator (Uniform Resource Locator, URL for short), the time-consuming of the background request, and whether the background request is successful is recorded. Further, after obtaining the above-mentioned information of the control item, when the control item needs to be counted at a specific time, the statistical strategy corresponding to the control item is obtained according to the control item and the control item type of the control item, and then According to the statistical strategy, the user behavior data of the control item are collected. In the process of using the page, the user behavior of the front-end user can be supervised based on the buried point rules, so that the behavior data of the front-end user when using the page can be obtained statistically.

本實施例提供的前端用戶行為統計方法,透過獲取為頁面預先設定的埋點規則,在頁面運行過程中,對頁面的頁面點擊事件進行監聽,在監聽到頁面點擊事件後,基於埋點規則統計該頁面前端用戶的行為資料。本實施例中為了實現了對頁面的自動埋點,先為頁面設定埋點規則,在頁面運行時由頁面點擊事件觸發埋點開啟,解決了現有透過手動埋點存在過錯繁瑣便捷性較差的問題,而且能夠對頁面前端用戶的行為進行全域統計,統計效率較高。 In the front-end user behavior statistics method provided by this embodiment, by acquiring the pre-set embed rules for the page, during the running process of the page, the page click event of the page is monitored, and after the page click event is monitored, statistics are made based on the embed rules. The behavior data of the front-end users of this page. In this embodiment, in order to realize the automatic tracking of the page, first set the tracking rule for the page, and when the page is running, the page click event triggers the tracking to open, which solves the problem of the existing manual tracking, which is cumbersome and inconvenient. , and can conduct global statistics on the behavior of users at the front end of the page, with high statistical efficiency.

實施例二 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 in this embodiment needs to be executed on the basis of modularizing the front-end of the page. The front-end user behavior statistics methods include:

S201、將頁面進行模組化處理。 S201 , modularizing the page.

在互聯網快速發展的當下,頁面逐漸變成了互聯網應用程式,為了適應激烈的市場競爭,以滿足用戶對多樣化的需求,嵌入網頁的JS代碼越來越龐大,越來越複雜,頁面也越來越像桌面程式,需要分工協作、進度管理、單元測試等等。為了提升開發者的開發體驗,並為性能優化提供良好的支援,開發者可以基於模組化對頁面的前端進行程式設計。對頁面進行前端模組化的目的,可以實現多人協同開發頁面,提高頁面研發速度和降低維護難度。 With the rapid development of the Internet, pages have gradually become Internet applications. In order to adapt to the fierce market competition and meet the diverse needs of users, the JS codes embedded in web pages are becoming larger and more complex, and the pages are becoming more and more complex. More like a desktop program, it requires division of labor, progress management, unit testing, and more. In order to improve the developer's development experience and provide good support for performance optimization, developers can program the front end of the page based on modularization. The purpose of front-end modularization of the page can realize the collaborative development of pages by multiple people, improve the speed of page development and reduce the difficulty of maintenance.

S202、為頁面對應模組配置埋點規則。 S202. Configure a point-embedding rule for the module corresponding to the page.

為了實現對頁面的全域統計,預先為頁面對應模組配置埋點規則。具體地,獲取頁面的所有控制項、控制項類型以及各控制項所隸屬的模組,由於不同的模組可以設定不同的埋點規則,也可以全域設定一個埋點規則。獲取需要埋點的控制項類型,為控制項類型設定相應的埋點規則,將隸屬同一模組的控制項類型的埋點規則歸結到一個檔中形成該模組的埋點規則。 In order to achieve global statistics on the page, configure the embedded point rules for the module corresponding to the page in advance. Specifically, obtain all control items, control item types, and modules to which each control item belongs on the page. Since different modules can set different tracking rules, you can also set a global tracking rule. Get the control item type that needs to be buried, set the corresponding buried point rule for the control item type, and summarize the buried point rules of the control item type belonging to the same module into a file to form the module's buried point rule.

S203、透過執行業務檔運行頁面,在運行過程中對隸屬於頁面點擊事件進行監聽。 S203 , by executing the business file running page, during the running process, monitor the click event belonging to the page.

目前端用戶試圖使用頁面時,在運行該頁面之前,需要獲取該頁面對應模組的業務檔,其中業務檔為該頁面對應模組的業務處理流程。執行該業務檔,即運行該頁面對應模組的業務處理流程。本實施例中,在執行業務檔時,會同時載入該頁面對應模組的埋點規則。 When the current end user tries to use the page, before running the page, it is necessary to obtain the business file of the module corresponding to the page, wherein the business file is the business processing flow of the module corresponding to the page. Executing the business file means running the business processing flow of the module corresponding to the page. In this embodiment, when the business file is executed, the embedded point rules of the module corresponding to the page will be loaded at the same time.

在業務檔的運行過程中,可以基於該埋點規則中限定的埋點物件,具體地,當頁面對應模組開啟埋點的情況下,該模組下所有控制項的點擊事件均監控,根據相應模組綁定的埋點規則,當監控到點擊事件對應的控制項為埋點的控制項時,就獲取頁面前端用戶的行為資料。 During the running process of the business file, it can be based on the embedded objects defined in the embedded rules. Specifically, when the corresponding module on the page has enabled embedded, the click events of all control items under the module are monitored, according to the The embedded point rule bound by the corresponding module, when the control item corresponding to the click event is monitored as the control item of the embedded point, the behavior data of the front-end user of the page is obtained.

S204、在監聽到頁面點擊事件後,基於埋點規則統計頁面前端用戶的行為資料。 S204 , after monitoring the page click event, statistics the behavior data of the user at the front end of the page based on the burying rule.

在使用頁面的過程中,基於埋點規則就可以對前端用戶的用戶行為進行監督,這樣就可以統計獲取到前端用戶在使用頁面時的行為資料。具體地過程可參見上述實施例二中相關內容的記載,此處不再贅述。 In the process of using the page, the user behavior of the front-end user can be supervised based on the buried point rules, so that the behavior data of the front-end user when using the page can be obtained statistically. For a specific process, reference may be made to the description of the relevant content in the above-mentioned Embodiment 2, which will not be repeated here.

本實施例提供的前端用戶行為統計方法,在頁面進行了模組化的基礎之上,為頁面對應模組配置埋點規則,當執行頁面的業務檔,則獲取相應的埋點規則,在執行業務檔的過程中基於埋點規則,獲取頁面前端用戶的行為資料,實現對頁面的全域自動埋點,能夠對頁面前端用戶行為的全域統計,且統計效率較高。 In the front-end user behavior statistics method provided in this embodiment, on the basis of modularization of the page, a burying rule is configured for the module corresponding to the page. When the business file of the page is executed, the corresponding burying rule is obtained, and the In the process of the business file, based on the tracking rules, the behavior data of the front-end users of the page is obtained, and the global automatic tracking of the page can be realized.

實施例三 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 in this embodiment needs to be executed on the basis of modularizing the front-end of the page.

該前端用戶行為統計方法包括: The front-end user behavior statistics methods include:

S301、根據頁面對應模組的業務檔,確定頁面對應模組運行時所需的依賴檔。 S301 , according to the business file of the module corresponding to the page, determine the dependency file required when the module corresponding to the page runs.

目前,為了便於對頁面的優化,開發者對頁面的前端進行模組化程式設計。目前端用戶試圖使用頁面時,在運行該頁面之前,需要獲取該頁面對應模組的業務檔,其中業務檔為該頁面對應模組的業務處理流程。 At present, in order to facilitate the optimization of the page, the developer conducts modular programming on the front end of the page. When the current end user tries to use the page, before running the page, it is necessary to obtain the business file of the module corresponding to the page, wherein the business file is the business processing flow of the module corresponding to the page.

通常在頁面中,模組化的過程中頁面對應的模組根據定義的依賴,編寫依賴的相關代碼文件。在獲取到該頁面對應模組的業務檔後,對該業務檔進行分析,可以確定出頁面對應模組運行時所需的依賴檔。一般頁面對應模組包括三種依賴檔:超文字標記語言(HyperText Markup Language,簡稱HTML)依賴檔、層疊樣式表(Cascading Style Sheets,簡稱CSS)依賴檔和JS依賴檔。 Usually in the page, the module corresponding to the page writes the dependent code files according to the defined dependencies during the modularization process. After obtaining the business file of the module corresponding to the page, analyzing the business file can determine the dependency file required when the module corresponding to the page runs. A general page corresponding module includes three dependency files: HyperText Markup Language (HTML for short) dependency file, Cascading Style Sheets (CSS for short) dependency file and JS dependency file.

S302、載入依賴檔和預先為頁面對應模組配置的埋點規則。 S302, load the dependency file and the pre-configured burying rules for the module corresponding to the page.

在確定出頁面對應模組的所需的依賴檔後,對依賴檔進行載入,本實施例中,為了實現全域埋點機制,預先為頁面對應模組配置埋點規則,該埋點規則中限定有模組的埋點物件。例如,埋點的物件可以是按鈕標籤或其它指定的標籤。在載入依賴檔的同時,還需要載入預先為頁面物 件模組配置的埋點規則。 After the required dependency file of the module corresponding to the page is determined, the dependency file is loaded. In this embodiment, in order to realize the global tracking mechanism, a tracking rule is configured for the module corresponding to the page in advance. Embed objects with mods are limited. For example, buried objects can be button labels or other specific labels. When loading the dependent files, it is also necessary to load the pre-configured page objects. Embedding rules for component module configuration.

S303、執行業務檔基於埋點規則,以統計獲取頁面前端用戶的行為資料。 S303 , the execution business file is based on the embedded point rule to obtain the behavior data of the front-end user of the page by statistics.

在依賴檔和埋點規則載入完成後,執行頁面對應模組的業務檔,即運行該頁面對應模組的業務處理流程。本實施例中,由於載入了該模組對應的埋點規則,在業務檔的運行過程中,可以基於該埋點規則中限定的埋點物件,獲取頁面前端用戶的行為資料。 After the dependency files and embedded rules are loaded, execute the business file of the module corresponding to the page, that is, run the business processing process of the module corresponding to the page. In this embodiment, since the embedded point rule corresponding to the module is loaded, during the running process of the business file, the behavior data of the user at the front end of the page can be obtained based on the embedded point object defined in the embedded point rule.

具體地,目前端用戶在使用頁面時,可以對頁面中的控制項進行點擊操作,本實施例中可以對控制項進行監控,當監控到點擊的控制項為埋點物件時,就可以獲取到該控制項的埋點記錄。進一步地,埋點規則中還包括埋點物件的統計策略,在獲取到埋點物件的埋點記錄後,獲取該埋點物件的統計策略,如果該埋點物件的統計策略為空,則不對該埋點物件的埋點記錄進行統計,如果獲取到統計策略,則根據統計策略對埋點記錄進行統計。 Specifically, when the current end user is using the page, he can click the control item in the page. In this embodiment, the control item can be monitored, and when the clicked control item is monitored to be a buried object, it can be obtained. Buried point record of this control item. Further, the burying rule also includes a statistical strategy of the buried object. After obtaining the buried record of the buried object, the statistical strategy of the buried object is obtained. If the statistical strategy of the buried object is empty, it is not valid. The buried point record of the buried point object is counted, and 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 item type is a button class, that is, the corresponding HTML tag is (button/a/span), the position of the control item, the click time, the user ID, the module to which the control item belongs, and the application to which the current operation belongs can be recorded. If the click event triggers a background request, information such as a background request uniform resource locator (Uniform Resource Locator, URL for short), the time-consuming of the background request, and whether the background request is successful is recorded. Further, after obtaining the above-mentioned information of the control item, when the control item needs to be counted at a specific time, according to the name of the module to which the control item belongs and the For the control item type of the control item, the statistical strategy corresponding to the control is obtained by querying from the background database, and then the user behavior data of the control item is counted according to the statistical strategy. In this embodiment, the statistical strategy is stored in the background database, so that it can be modified in real time.

在使用頁面的過程中,基於埋點規則就可以對前端用戶的用戶行為進行監督,這樣就可以統計獲取到前端用戶在使用頁面時的行為資料。 In the process of using the page, the user behavior of the front-end user can be supervised based on the buried point rules, so that the behavior data of the front-end user when using the page can be obtained statistically.

本實施例提供的前端用戶行為統計方法,透過根據頁面對應模組的業務檔,確定確定頁面對應模組運行時所需的依賴檔,載入依賴檔和預先為頁面對應模組配置的埋點規則,執行業務檔基於埋點規則中限定的埋點物件,獲取頁面前端用戶的行為資料。本實施例提供了全域埋點機制,在載入依賴檔的同時寫入模組的埋點規則,基於該埋點規則能夠對前端用戶的行為進行統計,對頁面的全域自動埋點,能夠實現對頁面前端用戶行為的全域統計,而且統計效率較高。 The front-end user behavior statistics method provided in this embodiment determines the dependency files required when the page-corresponding module runs according to the business file of the page-corresponding module, loads the dependency file and pre-configured embedded points for the page-corresponding module Rules, execute the business file based on the embedded objects defined in the embedded rules to obtain the behavior data of the front-end users of the page. This embodiment provides a global tracking mechanism, which writes the tracking rules of the module while loading the dependency file. Based on the tracking rules, the behavior of front-end users can be counted, and the global automatic tracking of the page can be realized. Global statistics on user behavior at the front end of the page, and the statistical efficiency is high.

實施例四 Embodiment 4

如圖4所示,其為本發明實施例四的前端用戶行為統計方法的流程示意圖。目前RequireJS是一個非常小巧的JavaScript模組載入架構,本實施例選取RequireJS架構作為底層的依賴實現,並在此基礎上實現對頁面的前端模組化。在上述實施例的基礎上,將預設的埋點規則載入到頁面對應的業務檔的過程包括: As shown in FIG. 4 , it is a schematic flowchart of a method for statistics of front-end user behavior according to Embodiment 4 of the present invention. Currently RequireJS is a very small JavaScript module loading architecture. In this embodiment, the RequireJS architecture is selected as the underlying dependency implementation, and on this basis, the front-end modularization of the page is realized. On the basis of the above-mentioned embodiment, the process of loading the preset burying rules into the business file corresponding to the page includes:

S401、載入頁面的業務檔。 S401. Load the business file of the page.

在前端用戶試圖使用頁面時,在運行之前,需要對頁面對應模組的業務檔進行調用,其中,業務檔為該頁面對應模組的業務處理流程。本實施例中,基於RequireJS架構載入頁面對應模組的業務檔,業務檔是用JavaScript指令碼語言編寫的,以JS為副檔名的檔JS檔。 When the front-end user tries to use the page, before running, the business file of the module corresponding to the page needs to be called, wherein the business file is the business processing flow of the module corresponding to the page. In this embodiment, the business file of the module corresponding to the page is loaded based on the RequireJS architecture, and the business file is a file JS file with JS as the file extension, which is written in the JavaScript instruction code language.

S402、對業務檔進行解析,以獲取頁面運行時所需的依賴檔。 S402 , parse the business file to obtain the dependency file required when the page runs.

在調用業務檔的過程中,對該業務檔進行解析,獲取該模組的依賴檔。在頁面模組化的過程中,可以對模組的依賴進行定義,開發者能夠根據依賴的定義編寫相關代碼文件。一般頁面的模組包括三種依賴檔: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 page modularization, the dependencies of modules can be defined, and developers can write relevant code files according to the definition of dependencies. A general page module includes three types of dependencies: HTML dependencies, CSS dependencies, and JS dependencies.

在本實施例中,由於RequireJS只支持JS依賴檔的依賴解析,為了實現對HTML依賴檔和CSS依賴檔的解析,需要在該RequireJS架構中插入協力廠商外掛程式,使得RequireJS架構能夠支持解析HTML依賴檔和CSS依賴檔。 In this embodiment, since RequireJS only supports dependency parsing of JS dependency files, in order to realize the parsing of HTML dependency files and CSS dependency files, it is necessary to insert third-party plug-ins into the RequireJS architecture, so that the RequireJS architecture can support parsing HTML dependencies files and CSS dependencies.

S403、封裝業務檔。 S403, encapsulating the business file.

在解析出頁面對應模組的所需的依賴檔後,對模組的依賴檔進行載入,實際中由於RequireJS架構在模組的JS依賴檔載入完成後,就會直接執行模組的業務檔。本實施例中模組除了需要對JS依賴檔進行載入之外,還需要載入HTML依賴檔和CSS依賴檔。 After parsing the required dependency file of the module corresponding to the page, load the module's dependency file. In fact, due to the RequireJS architecture, after the module's JS dependency file is loaded, the module's business will be directly executed. files. In this embodiment, in addition to loading the JS dependency file, the module also needs to load the HTML dependency file and the CSS dependency file.

為了在載入完所有的依賴檔之後再執行模組的業務處理流程,本實施例中基於RequireJS架構將模組的業務檔的業務處理流程進行封裝,封裝後業務處理流程將不會再被執行,只有等到封裝解除後才會被執行。 In order to execute the business processing flow of the module after all the dependency files are loaded, in this embodiment, the business processing flow of the business file of the module is encapsulated based on the RequireJS architecture, and the business processing flow will not be executed after the encapsulation. , will only be executed after the package is released.

S404、載入依賴檔和頁面的埋點規則。 S404, load the embedded point rule of the dependent file and the page.

為了實現對頁面的全域統計的機制,本實施例中在載入模組的依賴檔的同時,載入預先為模組配置的埋點規則,本實施例中,開啟埋點的物件在埋點規則的代碼中進行定義,也就是說,在埋點規則中設定該模組的埋點物件。埋點的物件可以是按鈕標籤或其它指定的標籤。具體地,可以對屬於該模組的所有Dom檔中按鈕標籤(button/span/a)這些物件自動開啟埋點,這樣就可以透過模組的所有按鈕標籤進行埋點統計。 In order to realize the mechanism of global statistics on the page, in this embodiment, when loading the dependency file of the module, the embedded rules pre-configured for the module are loaded. It is defined in the code of the rule, that is to say, the buried point object of this module is set in the buried point rule. Embedding objects can be button labels or other specific labels. Specifically, the button labels (button/span/a) in all Dom files belonging to the module can be automatically enabled for tracking, so that tracking statistics can be performed through all the button labels of the module.

S405、對業務檔進行HTML範本渲染和CSS渲染。 S405. Perform HTML template rendering and CSS rendering on the business file.

實際中,需要對頁面進行範本和樣式的渲染,本實施例中,在完成依賴檔載入後,基於依賴檔對模組的業務檔進行HTML範本渲染和CSS渲染。 In practice, templates and styles of pages need to be rendered. In this embodiment, after the loading of the dependency files is completed, HTML template rendering and CSS rendering are performed on the business files of the module based on the dependency files.

S406、解除業務檔的封裝。 S406. Unencapsulate the service file.

在對模組的業務檔進行渲染後,由於模組的業務檔在之前進行了封裝,需要對該業務檔的業務處理流程進行解封裝,以便於該模組的業務檔能夠被執行。 After rendering the business file of the module, since the business file of the module has been encapsulated before, the business processing flow of the business file needs to be decapsulated so that the business file of the module can be executed.

在解除模組的業務檔的封裝後,基於RequireJS架構執行該業務檔。在執行業務檔的過程中,由於該業務檔中載入了模組的埋點規則,基於該埋點規則中限定的埋點物 件來記錄前端用戶的點擊行為,從而能夠對前端用戶的行為資料進行統計。 After unpacking the business file of the module, execute the business file based on the RequireJS architecture. In the process of executing the business file, since the embedded rules of the module are loaded in the business file, based on the embedded objects defined in the embedded rules The software is used to record the click behavior of front-end users, so that the behavior data of front-end users can be counted.

此處需要說明,使用RequierJS作為底層的依賴實現此處為一個完整的示例,不作為限制本發明的條件。該前端用戶統計方法也可以基於SeaJS架構等底層依賴來實現。 It should be noted here that the use of RequierJS as the underlying dependency implementation is a complete example here, and is not a condition for limiting the present invention. The front-end user statistics method can also be implemented based on underlying dependencies such as the SeaJS architecture.

本實施例中提供的前端用戶行為統計方法,透過載入頁面對應模組的業務檔,解析業務檔獲取模組的依賴檔,封裝業務檔的業務處理流程,載入模組的依賴檔和模組預置的埋點規則,對業務檔進行HTML範本渲染和CSS渲染,解除業務檔的封裝,執行業務檔基於埋點規則中限定的埋點物件統計獲取頁面前端用戶的行為資料。本實施例提供了一種全域埋點機制,在載入依賴檔的同時寫入模組的埋點規則,基於埋點規則中的埋點物件能夠對前端用戶的行為進行統計,對頁面的全域自動埋點,能夠實現對頁面前端用戶行為的全域統計,而且統計效率較高。 The front-end user behavior statistics method provided in this embodiment, by loading the business file of the corresponding module on the page, parses the business file to obtain the module's dependency file, encapsulates the business processing flow of the business file, and loads the module's dependency file and module. Set preset embed rules, perform HTML template rendering and CSS rendering for business files, unencapsulate business files, and execute business files to obtain behavior data of front-end users based on the statistics of embed objects defined in the embed rules. This embodiment provides a global tracking mechanism, which writes the tracking rules of the module while loading the dependency file. Based on the tracking objects in the tracking rules, the behavior of the front-end users can be counted, and the global automatic tracking of the page can be calculated. Buried points can realize global statistics of user behavior on 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 method for statistics of front-end user behavior according to Embodiment 5 of the present invention. On the basis of the foregoing embodiment, the front-end user behavior statistics method includes the following steps:

S501、在執行業務檔的過程中對隸屬於頁面的頁面點擊事件進行監聽。 S501. Monitor a page click event belonging to a page in the process of executing the business file.

當業務檔載入和渲染完成後,可以執行該業務檔的業 務處理流程,在執行處理流程的過程中,業務檔對隸屬頁面對應模組的頁面點擊事件進行監聽。也就是說,目前端用戶在網頁上進行頁面點擊時,能夠觸發一個頁面點擊事件,該頁面點擊事件所隸屬的模組對應的業務檔就可以監聽到該頁面點擊事件。 After the business file is loaded and rendered, the business file of the business file can be executed. In the process of executing the processing process, the business file monitors the page click event of the module corresponding to the affiliated page. That is to say, when a current end user clicks a page on a webpage, a page click event can be triggered, and the business file corresponding to the module to which the page click event belongs can monitor the page click event.

本實施例中,對頁面進行模組化處理,然後對頁面應模組進行埋點,在該模組載入的時候,同時載入為頁面配置的埋點規則,在該模組開啟埋點的情況下,該模組下所有控制項的頁面點擊事件均會被監控。 In this embodiment, the page is modularized, and then the page should be embedded in the module. When the module is loaded, the embedded rules configured for the page are loaded at the same time, and the embedded point is enabled in the module. In the case of , the page click events of all control items under this module will be monitored.

S502、確定監聽到的頁面點擊事件對應的目標物件。 S502: Determine the target object corresponding to the monitored page click event.

當頁面的業務檔監聽到頁面點擊事件後,確定該頁面點擊事件對應的目標物件。 When the business file of the page monitors the page click event, it determines the target object corresponding to the page click event.

S503、判斷目標物件是否開啟埋點功能。 S503, judging whether the target object has a buried point function enabled.

上述實施例中在業務檔載入依賴檔時,同時載入了為該頁面預先設定的埋點規則。其中,埋點規則中限定了頁面對應模組的埋點物件,並且設定有與埋點對象相應的統計策略。本實施例中,開啟埋點的物件在埋點規則的代碼中進行定義,埋點的物件可以是按鈕標籤或其它指定的標籤等控制項。本實施例中,埋點規則限定了埋點物件以及埋點物件對應的統計策略。開啟埋點有兩種可選方式:一是在頁面載入時就會開啟埋點物件進行埋點記錄。具體地,在載入預置的埋點規則時,就對屬於該頁面的所有Dom檔中按鈕標籤等埋點物件自動開啟埋點。二判斷每個埋點物件是否具有相應的統計策略,如果埋點物件的統計 策略不為空,說明該目標物件開啟了埋點功能,可以基於該埋點物件進行用戶的行為資料統計。如果該目標物件的統計策略為空,說明該目標物件未開啟埋點功能,則不對該目標物件的進行統計。 In the above embodiment, when the business file loads the dependency file, the pre-set embed rules for the page are loaded at the same time. Among them, the buried point rule defines the buried point object of the module corresponding to the page, and sets a statistical strategy corresponding to the buried point object. In this embodiment, the object that enables the buried point is defined in the code of the buried point rule, and the buried point object may be a control item such as a button label or other specified labels. In this embodiment, the buried point rule defines the buried point object and the statistical strategy corresponding to the buried point object. There are two optional ways to enable burying points: one is to open the burying point object to record the burying points when the page is loaded. Specifically, when the preset embed rules are loaded, embeds are automatically enabled for embed objects such as button labels in all Dom files belonging to the page. 2. Determine whether each buried object has a corresponding statistical strategy. If the statistics of the buried object If the policy is not empty, it means that the target object has enabled the tracking function, and the user's behavior data can be counted based on the tracking object. If the statistics strategy of the target object is empty, it means that the target object does not have the buried point function enabled, and the statistics of the target object will not be counted.

如果判斷出目標物件開啟埋點功能,則執行S504;否則,返回執行S501。 If it is determined that the target object has the function of burying points enabled, execute S504; otherwise, return to execute S501.

S504、對目標物件的點擊行為進行埋點記錄,並依據埋點記錄和目標物件的統計策略統計前端用戶的行為資料。 S504 , performing an embed record on the click behavior of the target object, and statistics the behavior data of the front-end user according to the embed record and the statistical strategy of the target object.

當判斷出目標物件開啟了埋點,說明可以對目標物件進行埋點記錄,可選地記錄點擊事件的按鈕、時間、座標,其中點擊事件的座標為頁面中的位置,也可稱為座標。 When it is determined that the target object has enabled tracking, it means that the tracking can be recorded for the target object, optionally recording the button, time, and coordinates of the click event, where the coordinates of the click event are the positions on the page, which can also be called coordinates.

進一步地,獲取該目標物件的統計策略,根據統計策略可以對目標物件的埋點記錄進行統計,即可以對點擊的位置、點擊事件、用戶ID、控制項所隸屬的模組等資訊進行統計,從而可以獲取到前端用戶的行為資料。 Further, the statistical strategy of the target object is obtained, and the buried point records of the target object can be counted according to the statistical strategy, that is, the information such as the clicked position, the clicked event, the user ID, the module to which the control item belongs can be counted, Thereby, the behavior data of front-end users can be obtained.

S505、在對目標物件的點擊行為進行埋點記錄的同時,獲取與該點擊行為對應的請求事件,對請求事件的業務邏輯進行記錄。 S505 , while recording the click behavior of the target object, obtain a request event corresponding to the click behavior, and record the business logic of the request event.

進一步地,前端用戶的每次點擊行為,都會對應網頁的一個請求事件,每個請求事件會有一定的業務邏輯,本實施例中,對目標用戶的點擊行為進行記錄的同時,記錄點擊行為相應的請求事件的業務邏輯。 Further, each click behavior of the front-end user will correspond to a request event of the web page, and each request event will have a certain business logic. In this embodiment, while recording the click behavior of the target user, the corresponding click behavior is recorded. The business logic of the request event.

S506、判斷記錄的次數是否超出閾值。 S506. Determine whether the number of times of recording exceeds a threshold.

如果判斷結果為否,執行S507;否則執行S508。 If the judgment result is no, execute S507; otherwise, execute S508.

S507、判斷在執行業務檔過程中是否監聽到頁面刷新事件或者頁面關閉事件。 S507: Determine whether a page refresh event or a page close event is monitored during the process of executing the business file.

如果判斷結果為是,執行S508;否則返回執行S501繼續對頁面點擊事件進行監聽。 If the judgment result is yes, execute S508; otherwise, return to execute S501 to continue monitoring the page click event.

S508、將前端用戶的行為資料和記錄的業務邏輯寫入日誌檔。 S508: Write the behavior data of the front-end user and the recorded business logic into the log file.

本實施例中,行為資料和業務邏輯先在前端進行本地保存,當記錄滿N條後,可以批量地將記錄的行為資料和業務邏輯寫入到日誌檔中進行保存。也就是說,在記錄的過程中,將記錄的次數與預設的閾值進行比較,當記錄的次數超過閾值時,批量地將記錄的行為資料和業務邏輯寫入到日誌檔中。實際應用中,為了緩解本機存放區的壓力,可以在記錄的次數超過閾值時,批量地將記錄的行為資料和業務邏輯發送到伺服器上進行保存,在接收到行為資料和業務邏輯後,伺服器可以按照設定的資料格式寫入到日誌檔中。 In this embodiment, the behavior data and business logic are first stored locally at the front end, and when N records are filled, the recorded behavior data and business logic can be written into the log file in batches for preservation. That is to say, in the process of recording, the number of records is compared with a preset threshold, and when the number of records exceeds the threshold, the recorded behavior data and business logic are written into the log file in batches. In practical applications, in order to relieve the pressure on the local storage area, when the number of records exceeds the threshold, the recorded behavior data and business logic can be sent to the server in batches for storage. After receiving the behavior data and business logic, The server can write to the log file according to the set data format.

進一步地,本實施例中在執行業務檔的過程中還可以對頁面的頁面刷新事件和頁面關閉事件進行監聽,當監聽到頁面刷新事件或者頁面關閉事件後,將記錄的行為資料和業務邏輯寫入日誌檔中。為了避免資訊的丟失,將記錄的行為資料和業務邏輯發送到後端的伺服器進行保存。伺服器在接收到行為資料和業務邏輯後,可以按照設定的資 料格式寫入到日誌檔中。 Further, in this embodiment, in the process of executing the business file, the page refresh event and page close event of the page can also be monitored, and when the page refresh event or the page close event is monitored, the recorded behavior data and 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 preservation. After the server receives the behavior data and business logic, it can follow the set data. The material format is written to the log file.

進一步地,對包含行為資料的日誌檔進行分析,基於該統計出的前端用戶的行為資料,可以獲取到一些網頁的運營資料。其中,運營資料可以包括的獨立訪問者數量(Unique Visitor簡稱UV)、頁面流覽量或點擊量(Page View簡稱PV)、模組熱度、專案熱度、請求耗時統計、請求成功率、指定按鈕的統計、指定頁面的部分模組統計、指定頁面的點擊熱力圖等。進一步地可以將分析的結果展示給網頁的開發者,開發者可以將這些運營資料作為參考資料,為實際的產品運營、設計排查錯誤提供參考,為前端交互設計提供依據。 Further, the log file containing the behavior data is analyzed, and based on the collected behavior data of the front-end user, the operation data of some web pages can be obtained. Among them, the operation data can include the number of unique visitors (Unique Visitor referred to as UV), the number of page views or clicks (Page View referred to as PV), module popularity, project popularity, request time-consuming statistics, request success rate, designated buttons statistics, some module statistics of the specified page, click heat map of the specified page, etc. Further, the analysis results can be displayed to the developer of the web page, and the developer can use these operation materials as reference materials to provide reference for actual product operation, design troubleshooting, and provide a basis for front-end interaction design.

本實施例中提供的前端用戶行為統計方法,透過在執行頁面對應模組的業務檔的過程中,對隸屬於頁面的頁面點擊事件進行監聽,確定監聽到頁面點擊事件對應的目標物件,判斷目標物件是否為埋點規則中限定的埋點物件,在目標物件開啟埋點功能時,則可以對前端用戶的點擊行為進行埋點記錄,依據埋點記錄統計前端用戶的行為資料。本實施例基於在模組中載入的埋點規則,實現對網頁的前端用戶行為的全域統計,能夠獲取頁面全域的行為資料,便於對頁面後期維護或者完善提供參考依據。 In the front-end user behavior statistics method provided in this embodiment, in the process of executing the business file of the module corresponding to the page, by monitoring the page click event belonging to the page, determining the target object corresponding to the monitored page click event, and judging the target Whether the object is a buried point object defined in the buried point rule, when the target object enables the buried point function, the front-end user's click behavior can be buried and recorded, and the front-end user's behavior data can be counted according to the buried point record. This embodiment implements global statistics on the front-end user behavior of the web page based on the embedded point rules loaded in the module, and can obtain behavior data of the entire page, which is convenient for providing reference for later maintenance or improvement of the page.

實施例六 Embodiment 6

如圖6所示,其為本發明實施例六的前端用戶行為統計裝置的結構示意圖。該前端用戶行為統計裝置包括:獲 取模組11、監聽模組12和統計模組13。 As shown in FIG. 6 , it 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: Take module 11, monitoring module 12 and statistics module 13.

其中,獲取模組11,用於獲取為頁面預先設定的埋點規則。 Among them, the obtaining module 11 is used to obtain the embedded point rules preset for the page.

本實施例中,預先為頁面設定埋點規則,具體地,獲取頁面的所有控制項,根據統計需求為不同的控制項設定埋點規則。可選地獲取各控制項的類型,為同一個類型的所有控制項設定相同的埋點規則。 In this embodiment, a tracking rule is set for the page in advance. Specifically, all control items of the page are acquired, and tracking rules are set for different control items according to statistical requirements. Optionally obtain the type of each control item, and set the same buried rule for all control items of the same type.

其中,埋點規則中限定了該頁面的埋點物件,並且設定有與埋點對象相應的統計策略。 Among them, the buried point rule defines the buried point object of the page, and a statistical strategy corresponding to the buried point object is set.

在頁面運行之間,獲取模組11需要獲取該頁面的埋點規則,具體地,在啟動頁面時,獲取模組11將埋點規則載入到頁面的業務檔中。其中,頁面的業務檔為頁面的業務處理流程。 Before the page is running, the acquisition module 11 needs to acquire the embedded point rules of the page. Specifically, when the page is started, the acquisition module 11 loads the embedded point rules into the business file of the page. The business file of the page is the business processing flow of the page.

監聽模組12,用於在頁面運行過程中,對頁面的頁面點擊事件進行監聽。 The monitoring module 12 is used for monitoring the page click event of the page during the running process of the page.

當用戶開啟頁面後,頁面的業務檔就可以執行,即頁面的業務處理流程被啟動,在執行處理流程的過程中,監聽模組12對隸屬該頁面的頁面點擊事件進行監聽。也就是說,目前端用戶在網頁上進行頁面點擊時,能夠觸發一個頁面點擊事件,頁面對應的業務檔就可以監聽到該頁面點擊事件。 After the user opens the page, the business file of the page can be executed, that is, the business processing flow of the page is started. During the execution of the processing flow, the monitoring module 12 monitors the click event of the page belonging to the page. That is to say, when a current end user clicks a page on a webpage, a page click event can be triggered, and the business file corresponding to the page can monitor the page click event.

本實施例中,對頁面進行埋點,在該頁面啟動時即載入頁面的業務檔的時候,同時載入該頁面對應的埋點規則,相應地就開啟埋點的功能,則頁面下所有控制項的頁 面點擊事件均會被監聽模組12監聽。 In this embodiment, a page is buried, and when the page is started, that is, when the business file of the page is loaded, the corresponding buried rules of the page are loaded at the same time, and the function of buried points is enabled accordingly. page of controls The face click event will be monitored by the monitoring module 12 .

統計模組13,用於在監聽到頁面點擊事件後,基於埋點規則統計頁面前端用戶的行為資料。 The statistics module 13 is used for, after monitoring the click event of the page, to count the behavior data of the front-end users of the page based on the burying rules.

在監聽到頁面點擊事件後,統計模組13確定該頁面點擊事件對應的目標物件,進一步地,當確定出目標物件後,統計模組13需要判斷該目標物件是否開啟埋點。本實施例中,開啟埋點的物件在埋點規則中進行定義,埋點的物件可以是按鈕標籤或其它指定的標籤等控制項。 After monitoring the page click event, the statistics module 13 determines the target object corresponding to the page click event. Further, after determining the target object, the statistics module 13 needs to determine whether the target object has a buried point enabled. In this embodiment, the object that enables the buried point is defined in the buried point rule, and the buried point object may be a control item such as a button label or other specified label.

本實施例中,埋點物件開啟埋點的兩種可選方式,可參見上述實施例中的相關記載,此處不再贅述。 In this embodiment, for the two optional ways for the buried object to open the buried point, reference may be made to the relevant records in the above-mentioned embodiment, which will not be repeated here.

當判斷出目標物件開啟了埋點,說明可以對目標物件進行埋點記錄,統計模組13基於目標物件對應的統計策略對前端用戶的用戶行為進行監督,這樣就可以統計獲取到前端用戶在使用頁面時的行為資料。具體內容可參見上述實施例中相關記載,此處不再贅述。 When it is determined that the target object has enabled tracking, it means that tracking records can be performed on the target object. The statistics module 13 supervises the user behavior of the front-end user based on the statistical strategy corresponding to the target object, so that it can be statistically obtained that the front-end user is using behavioral data at the time of the page. For specific content, reference may be made to the relevant records in the foregoing embodiments, which will not be repeated here.

本實施例提供的前端用戶行為統計裝置,透過獲取為頁面預先設定的埋點規則,在頁面運行過程中,對頁面的頁面點擊事件進行監聽,在監聽到頁面點擊事件後,基於埋點規則統計該頁面前端用戶的行為資料。本實施例中為了實現了對頁面的自動埋點,先為頁面設定埋點規則,在頁面運行時由頁面點擊事件觸發埋點開啟,解決了現有透過手動埋點存在過錯繁瑣便捷性較差的問題,而且能夠對頁面前端用戶的行為進行全域統計,統計效率較高。 The front-end user behavior statistics device provided by this embodiment, by acquiring the pre-set burying rules for the page, monitors the page click events of the page during the running process of the page, and after monitoring the page click events, collects statistics based on the burying rules The behavior data of the front-end users of this page. In this embodiment, in order to realize the automatic tracking of the page, first set the tracking rule for the page, and when the page is running, the page click event triggers the tracking to open, which solves the problem of the existing manual tracking, which is cumbersome and inconvenient. , and can conduct global statistics on the behavior of users at the front end of the page, with high statistical efficiency.

實施例七 Embodiment 7

如圖7所示,其為本發明實施例七的前端用戶行為統計裝置的結構示意圖。該前端用戶行為統計裝置包括:獲取模組11、監聽模組12和統計模組13。 As shown in FIG. 7 , it 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 acquisition module 11 , a monitoring module 12 and a statistics module 13 .

本實施例中,統計模組13一種可選地結構方式包括:獲取單元131、判斷單元132、記錄單元133和寫入單元134。 In this embodiment, an optional structural manner of the statistics module 13 includes: an acquisition unit 131 , a judgment unit 132 , a recording unit 133 and a writing unit 134 .

其中,獲取單元131,用於確定監聽到的所述頁面點擊事件對應的目標物件;判斷單元132,用於判斷所述目標物件是否開啟埋點;記錄單元133,用於在所述判斷單元判斷出所述目標物件開啟埋點時,對所述目標物件的點擊行為進行埋點記錄,並依據所述埋點記錄和所述目標物件的統計策略統計所述前端用戶的行為資料。 Among them, the acquiring unit 131 is used to determine the target object corresponding to the monitored page click event; the judging unit 132 is used to judge whether the target object has a buried point; the recording unit 133 is used to judge in the judging unit When the target object is turned on for tracking, a tracking record is performed on the click behavior of the target object, and the behavior data of the front-end user is counted according to the tracking record and the statistical strategy of the target object.

進一步地,記錄單元133,還用於在對所述目標物件的點擊行為進行埋點記錄的同時,確定與所述點擊行為對應的請求事件,對所述請求事件的業務邏輯進行記錄。 Further, the recording unit 133 is further configured to determine a request event corresponding to the click behavior while recording 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 records 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, when the monitoring module 12 monitors the page refresh event or the page close event, convert the behavior data to the The business logic is written to the log file.

可選地,行為資料和業務邏輯先在前端進行本地保存,實際應用中,為了緩解本機存放區的壓力,可以在記錄的次數超過閾值時,批量地將記錄的行為資料和業務邏輯發送到伺服器上進行保存,在接收到行為資料和業務邏輯後,伺服器可以按照設定的資料格式寫入到日誌檔中。 Optionally, the behavior data and business logic are stored locally at the front end. In practical applications, in order to relieve the pressure on the local storage area, when the number of records exceeds the threshold, the recorded behavior data and business logic can be sent to the server in batches. It is stored on the server. After receiving the behavior data and business logic, the server can write it into the log file according to the set data format.

可選地,當監聽到頁面刷新事件或者頁面關閉事件後,為了避免資訊的丟失,將記錄的行為資料和業務邏輯發送到後端的伺服器進行保存。伺服器在接收到行為資料和業務邏輯後,可以按照設定的資料格式寫入到日誌檔中。 Optionally, when a page refresh event or a page close event is monitored, in order to avoid information loss, the recorded behavior data and business logic are sent to the back-end server for storage. After the server receives the behavior data and business logic, it can write it into the log file according to the set data format.

本實施例中,獲取模組11一種可選地結構方式包括:模組化單元111和獲取單元112。 In this embodiment, an optional structural manner of the acquisition module 11 includes: a modularization unit 111 and an acquisition unit 112 .

其中,模組化單元11,用於將所述頁面進行模組化處理。 Wherein, the modularization unit 11 is used for modularizing the page.

獲取單元112,用於在啟動所述頁面時,將所述埋點規則載入到所述頁面對應的模組的業務檔中。其中,所述業務檔為所述頁面的業務處理流程。 The obtaining unit 112 is configured to load the embedded point rule into the business file of the module corresponding to the page when the page is started. Wherein, the business file is the business processing flow of the page.

獲取單元112一種可選地結構方式包括:載入子單元1121、解析子單元1122、封裝子單元1123、渲染子單元1124和解封裝子單元1125。 An optional structural manner of the acquiring 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 business file to obtain the dependency file.

解析子單元1122用於在載入子單元1121載入頁面對 應模組的業務檔之後,解析業務檔,以獲取頁面對應模組的依賴檔。 The parsing subunit 1122 is used to load the page pair in the loading subunit 1121 After responding to the business file of the module, parse the business file to obtain the dependency file of the corresponding module on the page.

一般頁面的模組會有三種依賴檔HTML依賴檔、CSS依賴檔和JS依賴檔。 A general page module will have three types of dependencies: HTML dependencies, CSS dependencies, and JS dependencies.

載入子單元1121具體用於載入頁面的業務檔,在載入頁面的業務檔的埋點規則。進一步地,載入子單元1121具體用於載入超文件標示語言HTML依賴檔、層疊樣式表CSS依賴檔和JS依賴檔。 The loading subunit 1121 is specifically used to load the business file of the page, and to load the embedded rules of the business file of the page. Further, the loading subunit 1121 is specifically configured to load the HTML dependency file of the hyperdocument markup language, the CSS dependency file of the Cascading Style Sheet and the JS dependency file.

封裝子單元1123,用於封裝所述業務檔。 The encapsulation subunit 1123 is used to encapsulate the service file.

在載入子單元1121載入依賴檔和預先為頁面對應模組配置的埋點規則之前,封裝子單元1123封裝該業務檔的業務處理流程。 Before the loading sub-unit 1121 loads the dependency file and the embedded point rules pre-configured for the page-corresponding module, the encapsulating sub-unit 1123 encapsulates the business processing flow of the business file.

解封裝子單元1125,用於解除對所述業務檔的封裝。 The decapsulation subunit 1125 is used to decapsulate the service file.

在統計模組13執行業務檔基於埋點規則限定的埋點物件,統計獲取頁面前端用戶的行為資料之前,解封裝子單元1125解除對該業務檔的封裝。 Before the statistics module 13 executes the embedded object defined by the business file based on the embedded rules, and obtains the behavior data of the user at the front end of the page by statistics, the decapsulation sub-unit 1125 decapsulates the business file.

渲染子單元1124用於對所述業務檔進行超文件標示語言HTML範本渲染和層疊樣式表CSS渲染。 The rendering subunit 1124 is used for rendering the HTML template of the hyperdocument markup language and the CSS rendering of the cascading style sheet for the business document.

在解封裝子單元1125解除對業務檔的封裝之前,使用依賴檔對該業務檔進行HTML範本渲染和CSS渲染。 Before the decapsulation subunit 1125 decapsulates the business file, HTML template rendering and CSS rendering are performed on the business file using the dependency file.

本實施例提供的前端用戶行為統計裝置的各功能模組可用於執行圖1至5所示的前端用戶行為統計方法的流程,其具體工作原理不再贅述,詳見方法實施例的描 述。 Each functional module 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 FIGS. described.

本實施例中,在頁面進行了模組化的基礎之上,為頁面對應模組配置埋點規則,當執行頁面的業務檔,則獲取相應的埋點規則,在執行業務檔的過程中基於埋點規則,獲取頁面前端用戶的行為資料,實現對頁面的全域自動埋點,能夠對頁面前端用戶行為的全域統計,且統計效率較高。 In this embodiment, on the basis that the page is modularized, a burying rule is configured for the module corresponding to the page. When the business file of the page is executed, the corresponding burying rule is obtained. In the process of executing the business file, based on the Embedding rules, to obtain the behavior data of the front-end users of the page, to realize the automatic burying of the whole domain of the page, and to be able to conduct global statistics on the user's behavior at the front-end of the page, and the statistical efficiency is high.

本領域普通技術人員可以理解:實現上述各方法實施例的全部或部分步驟可以透過程式指令相關的硬體來完成。前述的程式可以儲存於一電腦可讀取儲存媒體中。該程式在執行時,執行包括上述各方法實施例的步驟;而前述的儲存媒體包括:ROM、RAM、磁碟或者光碟等各種可以儲存程式碼的媒體。 Those of ordinary skill in the art can understand that all or part of the steps of implementing the above method embodiments may be completed by program instructions related to hardware. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps including the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, magnetic disk or optical disk and other media that can store program codes.

最後應說明的是:以上各實施例僅用以說明本發明的技術方案,而非對其限制;儘管參照前述各實施例對本發明進行了詳細的說明,本領域的普通技術人員應當理解:其依然可以對前述各實施例所記載的技術方案進行修改,或者對其中部分或者全部技術特徵進行等同替換;而這些修改或者替換,並不使相應技術方案的本質脫離本發明各實施例技術方案的範圍。 Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, but not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: The technical solutions described in the foregoing embodiments can still be modified, or some or all of the technical features thereof can be equivalently replaced; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the technical solutions of the embodiments of the present invention. Scope.

Claims (14)

一種前端用戶行為統計方法,其特徵在於,該前端用戶行為統計方法包括:獲取為頁面預先設定的埋點規則;在該頁面運行過程中,對該頁面的頁面點擊事件進行監聽;以及在監聽到該頁面點擊事件後,基於該埋點規則統計該頁面前端用戶的行為資料,所述的前端用戶行為統計方法,其中,該在監聽到該頁面點擊事件後,基於該埋點規則統計該頁面前端用戶的行為資料,包括:確定監聽到的該頁面點擊事件對應的目標物件;判斷該目標物件是否開啟埋點,其中,在該埋點規則中定義了開啟埋點的該目標事件;以及如果判斷結果為是,對該目標物件的點擊行為進行埋點記錄,並依據該埋點記錄和該目標物件對應的統計策略統計該前端用戶的行為資料。 A front-end user behavior statistics method, characterized in that, the front-end user behavior statistics method comprises: acquiring a pre-set embedment rule for a page; monitoring a page click event of the page during the running process of the page; After the click event of the page, the behavior data of the front-end user of the page is counted based on the tracking rule. The front-end user behavior statistics method, wherein, after the click event of the page is monitored, the front-end of the page is counted based on the tracking rule. The behavior data of the user, including: determining the target object corresponding to the monitored click event on the page; judging whether the target object has a buried point enabled, wherein the target event for enabling the buried point is defined in the buried point rule; and if it is judged The result is that the click behavior of the target object is tracked and recorded, and the behavior data of the front-end user is counted according to the track record and the statistical strategy corresponding to the target object. 根據申請專利範圍第1項所述的前端用戶行為統計方法,其中,還包括:在對該目標物件的點擊行為進行埋點記錄的同時,確定與該點擊行為對應的請求事件,對該請求事件的業務邏輯進行記錄。 The front-end user behavior statistics method according to item 1 of the scope of the patent application, further comprising: while recording the click behavior of the target object, determining a request event corresponding to the click behavior, and determining the request event corresponding to the click behavior. The business logic is recorded. 根據申請專利範圍第2項所述的前端用戶行為統計方法,其中,該依據該埋點記錄和該目標物件對應的統 計策略統計前端用戶的該行為資料之後,還包括:在記錄的次數超過閾值時,將該行為資料和該業務邏輯寫入日誌檔。 The front-end user behavior statistical method according to item 2 of the scope of the application, wherein the statistical data corresponding to the target object is based on the buried point record. After calculating the behavior data of the front-end user by the counting strategy, the method further includes: when the number of records exceeds the threshold, writing the behavior data and the business logic into the log file. 根據申請專利範圍第3項所述的前端用戶行為統計方法,其中,該依據該埋點記錄和該目標物件對應的統計策略統計前端用戶的該行為資料之後,還包括:在該頁面運行的過程中,對頁面刷新事件或者頁面關閉事件進行監聽;以及當監聽到該頁面刷新事件或者該頁面關閉事件時,將該行為資料和該業務邏輯寫入日誌檔。 According to the method for statistics of front-end user behavior described in item 3 of the scope of application for patent, wherein after collecting the behavior data of the front-end user according to the buried point record and the statistical strategy corresponding to the target object, the method further includes: a process of running on the page , monitor the page refresh event or the page close event; and when the page refresh event or the page close event is monitored, write the behavior data and the business logic into the log file. 根據申請專利範圍第1至4項中任一項所述的前端用戶行為統計方法,其中,該獲取為頁面預先設定的埋點規則,包括:將該頁面進行模組化處理;以及在啟動該頁面時,將該埋點規則載入到該頁面對應的模組的業務檔中,其中,該業務檔為該頁面的業務處理流程。 The front-end user behavior statistics method according to any one of items 1 to 4 of the scope of the patent application, wherein the acquiring the pre-set embedment rules for the page includes: modularizing the page; When the page is displayed, the embedded point rule is loaded into the business file of the module corresponding to the page, where the business file is the business processing flow of the page. 根據申請專利範圍第5項所述的前端用戶行為統計方法,其中,該在啟動該頁面時,將預設的埋點規則載入到該頁面對應的模組的業務檔中,包括:載入該頁面的業務檔;對該業務檔解析,以獲取該頁面運行時所需的依賴檔;封裝該業務檔; 載入該依賴檔和該埋點規則;對該業務檔進行超文件標示語言HTML範本渲染和層疊樣式表CSS渲染;以及解除對該業務檔的封裝。 The front-end user behavior statistics method according to item 5 of the scope of the patent application, wherein when starting the page, the preset embedment rules are loaded into the business file of the module corresponding to the page, including: loading The business file of the page; parse the business file to obtain the dependency file required for the page to run; encapsulate the business file; Load the dependency file and the embedding rule; perform the HTML template rendering of the hyperfile markup language and the CSS rendering of the cascading style sheet for the business file; and unencapsulate the business file. 根據申請專利範圍第6項所述的前端用戶行為統計方法,其中,該在該頁面運行過程中,對該頁面的頁面點擊事件進行監聽,包括:透過執行該業務檔運行該頁面,在運行過程中對隸屬於該頁面點擊事件進行監聽。 According to the front-end user behavior statistics method described in item 6 of the scope of the patent application, the monitoring of the page click event of the page during the running process of the page includes: running the page by executing the business file, and during the running process Monitor the click events belonging to the page. 一種前端用戶行為統計裝置,其特徵在於,該前端用戶行為統計裝置包括:獲取模組,用於獲取為頁面預先設定的埋點規則;監聽模組,用於在該頁面運行過程中,對該頁面的頁面點擊事件進行監聽;以及統計模組,用於在監聽到該頁面點擊事件後,基於該埋點規則統計該頁面前端用戶的行為資料,該統計模組,包括:獲取單元,用於確定監聽到的該頁面點擊事件對應的目標物件;判斷單元,用於判斷該目標物件是否開啟埋點,其中,在該埋點規則中定義了開啟埋點的該目標事件;以及記錄單元,用於在該判斷單元判斷出該目標物件開啟埋點時,對該目標物件的點擊行為進行埋點記錄,並依據該埋點記錄和該目標物件的統計策略統計該前端用戶的行 為資料。 A front-end user behavior statistics device, characterized in that, the front-end user behavior statistics device includes: an acquisition module for acquiring pre-set embedment rules for a page; a monitoring module for in the running process of the page, The page click event of the page is monitored; and the statistics module is used to count the behavior data of the front-end users of the page based on the buried point rule after monitoring the click event of the page. The statistics module includes: an acquisition unit, used for Determine the target object corresponding to the monitored click event on the page; a judging unit for judging whether the target object opens a buried point, wherein the target event for opening the buried point is defined in the buried point rule; and a recording unit, with When the judging unit determines that the target object is enabled to track the target object, the click behavior of the target object is tracked and recorded, and according to the track record and the statistical strategy of the target object, the behavior of the front-end user is counted. for data. 根據申請專利範圍第8項所述的前端用戶行為統計裝置,其中,該記錄單元,還用於在對該目標物件的點擊行為進行埋點記錄的同時,確定與該點擊行為對應的請求事件,對該請求事件的業務邏輯進行記錄。 The front-end user behavior statistics device according to item 8 of the scope of the patent application, wherein the recording unit is further configured to determine the request event corresponding to the click behavior while recording the click behavior of the target object, Record the business logic of the request event. 根據申請專利範圍第9項所述的前端用戶行為統計裝置,其中,該統計模組,還包括:寫入單元,用於在記錄的次數超過閾值時,將該行為資料和該業務邏輯寫入日誌檔。 The front-end user behavior statistics device according to item 9 of the scope of the patent application, wherein the statistics module further includes: a writing unit for writing the behavior data and the business logic when the number of records exceeds a threshold log file. 根據申請專利範圍第10項所述的前端用戶行為統計裝置,其中,該監聽模組,還用於在該頁面運行的過程中,對頁面刷新事件或者頁面關閉事件進行監聽;以及該寫入單元,還用於在該監聽模組監聽到該頁面刷新事件或者該頁面關閉事件時,將該行為資料和該業務邏輯寫入日誌檔。 The front-end user behavior statistics device according to item 10 of the scope of the application, wherein the monitoring module is further configured to monitor the page refresh event or the page close event during the running process of the page; and the writing unit , and is also used to write the behavior data and the business logic into the log file when the monitoring module monitors the page refresh event or the page close event. 根據申請專利範圍第8至11項中任一項所述的前端用戶行為統計裝置,其中,該獲取模組,包括:模組化單元,用於將該頁面進行模組化處理;以及獲取單元,用於在啟動該頁面時,將該埋點規則載入到該頁面對應的模組的業務檔中,其中,該業務檔為該頁面的業務處理流程。 The front-end user behavior statistics device according to any one of items 8 to 11 of the scope of the patent application, wherein the acquisition module includes: a modular unit for performing modular processing on the page; and an acquisition unit , which is used to load the embedded point rule into the business file of the module corresponding to the page when the page is started, where the business file is the business processing flow of the page. 根據申請專利範圍第12項所述的前端用戶行為統計裝置,其中,該獲取單元,包括:載入子單元,用於載入該頁面的業務檔、該頁面運行 時所需的依賴檔以及該埋點規則;解析子單元,用於對該業務檔解析,以獲取該依賴檔;封裝子單元,用於封裝該業務檔;渲染子單元,用於對該業務檔進行超文件標示語言HTML範本渲染和層疊樣式表CSS渲染;以及解封裝子單元,用於解除對該業務檔的封裝。 The front-end user behavior statistics device according to item 12 of the scope of the application, wherein the acquiring unit includes: a loading sub-unit for loading the business file of the page, the page running The required dependency file and the burying rule; the parsing sub-unit is used to parse the business file to obtain the dependency file; the encapsulation sub-unit is used to encapsulate the business file; the rendering sub-unit is used for the business file Rendering the HTML template of the hyperfile markup language and the CSS rendering of the cascading style sheet; and decapsulating the subunit for decapsulating the business document. 根據申請專利範圍第13項所述的前端用戶行為統計裝置,其中,該監聽模組,具體用於透過執行該業務檔運行該頁面,在運行過程中對隸屬於該頁面點擊事件進行監聽。 The front-end user behavior statistics device according to item 13 of the scope of the application, wherein the monitoring module is specifically used to run the page by executing the business file, and monitor click events belonging to the page during the running process.
TW106107619A 2016-04-01 2017-03-08 Front-end user behavior statistics method and device TWI753887B (en)

Applications Claiming Priority (3)

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

Publications (2)

Publication Number Publication Date
TW201810076A TW201810076A (en) 2018-03-16
TWI753887B true TWI753887B (en) 2022-02-01

Family

ID=59963450

Family Applications (1)

Application Number Title Priority Date Filing Date
TW106107619A TWI753887B (en) 2016-04-01 2017-03-08 Front-end user behavior statistics method and device

Country Status (3)

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

Families Citing this family (67)

* 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
CN108280014B (en) * 2018-02-06 2021-03-16 武汉斗鱼网络科技有限公司 Method and device for monitoring browser page and computer equipment
CN108536589A (en) * 2018-03-26 2018-09-14 广州小鹏汽车科技有限公司 A kind of application program buries point methods and system
CN108733559B (en) * 2018-04-09 2023-03-28 平安普惠企业管理有限公司 Page event triggering method, terminal equipment and medium
CN110704771B (en) * 2018-06-22 2024-03-01 北京京东尚科信息技术有限公司 Page abnormality monitoring method, system, device, electronic equipment and readable medium
CN110825594B (en) * 2018-08-07 2023-10-24 阿里巴巴(中国)有限公司 Data reporting and issuing method, client and server
CN109101425B (en) * 2018-08-14 2021-12-07 创新先进技术有限公司 Index point burying method and device for dynamic page AB test
CN109240664B (en) * 2018-08-22 2023-04-28 平安普惠企业管理有限公司 Method and terminal for collecting user behavior information
CN109542529B (en) * 2018-10-26 2022-04-05 深圳壹账通智能科技有限公司 Function name-based point burying method and device, computer equipment and storage medium
CN111105259B (en) * 2018-10-29 2024-04-02 北京奇虎科技有限公司 User identification method, device, electronic 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
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
CN109767259A (en) * 2018-12-15 2019-05-17 深圳壹账通智能科技有限公司 Based on operation event promotion method, apparatus, equipment and the medium for burying point data
CN109933317B (en) * 2018-12-24 2023-04-11 创新先进技术有限公司 Point burying method, device, server and readable storage medium
CN109902253A (en) * 2019-01-18 2019-06-18 中国平安人寿保险股份有限公司 Page data acquisition method and device, electronic equipment, storage medium
CN110020912B (en) * 2019-01-31 2022-03-22 创新先进技术有限公司 Page display method, device and equipment
CN109871212B (en) * 2019-02-26 2022-10-28 广州虎牙信息科技有限公司 Method, device and equipment for processing special topic page and storage medium
CN109885305B (en) * 2019-02-26 2022-10-28 广州虎牙信息科技有限公司 Method, device, equipment and storage medium for processing special topic pages
CN110083459A (en) * 2019-03-16 2019-08-02 平安城市建设科技(深圳)有限公司 The data in cross-page face bury point methods, device, equipment and storage medium
CN109960633A (en) * 2019-03-28 2019-07-02 深圳市跃动运营科技有限公司 A kind of data visualization buries point methods, storage medium and intelligent terminal
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
CN110457089B (en) * 2019-07-05 2023-09-26 中国平安人寿保险股份有限公司 Data acquisition method, data acquisition device, computer readable storage medium and computer equipment
CN110569185A (en) * 2019-08-02 2019-12-13 贝壳技术有限公司 front-end point burying method and device
CN110659188B (en) * 2019-08-14 2023-03-21 平安普惠企业管理有限公司 Page portrait data processing method and device, computer equipment and storage medium
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
CN111061627B (en) * 2019-11-20 2023-10-03 北京达佳互联信息技术有限公司 Webpage embedding method and device, electronic equipment and storage medium
CN110933165A (en) * 2019-11-27 2020-03-27 中国银行股份有限公司 Operation behavior tracking method and device
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
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
CN111901192B (en) * 2020-07-15 2023-09-12 腾讯科技(深圳)有限公司 Statistical method and device for page access data
CN111797025B (en) * 2020-07-17 2023-11-14 北京中指讯博数据信息技术有限公司 Application-oriented data processing method and device
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
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
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
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
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
CN113239251A (en) * 2021-05-27 2021-08-10 深圳市金蝶天燕云计算股份有限公司 Processing method of buried point data, related device and storage medium
CN113485883B (en) * 2021-05-31 2024-02-13 济南浪潮数据技术有限公司 Optimization monitoring method, device, equipment and medium for server virtualization system
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
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
CN115022388A (en) * 2022-05-31 2022-09-06 济南浪潮数据技术有限公司 Data acquisition method, device, equipment and 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

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
TW201521019A (en) * 2013-11-27 2015-06-01 Alibaba Group Services Ltd Data processing method and 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
CN104348650B (en) * 2013-08-05 2019-07-16 腾讯科技(深圳)有限公司 Monitoring method, service apparatus and the system of website

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW201521019A (en) * 2013-11-27 2015-06-01 Alibaba Group Services Ltd Data processing method and 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

Also Published As

Publication number Publication date
TW201810076A (en) 2018-03-16
CN107295050A (en) 2017-10-24
CN107295050B (en) 2021-05-11
WO2017167042A1 (en) 2017-10-05

Similar Documents

Publication Publication Date Title
TWI753887B (en) Front-end user behavior statistics method and device
CN109508191B (en) Code generation method and system
CN110069683B (en) Method and device for crawling data based on browser
US8413044B2 (en) Method and system of retrieving Ajax web page content
US20140137006A1 (en) Graphical Overlay Related To Data Mining And Analytics
CN110020339B (en) Webpage data acquisition method and device based on non-buried point
US20200357007A1 (en) Page data acquisition method, apparatus, server, electronic device and computer readable medium
US20210224349A1 (en) Method and apparatus for analyzing data flow, device, and medium
TWI525543B (en) Hybrid dynamic code compiling device, method, and service system thereof
CN104408204A (en) Method and device for obtaining webpage page link address
CN101443751A (en) Method and apparatus for an application crawler
CN109684571B (en) Data acquisition method and device and storage medium
CN106598991A (en) Web crawler system capable of realizing website interaction and automatic form extraction by conversational mode
CN109428776B (en) Website traffic monitoring method and device
CN107015903B (en) Interface test program generation method and device and electronic equipment
CN114138244A (en) Method and device for automatically generating model files, storage medium and electronic equipment
CN113296653A (en) Simulation interaction model construction method, interaction method and related equipment
US9003378B2 (en) Client-side application script error processing
EP3178009A1 (en) Replicating a web technology
US8756211B2 (en) Electronic content analytics
Vogel et al. An in-depth analysis of web page structure and efficiency with focus on optimization potential for initial page load
CN109062784B (en) Interface parameter constraint code entry positioning method and system
CN105975395A (en) Website state reconnaissance method and device
CN109062785B (en) Interface parameter constraint code positioning method and system
CN113360138A (en) Operation log processing method and device, electronic equipment and storage medium