Connect with our Team to Get Latest Information ... Subscribe Channel Join Whatsapp

Blogger Enable Realtime Post Views Counter

Plus UI v2.6 by Fineshop Design: Realtime Blog Post views using Firebase. Activate it now!

We'd like to inform you about the latest update from Fineshop Design: Plus UI v2.6. This version brings a bunch of new features when compared to Plus UI v2.5.1. Notably, it introduces the Realtime Views Counter, which allows you to monitor the live views of your Blog Posts using the Firebase Database.

If you're interested in activating this feature for your Blog, we've outlined some straightforward steps to help you begin:

Note that it will not work in older version of Plus UI. Make sure you have a latest template of Plus UI.

Video Tutorial Step by Step Guidence

Requirements

  • Firebase Account
  • Plus UI v2.6 Template

Enabling Views Count

Step 1: First of all we can create a project in Firebase.

Step 2: The second step is to Create a Database for your Project.

Step 3: Paste the following rules in the Database.

For Single Blog

{
  "rules": {
    ".read": true,
    "BlogID_0000000000000000000": {
      ".read": true,
      "$post_id": {
        ".write": "newData.exists() && (data.exists() ? newData.val() == data.val() + 1 : newData.val() == 1)",
        ".validate": "newData.isNumber() && newData.val() % 1 === 0.0 && newData.val() <= 99999999"
      }
    }
  }
}

For Multiple Blog

{
  "rules": {
    ".read": true,
    "BlogID_0000000000000000000": {
      ".read": true,
      "$post_id": {
        ".write": "newData.exists() && (data.exists() ? newData.val() == data.val() + 1 : newData.val() == 1)",
        ".validate": "newData.isNumber() && newData.val() % 1 === 0.0 && newData.val() <= 99999999"
      }
    },
    "BlogID_0000000000000000000": {
      ".read": true,
      "$post_id": {
        ".write": "newData.exists() && (data.exists() ? newData.val() == data.val() + 1 : newData.val() == 1)",
        ".validate": "newData.isNumber() && newData.val() % 1 === 0.0 && newData.val() <= 99999999"
      }
    },
    "BlogID_0000000000000000000": {
      ".read": true,
      "$post_id": {
        ".write": "newData.exists() && (data.exists() ? newData.val() == data.val() + 1 : newData.val() == 1)",
        ".validate": "newData.isNumber() && newData.val() % 1 === 0.0 && newData.val() <= 99999999"
      }
    }
  }
}

Don't forget to replace the marked parts with your Blogs' ID.

Step 4: Now Copy the Database URL.

Step 5: Go to Your Plus UI Theme HTML Editor.

Step 6: Find the following codes:

realViews: {
  databaseUrl: "",
  abbreviation: "false"
}

Step 7: Paste your Database URL, it will look like this:

realViews: {
  databaseUrl: "https://example-rtdb.firebaseio.com",
  abbreviation: "false"}

Step 8: Save Changes and refresh your Blogger post or Page.

About the Author

I'm Abdul Majeed Founder & CEO of Ai Tech 97. Expert Content Writing, Social Media Marketing, AI Tools Provider, and Blogger Expert. Have 2 Years of Experience in these fields.

إرسال تعليق

Cookie Consent
We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
Oops!
It seems there is something wrong with your internet connection. Please connect to the internet and start browsing again.
AdBlock Detected!
We have detected that you are using adblocking plugin in your browser.
The revenue we earn by the advertisements is used to manage this website, we request you to whitelist our website in your adblocking plugin.
Site is Blocked
Sorry! This site is not available in your country.