Skip to content
/ wechat Public

A JS library brings Adobe Experience Platform functionality to WeChat Mini Programs.

License

Notifications You must be signed in to change notification settings

adobe/wechat

Adobe Exprience Platform Wechat Mini Program SDK

This SDK is available as an open source project under an Apache License 2.0 - see LICENSE.md for further detail. The SDK is provided on an as-is basis, without warranty.

Introduction

This JS Library is used to integrate Adobe's Experience Cloud solutions to your WeChat Mini Programs.

Feature Details:

  1. Pass in the configuration, including analytics and app related settings.
  2. Send Analytics track action/state call.
  3. Collect lifecycle data, including Launch/Install/Upgrade events, and previous session length ....
  4. Use aid to identify a unique user
    1. Retrieve aid from remote analytics server at the first app launch. (Android)
    2. Generate aid locally at the first app launch. (iOS)
    3. Store aid and Lifecycle related data into local storage.
  5. Use a queue to guarantee the request are being sent in order, also to avoid occupying multiple HTTP requests quota.
  6. Enable or disable debug logging
  7. Enable or disable debug mode.

Using Mobile SDK in WeChat Mini Program:

  1. In the onLaunch method of the App.js, implement AdobeSDK.init() and pass in valid configurations.
  2. Enable debug logging if needed.
  3. Call AdobeSDK.trackState() when switch to a new Page, and pass in the page name and any additional context data. Normally, you can implment this in the onShow method of the Page.
  4. Call AdobeSDK.trackAction() if you want to track a certain event.

Public API :

Git book

Development Environment:

Development dependencies

If you're using VSCode, here is a list of recommended plugins :

  • jsDoc
  • Code Runner
  • ESLint
  • Gulp Tasks

Launch sample app in WeChat IDE

Build Project

To build this project, you need NodeJS and npm:

  • Install dev dependencies

    npm install
    
  • Run tests

    gulp test
    
  • Export JS Library to folder dist

    gulp export_sdk
    

Contributing

Contributions are welcomed! Read the Contributing Guide for more information.

Licensing

This project is licensed under the Apache V2 License. See LICENSE for more information.