跳到内容

推送订阅按钮

获取更多推送订阅者并改善用户体验!在您的网站上设置自定义订阅按钮以提高选择加入率。与其自动向新用户显示标准对话框,不如解释您的消息价值,并在用户满意时提示他们订阅推送通知。 只需个简单步骤,您就可以拥有一个准备就绪并正常工作的自定义推送订阅按钮!

1. 实现 Web SDK 订阅按钮

Anchor link to

要在您的网站上显示按钮,请将以下代码添加到 Pushwoosh Web SDK 的初始化参数中:

Pushwoosh.push(['init', {
//...
autoSubscribe: false,
subscribeWidget: {
enable: true,
}
}]);

设置按钮时,请务必禁用 autoSubscribe

2. 自定义按钮

Anchor link to

为了使按钮与您的网站外观和风格匹配,请自定义其设计!您可以更改铃铛的颜色、位置、边框和阴影等参数;此外,还可以更改工具提示文本。

Pushwoosh.push(['init', {
//...
subscribeWidget: {
enable: true,
position: 'bottomLeft', //possible values: ‘bottomLeft’, ‘bottomRight’, ‘topLeft’, ‘topRight’
bgColor: '#12AE7E',
bellColor: 'white',
bellStrokeColor: '#08754f',
bellButtonBorder: '1px solid #379676',
shadow: '0px 0px 6px rgba(0, 0, 0, 0.75)',
size: '48px',
indent: '20px',
zIndex: '999999',
tooltipText: {
successSubscribe: '您已成功订阅!',
needSubscribe: '获取重要新闻通知!',
blockSubscribe: '点击查看如何获取通知',
alreadySubscribed: '您已订阅'
},
buttonImage: 'https://url-image.jpg',
contentImages: {
chrome: 'https://url-image.jpg',
mobileChrome: 'https://url-image.jpg',
firefox: 'https://url-image.jpg',
opera: 'https://url-image.jpg',
safari: 'https://url-image.jpg',
edge: 'https://url-image.jpg',
}
}
}]);