Search through more than a hundred articles on every aspect of User.com

Dawid Tyburek
Written by Dawid Tyburek

Boost Engagement with Flashing Tab Notifications

Capture user attention by using dynamic flashing tab notifications to highlight new messages, updates, or urgent information.


Flashing Tab Notifications are an innovative technique in web design that targets users who have navigated away from your tab but still have it open. By dynamically changing the browser tab title, you can effectively draw users' attention back to your site, ensuring they stay informed and engaged.

Prerequisites


  • URL for the original Favicon

  • URL for the new Favicon

  • Text content for a message

How it works


  1. User enters the website

  2. User.com sends the code to the browser

  3. Browser starts monitoring for a tab becoming inactive

  4. When tab becomes inactive, it starts flashing predefined message

  5. When a User comes back, tab stops flashing

How to build it


  1. Create an automation

  2. Configure given code

  3. Test and deploy

Create an automation

Let's start with an Automation. It starts with a Page Visit trigger, followed by a Send Code module. You can also put a Filter before a Send Code, to make sure the process works only for a selected Segment.

  1. Go to Automations -> Create new

  2. Select Page Visit from the panel on the right and place it on canvas

  3. Choose Filter module.

  4. Configure module according to your business needs.

  5. Select Send Code from the panel, use search on the top to make it more convenient

  6. Paste the code and provide configuration data

  7. Connect Page Visit with Send Code

  8. Save the automation choosing Each time condition is met timing and turn in on

Configure code

  1. In src="{{global.code_pixel}}" insert URL to a blank pixel that will be loaded on your website. You can read more about it here.

  2. In const flashTitle = 'Comeback, get rewarded!'; define your phrase to get the attention back.

  3. In const originalFavicon = 'https://example.com/uploads/favicon.png'; insert URL to your original favicon file.

  4. In const flashFavicon = 'https://example.com/uploads/fav_new.png'; insert URL to your flash favicon file.

  5. In const intervalDuration = 1000; you can modify flash interval, default is 1 second.


<img src="{{global.code_pixel}}" onload="(function() {
const originalTitle = document.title;
const flashTitle = 'Comeback, get rewarded!';
const originalFavicon = 'https://example.com/uploads/favicon.png';
const flashFavicon = 'https://example.com/uploads/fav_new.png';
const intervalDuration = 1000;
let interval = null;
let isOriginal = true;
function changeFaviconAndTitle(src, title) {
document.title = title;    
let link = document.querySelector('link[rel*=icon]') || document.createElement('link');  
link.type = 'image/x-icon';  
link.rel = 'shortcut icon';  
link.href = src;  
document.head.appendChild(link);
}  
document.addEventListener('visibilitychange', function() {      
if (document.hidden) { 
userengage('event.Flashing tab popup');             
interval = setInterval(() => {             
changeFaviconAndTitle(isOriginal ? flashFavicon : originalFavicon, isOriginal ? flashTitle : originalTitle);  isOriginal = !isOriginal;          
}, intervalDuration); 
} else {          
clearInterval(interval);          
changeFaviconAndTitle(originalFavicon, originalTitle);      
}  
});})();"/>

Make sure to switch On Append to HTML option and save the module.

Use Case



You will build a process that recognizes when User leaves a tab, displays flashing tab notification and sends an event to User.com. You can use this event as a trigger for different actions. In this Use Case automation will show a thank you Pop Up with a discount code.

First, start with building a flashing tab notification notification as explained above.

When the process is ready, configure an Event Trigger module to react on the event with a chosen name.

Configure Show a Pop-Up module to make use of a chosen creation. You can use predefine Pop Up, build one yourself or outsource build process to our CS Tech Team.
Make sure to configure this module, using the same URL rule as the trigger. This will enhance User experience and make your onsite marketing more targeted.

From now on, when a User comes back to the website after flashing tab notification was show, they will be greeted with a thank you message.


It is advised to create a separate automation for showing a Pop Up and save it with timing Max once per day. This way you make sure to show a Pop Up in a non intrusive way.

Elements used in this use case

Categories: