You must have a registered channel to send events.

I am trying to trigger a custom event and I have followed all the steps from documentation but I have an error "You must have a registered channel to send events." and I can't find any solution for it here is my code

step 1: 

<script type="text/javascript">
!function(n,t,c,e,u){function r(n){try{f=n(u)}catch(t){return h=t,void i(p,t)}i(s,f)}function i(n,t){for(var c=0;c<n.length;c++)d(n[c],t);
}function o(n,t){return h?(d(t,h),l):f?(d(n,f),l):(n&&s.push(n),t&&p.push(t),l)}function a(n){return o(!1,n)}function d(t,c){
n.setTimeout(function(){t(c)},0)}var f,h,s=[],p=[],l={then:o,"catch":a,_setup:r};n[e]=l;var v=t.createElement("script");
'UA', // This value can be changed to use a custom variable name.
appKey: 'MY-APP-KEY',


// Has no effect on secure domains. Only needed if used on an insecure domain.
secureIframeUrl: ''


step 2 :

UA.then(function(sdk) {
.then(res => {
.catch(err => {

const myEvent = new sdk.CustomEvent('Web_DeeplinkReceived');
myEvent.user = user; = {id: 3, name: "John Doe"}
.catch(err => {
// see validate() below
}).catch(function(err) {


this event should occur when a page loads but it fails give this error "You must have a registered channel to send events."

Please tell me what I am missing because that all there is in the docs.
P.S do I have to add service worker too ?



Didn't find what you were looking for?

New post


1 comment

  • Hi Imran,

    The Service Worker does have to be included in your site in order for the Push Registration to work properly. Make sure you've included this in the root directory of your site.

    Additionally, do you see any logs/errors/warnings when the sdk.register() call is made?

    Comment actions Permalink

Please sign in to leave a comment.