WeChat Official Account Preset Events and Properties
Last updated:2023-02-21
WeChat Official Account Preset Events and Properties
Based on common use cases and to help developers integrate quickly, the JAnalysis SDK pre-defines a set of basic events and properties; developers don't need to instrument them manually — the SDK collects and reports them automatically.
All preset events and properties start with jg_ to distinguish them from custom events and properties.
Preset events
- All preset events include the basic preset properties; see Preset event properties.
- "-" means the event only carries the basic preset properties.
| Display name | Event name | Property | Property display name | Data type | Meaning / example / format | Trigger |
|---|---|---|---|---|---|---|
| New user registration | jg_app_cuid | - | Triggered when a new user successfully registers. The backend simultaneously sets user properties: first-visit time, first_utm series, WeChat user follow channel. | |||
| Follow Official Account | jg_follow_wehcat | jg_subscribe_scene | User channel source | string | The channel through which the user followed, e.g. search, Official Account migration, QR-code scan, etc. | Triggered when a WeChat user successfully follows the Official Account. |
| jg_qr_scene | QR scan scene | string | Set only when followed via QR scan; the QR-code scene (developer-defined). | |||
| jg_qr_scene_str | QR scan scene description | string | Set only when followed via QR scan; description of the QR-code scene (developer-defined). | |||
| jg_ticket | QR ticket | string | Set only when followed via QR scan; the QR-code ticket, used to retrieve the QR image. | |||
| jg_qr_eventkey | QR event key | string | Event KEY value, a 32-bit unsigned integer — the QR-code `scene_id` set at creation time. | |||
| Unfollow Official Account | jg_unfollow_wehcat | - | Triggered when a WeChat user unfollows the Official Account. | |||
| Scan Official Account QR | jg_wechat_scan | jg_qr_scene | QR scan scene | string | Set only when scanned to follow; the QR-code scene (developer-defined). | Triggered when a WeChat user scans the Official Account QR code. |
| jg_qr_scene_str | QR scan scene description | string | Set only when scanned to follow; description of the QR-code scene (developer-defined). | |||
| jg_ticket | QR ticket | string | Set only when scanned to follow; the QR-code ticket, used to retrieve the QR image. | |||
| jg_qr_eventkey | QR event key | string | Event KEY value, a 32-bit unsigned integer — the QR-code `scene_id` set at creation time. | |||
| Report location to Official Account | jg_wechat_location | - | Once location authorization is granted, triggered every time the user enters the Official Account chat and the location is reported. | |||
| Click Official Account bottom-bar menu | jg_wechat_menu_click | jg_menu_eventkey | Menu key | string | Corresponds to the WeChat Official Account custom-menu CLICK event; the URL. | Triggered when a WeChat user clicks a menu link in the Official Account. |
| Send text message to Official Account | jg_towechat_text_message | jg_wechat_content | Text content | string | Text message content. | Triggered when an ordinary WeChat user sends a text message to the Official Account. |
| jg_wechat_message_type | Message type | string | Message type. | |||
| jg_wechat_msgid | Message ID | number | Message ID, 64-bit integer. | |||
| jg_wechat_msgdataId | Message data ID | string | Message data ID (only present when the message comes from an article). | |||
| jg_wechat_ldx | Article source | string | The 1-based index of the article in a multi-article message (only present when the message comes from an article). | |||
| Send image message to Official Account | jg_towechat_image_message | jg_wechat_picurl | Image URL | string | Image URL (generated by the system). | Triggered when an ordinary WeChat user sends an image message to the Official Account. |
| jg_wechat_mediaId | Media ID | string | Message media ID; call the temp-asset API to retrieve the data. | |||
| jg_wechat_message_type | Message type | string | Message type. | |||
| jg_wechat_msgid | Message ID | number | Message ID, 64-bit integer. | |||
| jg_wechat_msgdataId | Message data ID | string | Message data ID (only present when from an article). | |||
| jg_wechat_ldx | Article source | string | 1-based index of the article in a multi-article message (only present when from an article). | |||
| Send voice message to Official Account | jg_towechat_voice_message | jg_wechat_voice_recognition | Voice-to-text | string | With voice recognition enabled, the user's voice is automatically transcribed into text in the `Recognition` field. | Triggered when an ordinary WeChat user sends a voice message to the Official Account. |
| jg_wechat_mediaId | Media ID | string | Message media ID; call the temp-asset API to retrieve the data. | |||
| jg_wechat_message_type | Message type | string | Message type. | |||
| jg_wechat_msgid | Message ID | number | Message ID, 64-bit integer. | |||
| jg_wechat_msgdataId | Message data ID | string | Message data ID (only present when from an article). | |||
| jg_wechat_ldx | Article source | string | 1-based index of the article in a multi-article message (only present when from an article). | |||
| Send video message to Official Account | jg_towechat_video_message | jg_wechat_mediaId | Media ID | string | Message media ID; call the temp-asset API to retrieve the data. | Triggered when an ordinary WeChat user sends a video message to the Official Account. |
| jg_wechat_thumb_mediaId | Video thumb media ID | string | Media ID of the video thumbnail; call the temp-asset API to retrieve it. | |||
| jg_wechat_message_type | Message type | string | Message type. | |||
| jg_wechat_msgid | Message ID | number | Message ID, 64-bit integer. | |||
| jg_wechat_msgdataId | Message data ID | string | Message data ID (only present when from an article). | |||
| jg_wechat_ldx | Article source | string | 1-based index of the article in a multi-article message (only present when from an article). | |||
| Send short-video message to Official Account | jg_towechat_shortvideo_message | jg_wechat_mediaId | Media ID | string | Message media ID; call the temp-asset API to retrieve the data. | Triggered when an ordinary WeChat user sends a short-video message to the Official Account. |
| jg_wechat_thumb_mediaId | Video thumb media ID | string | Media ID of the video thumbnail; call the temp-asset API to retrieve it. | |||
| jg_wechat_message_type | Message type | string | Message type. | |||
| jg_wechat_msgid | Message ID | number | Message ID, 64-bit integer. | |||
| jg_wechat_msgdataId | Message data ID | string | Message data ID (only present when from an article). | |||
| jg_wechat_ldx | Article source | string | 1-based index of the article in a multi-article message (only present when from an article). | |||
| Send location message to Official Account | jg_towechat_location_message | jg_wechat_location_x | Latitude | number | Latitude of the location in the message. | Triggered when an ordinary WeChat user sends a location message to the Official Account. |
| jg_wechat_location_y | Longitude | number | Longitude of the location in the message. | |||
| jg_wechat_location_label | Location label | string | Location label in the message. | |||
| jg_wechat_message_type | Message type | string | Message type. | |||
| jg_wechat_msgid | Message ID | number | Message ID, 64-bit integer. | |||
| jg_wechat_msgdataId | Message data ID | string | Message data ID (only present when from an article). | |||
| jg_wechat_ldx | Article source | string | 1-based index of the article in a multi-article message (only present when from an article). | |||
| Send link message to Official Account | jg_towechat_link_message | jg_wechat_url_title | Link title | string | Title of the link message. | Triggered when an ordinary WeChat user sends a link message to the Official Account. |
| jg_wechat_url_description | Link description | string | Description of the link message. | |||
| jg_wechat_url_url | Link URL | string | URL of the link message. | |||
| jg_wechat_message_type | Message type | string | Message type. | |||
| jg_wechat_msgid | Message ID | number | Message ID, 64-bit integer. | |||
| jg_wechat_msgdataId | Message data ID | string | Message data ID (only present when from an article). | |||
| jg_wechat_ldx | Article source | string | 1-based index of the article in a multi-article message (only present when from an article). | |||
Preset event properties
| Display name | Property name | Data type | Notes |
|---|---|---|---|
| Data source type | jg_data_source | string | Android, iOS, Web JS, WeChat Mini-program, WeChat Official Account, HTTP API |
| App name | jg_app_name | string | Set by the SDK on Android/iOS; set by the backend for Web JS, mini-program, Official Account |
| Data source ID | jg_data_source_id | string | The data-source ID registered in the platform for Android, iOS, web, mini-program, etc. |
| WeChat APPID | jg_wechat_appid | number | Unique identifier for WeChat-ecosystem apps such as mini-programs and Official Accounts |
| Country | jg_country | string | Resolved from the IP address |
| City | jg_city | string | Resolved from the IP address |
| Province | jg_province | bool | Resolved from the IP address |
| GPS latitude | jg_latitude | bool | Latitude from the WeChat Official Account |
| GPS longitude | jg_longitude | string | Longitude from the WeChat Official Account |
Was this document helpful?