Ticker

6/recent/ticker-posts

Header Ads Widget

Shared Hosting with Namecheap. Free .Website domain & WhoisGuard

[Solved] How to change title of inactive tab on Shopify store?

 It may be possible that your customer has more than 1 tabs open in their browser while they are shopping on your website.

Adding a notification style text on the tab will help you in many ways as mentioned below:

(1) Customer Re-engagement

(2) Abandoned Cart Reduction

(3) Improve Customer Experience

(4) Increase Conversion


Though there are various apps available on shopify app store but you can easily achieve this using a simple code. Though we recommend not doing it yourself, if you are not a expert.

Step 1: Go to Shopify Admin Dashboard and navigate to Online Store.

Step 2: Go to your theme and click on ... and select edit code.

Step 3: Search for the template theme.liquid and add the following code after the <head> tag in theme.liquid file.

<script>

  window.onload = function() {


  var pageTitle = document.title;

  var attentionMessage = 'Your pre-workout is here!';


  document.addEventListener('visibilitychange', function(e) {

    var isPageActive = !document.hidden;


    if(!isPageActive){

      document.title = attentionMessage;

    }else {

      document.title = pageTitle;

    }

  });

};

</script>


Script Credit: https://medium.com/@alperen.talaslioglu/changing-page-title-dynamically-when-user-changes-tab-5d372554377c


Post a Comment

0 Comments