window.OneSignal = window.OneSignal || []; OneSignal.push(function() { OneSignal.init({ appId: "7859483c-aa7b-4817-a867-c701839c77dc", notifyButton: { enable: true, }, }); OneSignal.getTags().then(function(tags) { let visits = 1; if(tags.ed !== undefined) { visits = parseInt(tags.ed) + 1; } OneSignal.sendTags({ed: visits}); }); });