1. Plugin Usage

Currently, Web/Mini Program is gradually evolving into a plugin-based architecture. The concept of "everything is a plugin" will become more apparent.

Before using the plugin, please refer to the Plugin Usage.

2. Existing Plugin List and Usage

The root directory of the plugins is /dist/web/plugin/, and the directory of the plugins is the address relative to the plugin root directory.

2.1. Built-in unused plugins

Built-in unused plugins that need to be manually called with the use method and the plugin name passed in. For example, use the built-in unused PageLeave plugin.

import sensors  from '/dist/web/sensorsdata.es6.js'; sensors.use('PageLeave', option); sensors.init({ 	...初始化参数 }) 
JS

Plugin Name (Plugin variable name in the SDK)

Directory where the plugin is located (/dist/web/plugin/)

Plugin Description

Instructions for Use

Minimum required version for using the latest version of the plugin

Whether it is built-in in the SDK under /dist/web/

1

Amp

ampGoogle AMPDocumentationv1.24.1Built-in
2SensorsChannelchannelChannel Link Tracking and FeedbackDocumentationv1.24.1Built-in
4DeeplinkdeeplinkDeep LinkDocumentationv1.24.1Built-in
5PageLeavepageleavePage Browsing DurationDocumentationv1.24.1Built-in
6PageLoadpageloadPage Load DurationDocumentationv1.24.1Built-in
7RegisterPropertyPageHeightregister-property-page-heightCollect Page Height PropertyDocumentationv1.24.1Built-in
8SiteLinkersite-linkerMulti-domain integrationDocumentationv1.24.1Built-in

2.2. External Plugin

The external plugin needs to be integrated and used manually. For example, by using the external session-event plugin.

import sensors  from '/dist/web/sensorsdata.es6.js'; import sessionEvent from '/dist/web/plugin/session-event/index.es6.js'; sensors.use(sessionEvent); sensors.init({ 	...初始化参数 }) 
JS

Plugin name (variable name of the plugin in the SDK)

Plugin location (/dist/web/plugin/)

Plugin description

Instructions for use

Minimum version requirement for using the latest version of the plugin

Whether it is built-in in the /dist/web/ directory of the SDK

1AesEncryption

aes-encryption

AES encryption plugin

Documentationv1.24.1External
2ExposureexposureElement Exposure Event CollectionDocumentationv1.24.1External
3SessionEventsession-event12h/30min Session Splitting Event Collection PluginDocumentationv1.24.1External
4SiteLinkerConcatUtmsite-linker-concat-utmMulti-domain Linkage Plugin (with utm parameters)Documentationv1.24.1External
5WechatWebViewChannelwechat-webview-channelMini-program webview channel attributionDocumentationv1.24.1External
6SensorsABTestabtesting-sdk-web

Web A/B Testing - Web A/B Test

Documentationv1.24.1External
7

Popup (H5 version) WebPopup (Web version)

sf-sdk-miniprogramPopup - Pop-up Window (H5 and Web)Documentationv1.24.1External
8GeneralEncryptiongeneral-encryptionAsymmetric encryption data reportingDocumentationv1.24.3External
9

CustomEventsSender

custom-events-senderCustom data receiving endpointDocumentationv1.24.8External
10SfInstantEvent

sf-instant-event

SF - Instant event reporting

Documentation

v1.24.8External
11ChannelUtmchannel-utmCollect advertising channel utm parametersDocumentationv1.24.1External
12SMEncryptionsm-encryptionSM encryption pluginDocumentationv1.25.20External

2.3. Built-in Used Plugins

Built-in used plugins are default features of the Web SDK (for reference only). Please do not integrate or use them manually!


Plugin Directory

Plugin Description

Instructions for Use

Minimum Version Required for the Latest Version of the Plugin

Whether the SDK in /dist/web/ is Built-in

1android-bridgeAndroid PlatformDocumentationv1.24.1Built-in and Used
2android-obsolete-bridgeOld Version of Android Platform IntegrationDocumentationv1.24.1Built-in and Used
3ios-bridgeiOS Platform IntegrationDocumentationv1.24.1Built-in used
4ios-obsolete-bridgeOld version access on iOS platformDocumentationv1.24.1Built-in used
5utmUTM channel sourceDocumentationv1.24.1Built-in used
6disable-sdkDisable/Enable SDK collectionDocumentationv1.24.5Built-in Usage
7ajax-senderAjax Data SendingDocumentationv1.24.8Built-in Usage
8batch-senderBatch Data SendingDocumentationv1.24.8Built-in Usage
9beacon-senderBeacon Data SendingDocumentationv1.24.8Built-in Usage
10debug-senderDebug Sending DataDocumentationv1.24.8Internal Use
11image-senderImage Sending DataDocumentationv1.24.8Internal Use
12jsapp-senderCustomize storage to collect data and customize sending timingDocumentationv1.24.8Internal Use

2.4.  Third-party Plugin

The above plugins are maintained by Sensors Analytics and are relatively common. However, due to the increasing demand, some plugins customized by clients cannot be developed by Sensors Analytics. At this time, we highly recommend developing third-party plugins.

In order to provide a platform for sharing third-party plugins, we have established the Plugin Sharing Repository. You can submit your developed code here.

If you have the intention to develop third-party plugins to customize your own needs, you can contact us through the following channels. Currently, third-party plugin development is in its early stages, and our research and development team will provide sufficient support.

Note: Third-party plugins are also external plugins and are used in the same way.

2.5. Note

  • The version of the plugin must be consistent with the SDK. If one side is upgraded, both sides need to be updated at the same time. Remember, do not update only one side.
    • Starting from version v1.24.1, use the /dist/web/ directory to achieve simultaneous updates. Because the SDK and the plugin are both in this directory, as long as the references are pointing here, they can be updated simultaneously.
  • The SDK version requirement here is the minimum SDK version required when the plugin has the latest features.
  • The plugin does not have its own version number. If the plugin is modified, the overall version will increase.
  • If GitHub is not accessible, you can also download from npm and check it in the local directory /dist/web/plugin.