How to connect WebPush for WooCommerce stores?

Modified on Tue, 14 Feb, 2023 at 7:38 PM

Overview

Target your website visitors, even the anonymous ones, with personalised notifications on their device & drive more sales with our web push notification campaigns



Other features:

  1. Immediate delivery: Delivered almost instantly to users' devices, ensuring that they receive the message as soon as it is sent.
  2. High engagement: Web push notifications have a high open and click-through rate, making them a valuable tool for engaging users and increasing conversions.
  3. Customisation: Notifications can include personalised text, images, and buttons to make them more engaging and effective.
  4. Cross-platform compatibility: Web push notifications can be sent to users on most devices, regardless of their OS or browser
  5. Interested audience: Web push notifications require users to opt-in to receive them, ensuring that they are only sent to interested and engaged users.
  6. Cost-effective: Web push notifications are a cost-effective way to communicate with users, as they do not require any additional infrastructure or resources to set up and use.




Steps to connect webpush for WooCommerce stores:

  1. Install Filester - WordPress File Manager Pro plugin in Wordpress.

  2. Create a new folder in html directory and name it bik , inside that, create a new file with name firebase-messaging-sw.js .

  3. Copy all code present here, and paste it inside the file created above.

  4. Repeat steps 2 and 3 in html/wp-content directory.

  5. You can check if you have done steps 2 to 4 correctly by going to https://{storeDomain}/bik/firebase-messaging-sw.js. It should show a code just like how it shows for https://wp-shop.bikayi.com/bik/firebase-messaging-sw.js.

  6. Navigate and open html/wp-content/themes/{currentUsed theme}/functions.php file using any editor. You should see like this when you navigate to the correct location:

  7. Add the following code chunk at the bottom of the file:

    1. function ti_custom_javascript() {
      ?>
      <script type="text/javascript" async src="[<https://bikapi.bikayi.app/campaign/webPushApiFunctions-fetchScript?source=woocommerce>](<https://api.staging.bik.ai/campaign/webPushApiFunctions-fetchScript?source=woocommerce>)"></script>
      </script>
      <?php
      }
      add_action('wp_head', 'ti_custom_javascript);

  8. Click Save & Close.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article