if(pushcrew.isAPIReady) { console.log(pushcrew.subscriberId); // will return something like this if current user is a subscriber '1c5d546172cfb4be65a8d51b047c4804'
console.log(pushcrew.subscriberId); // will return false(boolean) if user is not subscribed to push notifications
console.log(pushcrew.subscriberId); // will return -1(integer) if user has blocked push notifications from your website } function callbackFunction() { console.log(pushcrew.subscriberId); // will return something like this if current user is a subscriber '1c5d546172cfb4be65a8d51b047c4804'
console.log(pushcrew.subscriberId); // will return false(boolean) if user is not subscribed to push notifications
console.log(pushcrew.subscriberId); // will return -1(integer) if user has blocked push notifications from your website }
Hi Sir,
I am trying to getting subscribed user id, but am not able to find it, Its return below error:
window._pcq = window._pcq || [ ];
_pcq.push(['APIReady', callbackFunction]);
if(pushcrew.isAPIReady) {
console.log(pushcrew.subscriberId); // will return something like this if current user is a subscriber '1c5d546172cfb4be65a8d51b047c4804'
console.log(pushcrew.subscriberId); // will return false(boolean) if user is not subscribed to push notifications
console.log(pushcrew.subscriberId); // will return -1(integer) if user has blocked push notifications from your website
}
function callbackFunction() {
console.log(pushcrew.subscriberId); // will return something like this if current user is a subscriber '1c5d546172cfb4be65a8d51b047c4804'
console.log(pushcrew.subscriberId); // will return false(boolean) if user is not subscribed to push notifications
console.log(pushcrew.subscriberId); // will return -1(integer) if user has blocked push notifications from your website
}
ReferenceError: pushcrew is not defined
if(pushcrew.isAPIReady) {
What next please