Can WeChat Mini Programs identify Mini Program who the user entered from a certain scene or channel?

do you want to know whether Mini Program and Mini Program, whose users enter from a specific channel, have such a function or method


onLaunch or onShow: in app.js

onLaunch: function(options) {
    console.log(options.scene) //101
  },
  onShow: function(options) {
      console.log(options.scene)
  }
  :https://mp.weixin.qq.com/debug/wxadoc/dev/framework/app-service/scene.html

you can add parameters to the channel and judge
such as pages/index/index?source=xxx

after the page is obtained.
Menu