How to do Dynamic Segmentation in PushEngage With Google Tag Manager
Example – If the URL contains turmeric, then add to segment Turmeric like this –
Here is our step by step GTM guide to fire PushEngage tags/API
Example: If the URL contains Features and is a page which is in a subdirectory below features, we will add the segment Features to the web push subscriber.
- Create a New Trigger -> Features URL Trigger in GTM
- Configure the Page URL pattern using RegEx, or any other mechanism.
- On this Trigger fire a Custom Tag, which has Push Engage code.
Note, please ensure we are firing the correct version of PushEngage JS API. If you have added PushEngage using Legacy code, then use Legacy API. If you have added Push Engage using the Asynchronous code, then use that API.
For Async code, the call to add to segment is window._peq.push([‘add-to-segment’,’segmentName’]);
See how to add this code in GTM
That’s all. Now all you’re your subscribers will be segmented based on their browsing patterns. You can then send a relevant notification based on their geolocation, device-browser used during subscription or the date range.
Once you have segmented your push subscribers, you can even start the different trigger push notification campaigns for different segments.
- How to Unsubscribe from Push Notifications in Chrome and Firefox
- How to Configure a Firebase Cloud Messaging Key & Why You Should Use FCM API Key
- Guide to Implementing Web Push Notifications, Without a Vendor Lock-in
- Drip Campaigns and Autoresponders For Web Push Notifications
- 7 Ways To Increase Your Web Push Subscription Rate In 2019
- How to Install PushEngage Browser Push Notification on Blogger Site?