All Products
Search
Document Center

Common tracking types

Last Updated: Jul 07, 2021

The Web common automatic tracking solution (mtracker) is a common tracking solution for PC and mobile HTML5 pages. The solution realizes the automatic reporting of logs by setting the tag attribute. This solution is used in mobile HTML5 page to report the event logs of page display, click, and exposure.

Before configuring common tracking, you need to learn about the tracking types used in different business scenarios:

PV tracking

After you introduce the mtracker, the system records a PV count in the log every time the page is opened, and you don’t have to do any extra operations.

Click tracking

Click tracking records the clicks on certain buttons and links on a page.

Tag tracking

  • The mtracker monitors click events, and automatically adds log about clicks for the tags with seed and data-seed attribute.

       
    1. <div seed="seedname"></div>
  • If the business needs extra click event information, the extra attribute prefixed with data-mtr- will also be logged together with seed attribute.

       
    1. <div seed="seedname" data-mtr-extra1="111" data-mtr-extra2="222" >
    2. </div>

Trigger actively

In some business scenarios, you must manually trigger click events. For example, different clicks on the same tag need to be logged to different points based on judgment. At this time, the JS click tracking method Tracker.click(eventId, [options]) is needed.

  • Parameter instructions:
Parameter Type Example Description
eventId String clickseedname Event ID
options Object Options, including bizType, ext.
bizType String Pay Business type
ext Object {productId: ‘xxx’ } Extension parameter
  • Code sample:
 
  1. Tracker.click('clickseedname', { bizType: 'Pay', ext: { productId: 'xxx' } });

Exposure tracking

Exposure tracking records the exposure of certain content on a page.

If the exposure event is required to be manually triggered, such as a carousel display, you need to use the JS exposure event logging method tracking.expo().

 
  1. Tracker.expo(eventId, [options])
  • Parameter instructions:
Parameter Type Example Description
eventId String exposeedname Event ID
options Object Options, including bizType, ext.
bizType String Pay Business type
ext Object {productId: ‘xxx’ } Extension parameter
  • Code sample:
 
  1. Tracker.expo('exposeedname', { bizType: 'Pay', ext: { productId: 'xxx' } });