Implement push notifications in four steps without any coding! Pushwoosh WebSDK Lite can be added to your website through Google Tag Manager, making the integration process as easy as possible.
In the Firebase Console, choose your project to obtain your Firebase Server Key and Sender ID. Please see the screenshot below for reference:
Go to Pushwoosh Control Panel and add a new app. On the opened page, configure Chrome or Firefox platform by clicking the Configure button in the respective row. Fill in the form:
The Server Key from Firebase Console into the API key field;
The Sender ID from Firebase Console into the FCM Sender ID field;
The exact address of your website into Website Name field.
Make sure to copy the Application Code of the newly created app, you'll need it later. The app code is highlighted below:
a. In Google Tag Manager, choose a container or create a new one.
b. Create a new Tag and choose Custom HTML in Tag Configuration.
c. Copy the script below and paste it into the HTML field;
d. Change number signs
#####-##### (highlighted on the picture below) in the script to your Pushwoosh Application Code, which you acquired in Step 2.
e. Scroll down to Triggering options and choose All Pages.
f. Click "Save". Your Tag is ready!
Let users subscribe for push notifications with a push subscription button. To set up the button, simply add the following script via Google Tag Manager.
<div style="text-align:center;margin:90px 0;"><button style="color:#000000;background: none;font-size: 16px;cursor: pointer;font-weight: 700;padding:0 60px;line-height: 60px;border:3px solid #000000;" type="button" name="button" onclick="window.pushwooshLite.instance.showSubscriptionWindow()">Subscribe Now</button></div>
All done! Your website's visitors can now subscribe for and receive push messages.