Plus-ui Blogger Templete Realtime Post Views Counter Setup Process
We show you How to setup Realtime Post Views Counter in Plus-ui Blogger Templete. Very easy to setup just do it as we shown.
Go To Google Firebase Account
https://console.firebase.google.com
Sign in and Get started with a Firebase project
Write a project name and press continue
Now create Realtime Database
Just do it following way -
Now click on Rule Tab -
Now clear sample rule and add new rule -
{
"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"
}
}
}
}
Most important ! Now Go to your blogger Dashboard and copy Blog ID and paste -
Same as it -
{Go back to Realtime Database and paste rule -
"rules": {
".read": true,
"BlogID_7429042044152309765": {
".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"
}
}
}
}
Almost Done ! Now click on Publish Button - Back to Data Tab and copy url -
Last Step - Go To Blogger Dashboard > Theme > Edit HTML > Press Ctrl+F > Find realViews
Now paste to databaseUrl
realViews: {
databaseUrl: "https://plus-ui-556e1-default-rtdb.firebaseio.com",
abbreviation: "true"
}
Save it and Enjoy !