Disclosure of Invention
In view of this, the embodiments of the present invention provide a method and an apparatus for collecting and reporting an event buried point, which can report event attributes and relationships between events to a server, so as to track each operation of a user on a website or an APP, better analyze a behavior path of the user, and provide an operation guidance service for the user.
In order to achieve the above object, according to an aspect of the embodiments of the present invention, a method for collecting and reporting an event buried point is provided.
A method for collecting and reporting event buried points comprises the following steps: when a user triggers a preset embedded point control, collecting event data corresponding to user operation, wherein the event data comprises an operation identifier; assigning the operation identifier of the event to a next operation attribute of a last event of the event, wherein the next operation attribute is used for identifying a user operation corresponding to the next event of the current event; and reporting the event and the event data of the last event.
Optionally, attributes are added to the control by classifying the control and associating the attributes, and then the added attributes are assigned to bury the control.
Optionally, if the event is a null event, the next operation attribute of the previous event is assigned as null.
Optionally, if the event is the first event, event data of the event is directly reported.
Optionally, after collecting event data corresponding to the user operation, the method further includes: and storing the collected event data.
According to another aspect of the embodiment of the invention, a collecting and reporting device for an event buried point is provided.
An event buried point collecting and reporting device, comprising: the data acquisition module is used for acquiring event data corresponding to user operation when a user triggers a preset embedded point control, wherein the event data comprises an operation identifier; the attribute assignment module is used for assigning the operation identifier of the event to the next operation attribute of the last event of the event, wherein the next operation attribute is used for identifying the user operation corresponding to the next event of the current event; and the data reporting module is used for reporting the event data of the event and the last event.
Optionally, attributes are added to the control by classifying the control and associating the attributes, and then the added attributes are assigned to bury the control.
Optionally, if the event is a null event, the next operation attribute of the previous event is assigned as null.
Optionally, if the event is the first event, event data of the event is directly reported.
Optionally, the system further comprises a data storage module for: and after the event data corresponding to the user operation is collected, storing the collected event data.
According to still another aspect of the embodiment of the invention, an electronic device for collecting and reporting event buried points is provided.
An electronic device for collecting and reporting event buried points, comprising: one or more processors; and the storage device is used for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors realize the collection and reporting method of the event buried points provided by the embodiment of the invention.
According to yet another aspect of an embodiment of the present invention, a computer-readable medium is provided.
A computer readable medium has stored thereon a computer program which when executed by a processor implements the method for collecting and reporting event buried points provided by the embodiment of the present invention.
One embodiment of the above invention has the following advantages or benefits: by collecting event data corresponding to user operation, assigning an operation identifier included in the event data to a next operation attribute of a previous event, and reporting the event and time data of the previous event, the relation between the event attribute and the event is reported to a server, so that each operation of a user on a website or an APP can be tracked, the behavior path of the user can be better analyzed, and operation guiding service can be provided for the user.
Further effects of the above-described non-conventional alternatives are described below in connection with the embodiments.
Detailed Description
Exemplary embodiments of the present invention will now be described with reference to the accompanying drawings, in which various details of the embodiments of the present invention are included to facilitate understanding, and are to be considered merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
In order to solve the problems in the prior art, the invention provides a method and a device for collecting event buried points, which can track each operation of a user on a website or an APP by collecting and analyzing the event buried points, better analyze the behavior path of the user and provide operation guiding service for the user.
Event burial points are different from common data burial points. Events are used to track or record user behavior or business processes, such as: registering account numbers, logging in, watching videos, praying, commenting, paying attention, and the like. The three elements of an event include: operations, parameters/attributes and attribute values, wherein operations such as click, drag, etc.; the parameter/attribute may be any attribute associated with the event, including the person triggering the event, time, device, business information, etc.; the attribute value refers to a value parameter of the corresponding attribute.
Taking event burying of the APP as an example, when event burying is carried out, event attributes can be added into a control of the APP by a software developer, and then required data are collected in a mode of assigning the event attributes.
When reporting an event buried point, reporting modes can be divided into two modes according to different acquisition time of the buried point: developer mode and online mode. The developer mode is to collect and report static events such as clicking, jumping and the like in the process of developing functions of the developer in the development and debugging stages; the online mode is that when a user enters a container interface (which is equivalent to a display interface of an APP and can receive all operations of the user on a current page), the container loads an event or triggers the event, and the event is collected and reported. For the two reporting modes of the event buried point, the server may perform different processing after collecting the reported event buried point, but the processing logic of the client for collecting and reporting the event buried point is the same, namely: and triggering an event embedded point control of the client interface by the user, and collecting the event embedded point by the APP and reporting the event embedded point to the server. The user operation is not limited to clicking, but may be sliding, double clicking, dragging, or the like.
Because the event buried points are different from the common data buried points, the collection and reporting modes of the event buried points are also different from the collection and reporting modes of the common data buried points. The following describes a specific implementation process of the method for collecting and reporting event buried points according to the present invention with reference to the accompanying drawings.
Fig. 1 is a schematic diagram of main steps of a method for collecting and reporting an event buried point according to an embodiment of the present invention. As shown in fig. 1, the method for collecting and reporting event buried points in the embodiment of the present invention mainly includes the following steps S101 to S103.
Step S101: when a user triggers a preset embedded point control, event data corresponding to user operation is collected, wherein the event data comprises an operation identifier.
The container interface of the application client is mainly composed of a control for displaying information and receiving user operation. When a user enters a container interface of a client and executes operation on a control, if the control is a control with a buried point set in advance, the buried point program can acquire event data corresponding to the user operation in real time.
In the embodiment of the invention, the attribute is added to the control by classifying the control and associating the attribute, and then the added attribute is assigned to bury the control. Controls are, for example, buttons or options on the application container interface, etc. Specifically, for example, a developer may add an operation identifier (actionID) attribute to a control by associating the operation identifier (actionID) attribute with a control class used to implement the user interface presentation (e.g., control class UIView in a mobile operating system iOS system developed by apple corporation, etc.); as another example, container identification (containerID) attributes may be added to a control by associating the container identification (containerID) attributes with a control class (e.g., control class UIViewController in an iOS system, etc.) for view display control, and so on. Wherein the operation identifier actionID is guaranteed to be unique within the container.
And then, the developer performs assignment on the added attribute to realize embedding the control. For example: the operation identification (actionID) attribute of the control is assigned to realize embedding of the control, wherein the control which does not assign the operation identification (actionID) attribute is not embedded, and therefore the acquired event is an empty event.
When a user executes an operation on the container interface, the embedded point program can collect event data corresponding to the user operation in real time, and then the collected event data is transmitted to the collecting unit to be collected. The collected event data mainly comprises class names of controls operated by a user, position coordinates of the controls on a container interface, operation identifiers actionID and the like. In the event data transmission, the event data transmission may be performed based on event transmission related technologies of the system, for example: for iOS systems, event data may be passed to a collection unit based on the iOS system's event-passing response chain technique.
Event data (including data related to the container, etc.) corresponding to all operations of the user on the container interface are transmitted through an event transmission method SENDEVENT method (void) SENDEVENT (UIEvent) event of the APP agent class of the application program. By adding new logic to the callback class appEvent for responding to the application system event, the purpose of receiving the event data corresponding to the user operation is achieved, and the event data corresponding to the user operation can be transferred to a storage unit (for example, a cache unit).
The storage unit is used for storing the event data so as to sort the event data and report the sorted data to the server. The storage unit continuously receives the collected event data, collates the event data according to step S102, and reports the collated time data according to step S103.
Step S102: and assigning the operation identification of the event to the next operation attribute of the last event of the event, wherein the next operation attribute is used for identifying the user operation corresponding to the next event of the current event.
According to the embodiment of the invention, in order to record and analyze the association relation between the operations of the user, a next operation (nextActionID) attribute is added to the event corresponding to the user operation, and is used for identifying the user operation corresponding to the next event of the current event.
Each time the storage unit receives an event data, the operation identifier of the event is assigned to the attribute of the next operation (nextActionID) of the previous event, so that the association relationship between the operations of the user is recorded, the action path of the user is better analyzed, and the operation guiding service is provided for the user.
Step S103: and reporting the event data of the event and the last event.
Because the related record of the event is newly added and the attribute of the next operation (nextActionID) of the previous event is modified each time new event data is received, the event and the event data of the previous event need to be reported together each time, so that the server can update the event data of the previous event, and the behavior path of the user is obtained according to the event data.
When event data is received for the first time, that is, the event is the first event, the event data of the event is directly reported. At this time, there is no previous event to the event, and thus, no other operation is required.
If the received event data is null, i.e., the event is a null event, then the next operation (nextActionID) attribute that the previous event had is assigned a null.
According to one embodiment of the invention, the received event data may be saved in a form similar to a queue, namely: data is added from the tail of the queue each time. Each time collected event data (e.g., including operations identifier actionID, container identifier containerID, remark comments, etc.) is received, the newly received event data may be assigned to event 1, and the original event 1 may be assigned to event 2, and so on. Then, the next operation (nextActionID) attribute for event 2 is assigned as the operation identifier actionID for event 1, and if event 1 is a null event, then nextActionID for event 2 is null. And then, the event data of the event 1 and the event 2 can be reported in a mode called by a notification center or an interface of the system. Thus, each attribute of the event and the relation between the events can be reported to the server. Because the data reported to the server side has redundancy, the server can perform redundancy elimination processing on the reported data to complete the collection work of all event data.
Fig. 2 is a schematic diagram of main modules of a device for collecting and reporting an event buried point according to an embodiment of the present invention. As shown in fig. 2, the device 200 for collecting and reporting an event buried point according to an embodiment of the present invention mainly includes a data acquisition module 201, an attribute assignment module 202, and a data reporting module 203.
The data acquisition module 201 is configured to acquire event data corresponding to user operation when a user triggers a preset embedded point control, where the event data includes an operation identifier;
the attribute assignment module 202 is configured to assign an operation identifier of the event to a next operation attribute that a previous event of the event has, where the next operation attribute is used to identify a user operation corresponding to the next event of the current event;
the data reporting module 203 is configured to report the event data of the event and the previous event.
According to the embodiment of the invention, the attribute is added to the control in a mode of classifying the control and associating the attribute, and then the added attribute is assigned to bury the control.
According to one embodiment of the invention, if the event is a null event, the next operational attribute that the previous event has is assigned as null.
According to another embodiment of the present invention, if the event is the first event, the event data of the event is directly reported.
According to yet another embodiment of the present invention, the collecting and reporting device 200 of the event burial point may further include a data storage module (not shown in the figure) for:
And after the event data corresponding to the user operation is collected, storing the collected event data.
According to the technical scheme of the embodiment of the invention, through collecting the event data corresponding to the user operation, assigning the operation identification included in the event data to the next operation attribute of the last event, and then reporting the event and the time data of the last event, the relation between the event attribute and the event is reported to the server, so that each operation of the user on the website or the APP can be tracked, the behavior path of the user can be better analyzed, and the operation guiding service can be provided for the user.
In addition, the technical scheme of the invention has no intrusion of engineering codes of the application program, ensures the running stability of the application program, and has the advantage of low access cost of developers.
Fig. 3 illustrates an exemplary system architecture 300 to which the method for collecting and reporting event buried points or the device for collecting and reporting event buried points according to an embodiment of the present invention may be applied.
As shown in fig. 3, the system architecture 300 may include terminal devices 301, 302, 303, a network 304, and a server 305. The network 304 is used as a medium to provide communication links between the terminal devices 301, 302, 303 and the server 305. The network 304 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
A user may interact with the server 305 via the network 304 using the terminal devices 301, 302, 303 to receive or send messages or the like. Various communication client applications may be installed on the terminal devices 301, 302, 303, such as shopping class applications, web browser applications, search class applications, instant messaging tools, mailbox clients, social platform software, etc. (by way of example only).
The terminal devices 301, 302, 303 may be a variety of electronic devices having a display screen and supporting web browsing, including but not limited to smartphones, tablets, laptop and desktop computers, and the like.
The server 305 may be a server providing various services, such as a background management server (by way of example only) providing support for shopping-type websites browsed by users using the terminal devices 301, 302, 303. The background management server may analyze and process the received data such as the product information query request, and feedback the processing result (e.g., the target push information, the product information—only an example) to the terminal device.
It should be noted that, the method for collecting and reporting the event buried points provided in the embodiment of the present invention is generally executed by the server 305, and accordingly, the device for collecting and reporting the event buried points is generally disposed in the server 305.
It should be understood that the number of terminal devices, networks and servers in fig. 3 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Referring now to FIG. 4, there is illustrated a schematic diagram of a computer system 400 suitable for use in implementing a terminal device or server in accordance with an embodiment of the present invention. The terminal device or server shown in fig. 4 is only an example, and should not impose any limitation on the functions and scope of use of the embodiments of the present invention.
As shown in fig. 4, the computer system 400 includes a Central Processing Unit (CPU) 401, which can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 402 or a program loaded from a storage section 408 into a Random Access Memory (RAM) 403. In RAM 403, various programs and data required for the operation of system 400 are also stored. The CPU 401, ROM 402, and RAM 403 are connected to each other by a bus 404. An input/output (I/O) interface 405 is also connected to bus 404.
The following components are connected to the I/O interface 405: an input section 406 including a keyboard, a mouse, and the like; an output portion 407 including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker, and the like; a storage section 408 including a hard disk or the like; and a communication section 409 including a network interface card such as a LAN card, a modem, or the like. The communication section 409 performs communication processing via a network such as the internet. The drive 410 is also connected to the I/O interface 405 as needed. A removable medium 411 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is installed on the drive 410 as needed, so that a computer program read therefrom is installed into the storage section 408 as needed.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication portion 409 and/or installed from the removable medium 411. The above-described functions defined in the system of the present invention are performed when the computer program is executed by a Central Processing Unit (CPU) 401.
The computer readable medium shown in the present invention may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units or modules involved in the embodiments of the present invention may be implemented in software or in hardware. The described units or modules may also be provided in a processor, for example, as: the processor comprises a data acquisition module, an attribute assignment module and a data reporting module. The names of these units or modules do not limit the units or modules themselves in some cases, for example, the data collection module may also be described as "a module for collecting event data corresponding to a user operation when the user triggers a preset embedded point control".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be present alone without being fitted into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to include: when a user triggers a preset embedded point control, collecting event data corresponding to user operation, wherein the event data comprises an operation identifier; assigning the operation identifier of the event to a next operation attribute of a last event of the event, wherein the next operation attribute is used for identifying a user operation corresponding to the next event of the current event; and reporting the event and the event data of the last event.
According to the technical scheme of the embodiment of the invention, through collecting the event data corresponding to the user operation, assigning the operation identification included in the event data to the next operation attribute of the last event, and then reporting the event and the time data of the last event, the relation between the event attribute and the event is reported to the server, so that each operation of the user on the website or the APP can be tracked, the behavior path of the user can be better analyzed, and the operation guiding service can be provided for the user.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives can occur depending upon design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.