You can deploy the xtremepush SDK for web push notifications with Google Tag Manager.
This can be done for supported Browser types i.e. Safari, Chrome and Firefox. We describe how to deploy using tag manager below. First take care of any Browser prerequisites and configure the features you want to use for your project on the xtremepush platform (Google Analytics Integration, Inbox etc.).
Once you have configured your project you are ready to deploy/update the SDK initialisation code. Instructions on how to deploy will be found in Settings > SDK Integration section of your project. After you have saved all your settings, instructions on how to initialise the SDK will be found here. This will include the JS you need to add to your pages and any manifest, service worker, or html files you may need to add to your websites origin.
The SDK integration page will look different depending on how you have configured for different browsers two example are given below, review the full integration guide for more info on prerequisites and configs:
When you are ready you can deploy the Integration Code Java Script with google tag manager
Google Tag Manager
Go to google tag manager and select the container for your website: https://tagmanager.google.com.
In your container select new tag:
Create the tag to deploy xtremepush as follows:
- Scroll through tag list and select tag type Xtremepush
2. Copy your application key from you Project setting on xtremepush and paste it into field Xtremepush App Key
3. Using triggers Set tag to fire on all pages or the page of your choice
4. Create your tag
5. After creating the tag click the preview button on the top right of tag manager to put xtremepush live on your site in preview mode on the same browser.
6. Navigate to your url in the same browser and check SDK is deployed, the site is now asking for notification permissions etc..
Once you have tested and all is OK return to tag manager and submit and publish your changes to put them live.
Can I use a Custom Tag Instead?
- Use tag type Custom HTML tag
- Go to your project on xtremepush and Copy the Custom HTML from the Settings > SDK Integration section of your project:
- Return to tag manager and paste the Custom HTML into HTML field - should look like below:
- Add any additional code and finish integration as outlined above