Notification texts go here Contact Us Buy Now!
المشاركات

How to enable real time post view counter in blogger(plus ui)

 Welcome back to another tutorial, have you informed about the realtime post view counter functionality that is recently added to the plus ui theme of the blogger website. No? Then I will want to tell you that plus ui added this feature that will help a lot to get post views.

Without wasting more time let's roll into the tutorial:)

Steps for adding post counter viewers in blogger ;

Step 1:  Create a new firebase account.

Step 2 :First create your database for your project.

Step 3 :Paste the following codes.

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 blogs

{

  "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"

      }

    }

  }

}
And copying the url of database go to theme section of your blogger website.

Then find for the below codes.

realViews: {

  databaseUrl: "",

  abbreviation: "false"

}
And then paste the database url into it.

Moreover if you want to display data in 3.2K instead of 3200 then change the abbreviation to true 

realViews: {

  databaseUrl: "",

  abbreviation: "true"

}
Contact us:
If you still face problem in showing views to the users then don't hesitate to contact us We are available anytime.

إرسال تعليق

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.