Udah gak usah dijelasin lagi kali kayanya ya, noh tuh kan contonya (kalo masih) ada dipojok kiri bawah.
Dulu di Blog yang lama juga udah pernah dishare scriptnya kalo gak salah, tapi emang yang itu
DataBase untuk penyimpanan data pengunjung-nyamasih pake Feed dari Facebook Page, nah kalo yang sekarang udah dipindah pake ScriptDB-nya Google Script. |
Sebenernya kalo dibilang beda
juga gak jauh-jauh amat kayanya, antara nyimpen sama ngambil datanya juga tetep pake API, cuman emang kalo ScriptDB-nya Google Script gak butuh Access_token, tapi kalo soal privacy data sih tetep aja public open; semua orang bisa access read/write.
ganjelandari Blog Notif yang sekarang ini:
- Apakah ada/Berapa
limit penyimpanan
dari ScriptDB ini. - Masih suka kepentok masalah
Limit Eksekusi Script
, jadi kalo pengunjung blognya rame, butuh lebih dari satu ScriptDB. - Belum ketemu gimana caranya biar
write access
ke-ScriptDB hanya bisa dari satu subdomain saja.
ScriptDb
Saving Data
function saveToDB(){ var db=ScriptDb.getMyDb(); var whatToSave={ visitor:{ id:"4", name:"Zuck", page_title:"AingCreations", page_uri:"http://aingcreations-reborn.blogspot.com/", action:"viewed", browser:"Firefox 10", time:"2013-05-20T17:11:45+0000" } }; db.save(whatToSave); }
Collecting Data
function collectDB(){ var visitors=[]; var count=0; var limiting=5; var db=ScriptDb.getMyDb(); var whatToCollect={visitor:db.anyValue()}; var searchOnDB=db.query(whatToCollect); while(searchOnDB.hasNext()){ var fromDB=searchOnDB.next(); visitors.push(fromDB.visitor); count++; if(count==limiting){break} } var Lol="\nFound: "+visitors.length+" Visitors\n"+JSON.stringify(visitors,null," "); Logger.log(Lol); }
Modifying Data
function modifDB(){ var db=ScriptDb.getMyDb(); var whatToModify={visitor:{id:"4"}}; var modifPart={ partName:"time", partVal:"2013-06-10T00:00:00+0000" } var searchOnDB=db.query(whatToModify); while(searchOnDB.hasNext()){ var whatToSave=searchOnDB.next(); whatToSave.visitor[modifPart.partName]=modifPart.partVal; db.save(whatToSave); } }
Deleting Data
function dellDB(){ var db=ScriptDb.getMyDb(); var whatToDell={visitor:{id:"4"}}; var searchOnDB=db.query(whatToDell); while(searchOnDB.hasNext()){ db.remove(searchOnDB.next()); } }
ContentService
published as a web app, the special callback functions
doGet()
and doPost()
are invoked whenever a request is made to the script's URL. The ContentService can be used to return raw textual content. This allows you to write scripts that act as services, responding to GET and POST requests and serving data of various
mime-types.
Codes at Google Script
Publishing as a Web App
Testing
- No Parameters
- https://script.google.com/macros/s/ ... /exec
- Wrong Parameters
- https://script.google.com/macros/s/ ... /exec?naonnya=euy
- Missed Parameters
- https://script.google.com/macros/s/ ... /exec?simpan=euy&id=4
- Collecting Data
- https://script.google.com/macros/s/ ... /exec?ambil=euy
Getting visitor facebook ID
The important thing about this Blog Notif
is visitor facebook ID. We can get this ID by connecting our blog to facebook or better known as Facebook Connect.
I'm not writing yet
about this, but you may still learn it from http://developers.facebook.com/ or you may analyze this blog source script if you want :)
By knowing our visitor facebook ID, then we can fetch more information about our visitor from facebook, such as their profile photo, locale language, gender etc.
61 comments:
pertamax :p :D
nah gue banget ini yang gue maling gak ketemu2 ..takzz kang irland
paling cetar membahana badai halilintar dah
This comment has been removed by the author.
itu maksuntya scripnya ditaruh di html attau mana kang
teu jalan wae ahh
kumaha scripnya mana
kang kalo yang di JS blog aing yang di ubah apanya ?
yang ini kan ?
dbUrls:[
"https://script.google.com/macros/s/AKfycbyuvCQpx3JqKFttIiWpuYV_K8Ey_FIYdRPz0_pen5MO5ZDCUaI/exec",
"https://script.google.com/macros/s/AKfycbwjzwgEZlabUXwOHrvqVNpji9I8Vv-8DROrCH4F_X78rgSBmJ-P/exec",
"https://script.google.com/macros/s/AKfycbztxXzd_dPj5vldzuQbHb9VJCILAtAKAaK1FVupRuNzpo97o1U/exec",
"https://script.google.com/macros/s/AKfycby3Xnf-LYF-UbS_8N3tb5FMzc5lpuzYNI3wKDrg6C6kDeMlMZU/exec"
],
dbUrl:"https://script.google.com/macros/s/AKfycbyuvCQpx3JqKFttIiWpuYV_K8Ey_FIYdRPz0_pen5MO5ZDCUaI/exec"
terus ngambil https://script.google.com/macros/s/AKfycbyuvCQpx3JqKFttIiWpuYV_K8Ey_FIYdRPz0_pen5MO5ZDCUaI/exec
linknya itu biar bisa saving data gimana ?
bingung ??
kang ningan teu jalan wae T.T
dbUrl na tos di ganti.
tapi teu muncul wae
Biar lebih ngerti soal cara kerja script ini, Download file BlogNotifTester.htm ini, open/drag and drop into browser new tab, use browser console to monitor the script flow.
~ Have a good day :)
Jadi pgn nge-Blog lagi.. thanks 4share kang Irland.. :P
masih belum paham :-D
scriptnya beda sama yang punya akang di pojok jadi pantes kalau di simpen di JS aing-creations dbUrl nya. gabakan jalan (kata ane)
tappi kalau di simpen di postingan kayak di atas jalan :-D
Pusing
gk ngerti banget..
DbURl udh di ubah, terus yang "https://script.google.com/macros/s/AKfycbwjzwgEZlabUXwOHrvqVNpji9I8Vv-8DROrCH4F_X78rgSBmJ-P/exec",
"https://script.google.com/macros/s/AKfycbztxXzd_dPj5vldzuQbHb9VJCILAtAKAaK1FVupRuNzpo97o1U/exec",
"https://script.google.com/macros/s/AKfycby3Xnf-LYF-UbS_8N3tb5FMzc5lpuzYNI3wKDrg6C6kDeMlMZU/exec"
^^^
itu buat apa ?? fungsinya buat apa ??
??????
Bingung
CFx buat serep apan di atas udah di jelasin kalau pengunjungnya rame harus lebih dari satu script (mungkin)
hehe.
terus kumaha atuh teu jalan wae :/
ohh buat serep toohh,, kirain tapi kalo di klik kok beda hasilnya ??
:/ :/ :/
yang 1 {"count":0,"data":[]}
yang 1 {"count":1,"data":[{"id":"100005026206828","page_uri":"http://aingcreations-reborn.blogspot.com/2013/06/bikin-notif-pengunjung-ala-facebook_12.html","time":"2013-06-15T22:58:15+0700","action":"viewed","brwsr":"Chrome 27","page_title":"Bikin Notif Pengunjung ala Facebook diBlog (versi Google Script) | AingCreations"}]}
????
kan kata ane juga script yang di share di postingan ini beda sama yang di pake di pojok
ohh Beda tohh :/
Iya.
coba aja copas postingan ini pake page source terus ganti dbUrl nya pasti jalan.
tapi kalau di simpen di JS aing-creations ga jalan
tes ahh :)
http://wis4nto.blogspot.com/2013/06/blog-notification-terbaru.html
tuh w juga jalan
invite kang ke blognya, saya ilham :) :)
coba aja download dulu file htm yg buat ngetes di atas tuh
terus ganti dbUrls nya pake punya sendiri
terus masukin manual visitornya lewat form yang di pojok kanan bawah
terus liat jalan gak
liat di source file tadi ada function aing.posIpeun
liat variablenya kan pada beda sama source code js aing emang disengaja kale :P
var j={simpan:"euy",id:aing.idUserYgLogin,brwsr:aing.userBrowser,page:aing.dataNotip.pgUrl,title:i,type:aing.posipeuntype}
Udah jalan kalau lewat htm
oke lah di coba kang febrie :-D
Au ah pusiing :-D
Gimana ilham notif ini udah jalan belum ?
Teu ngarti kang
wkwkwkk... CuMuNGuuuuttt kaKa².. XD
share atuh kang :'(
gimana nih kang ? :v
masih bingung aku :3
thisUri:"https://script.google.com/macros/s/AKfycbxIp8fOrlFt9576_d3V1jTpVb9wkLUpKlAu8tpxWeEomVIO69L8/exec",
ini diganti? dengan yang di 'deploy' barusan? :/
belum jalan juga kang :/ :/
hadehh pusing,, mungkin karna gk ada visitornya yaa
di test jalan di pasng og gak jalan dapuqqq
Monday, June 24 2013
Title Bar "Connecting.."
Status Bar "Waiting for script.google.com.."
Apakah fitur ContentServise Google Script akan Deprecated seperti pasilitas upload google code?
nya,,, ceuk aing oge ulah di Share :P jadi weh di paehan :D
hahah karunya teuing
kang baheula mah saencan log.in teh aya foto budak ngelel :P ayeunamah teu aya.
Terus log.in with facebook na teu jalan deuih didieu mah :/
ada videonya ngga ?
kang Irland nya lagi ngorok, jgn di ganggu :v
Kang Irland tambah pro nih :3 #culam :v
heem.. low ada video nya pasti lebih greget nih..
manual kyk gni kyk nya buntu.. mana yg mesti di edit..
ngapain pake video ? ini kan udah dijelasin secara detil =))
kalo yg didemo kan ngeLoad nya aing.bikinNotip
low db aing, notif nya low di load di blog.. weh lancar kyk jalan tol notif nya.. nah pas di ganti pke db sendiri cm ganti url db nya dowang.. eh malah diem seribu bhasa neh notif.. :/
yach.. kembali ke asal aja dah.. pke page
masih penasaran uey,,anu ini mah
masamasukinnya manual tapi kalau di pasng yang masuk cuma orang2 yang di test tadi doang haaha
otak atik trus ampe jeboll
nah kalau copas yang di postingan ini bisa jalan di selipin di postingan,,tp masa sih setiap pposting harus di kasihh notip masing2 kwkwkwkwkwkw
}
a={count:visitors.length,data:visitors};
}else{
a={error:"https://script.google.com/macros/s/AKfycbyQIGjF6qu7w2n9DKlyLxylRMaaxS0ad341SKConY1GB96k424r/exec?simpan=euy&id=4&brwsr=Firefox 10&page=http://zona-devil.blogspot.com/&title=ZonaDevil&type=viewed"};
}
}else{
a={error:"https://script.google.com/macros/s/AKfycbyQIGjF6qu7w2n9DKlyLxylRMaaxS0ad341SKConY1GB96k424r/exec?ambil=euy"};
}
}else{
a={error:"https://script.google.com/macros/s/AKfycbyQIGjF6qu7w2n9DKlyLxylRMaaxS0ad341SKConY1GB96k424r/exec?simpan=euy&uyeh=wkwk"};
}
apa udah bener ini kang
Nyimmaakk.. kwakwkwk
Salam kang irland.. :*
senggol kang anaz :* :v
Kang upami tos kieu kumaha ?
http://wis4nto.blogspot.com/
wah.. etamah mantap kang uwi
dripd ane gatot trs.. ckckk
masih penasaran nih!!
masak ane bisa nya cuman copy paste :D
acak" trs akh
Inget Kata kata ini aja deh
Hanya parameter Ambil dan Simpan yang dapat di terima :D
kyk gni bukan kang..
}else{
a={error:"https://script.google.com/macros/s/AKfycbwq0XErmOCkhGL4dMruHAaWAwwjudKnl5Sq3HUco9vJOHVYECs/exec?simpan=euy&id=100002688678274&brwsr=Firefox 20&page=http://dark--ims.blogspot.com/&title=dark ims&type=viewed"};
}
}else{
a={error:"https://script.google.com/macros/s/AKfycbwq0XErmOCkhGL4dMruHAaWAwwjudKnl5Sq3HUco9vJOHVYECs/exec?simpan=euy&id=4"};
}
}else{
a={error:"https://script.google.com/macros/s/AKfycbwq0XErmOCkhGL4dMruHAaWAwwjudKnl5Sq3HUco9vJOHVYECs/exec?ambil=euy"};
}
tp low di jalankan Dotget nya malah kyk gni hasil nya
(TypeError: Tak dapat membaca properti "parameter" dari undefined.)
Kang irland maksimal limiting di DB nya berapa ?
Kok eror parameter nih??
pass udah running Doget
if(e.parameter){
eror
mantab master irland :D
TypeError: Tak dapat membaca properti "parameter" dari undefined. (baris 10, file "Kode")
eror : if(e.parameter){
gimana si binggung
Who can access to the app nya kali?
(gambarnya gak jelas lagi ngapain?)
Teu Jadi Jadi Dah Urang Nyiem DB Teh T^T
Lier... Aya Vidiona Teu?
Gan masi belom paham ,
cara masang Notif Pengunjung ala Facebook diBlog
teu ngarti ngarti urang ahk , lieur error wae pas di run teh
Kang, Cara bikin notif nya gimana. ko notif nya masih ga jalan. apa app fb nya harus di setting ke publik dulu ya kang
mohon bantuan nya kang, ini blog sy http://irfan-newbie.blogspot.com
makasih kang
Thanks for sharing, nice post!
Máy đưa võng hay võng tự đưa là một món quà vô cùng ý nghĩa cho bé yêu của bạn, võng đưa em bé giúp cho các bé có giấc ngủ ngon hơn mà võng đưa tự động không tốn sức ru võng của bố mẹ. Võng tự động hay mua may dua vong chắc chắn, gọn gàng, dễ tháo xếp, dễ di chuyển và may dua vong dễ dàng bảo quản. Những lợi ích mà máy đưa võng mang lại là vô cùng thiết thực.
Chia sẻ 4 mẹo tăng cường trí nhớ cho dân văn phòng cực hiệu quả hay bí quyết trị sẹo thâm bằng rau má, chia sẻ kinh nghiệm bé ăn gì để thông minh hơn hay thực phẩm giúp trẻ thông minh hơn, mẹo hay giúp trẻ thích ăn rau hay cách giúp trẻ hạ sốt nhanh hiệu quả hay làm cách nào để trẻ hạ sốt nhanh các mẹ cần biết, bệnh viêm khớp không nên ăn gì, một số mẹo giúp giảm độ cận thị cho bạn, bí quyết chống nắng với cà chua cực hiệu quả hay những thực phẩm giúp tóc mọc nhanh hiệu quả, cách giúp bé ngủ ngon giấc và thực phẩm giúp bé ngủ ngon mẹ nên biết, chia sẻ cách làm trắng da toàn thân bằng thực phẩm, những món ăn chữa bệnh mất ngủ giúp ngủ ngon, mách mẹ mẹo giúp bé không sốt khi mọc răng hay làm sao để trẻ không bị sốt khi mọc răng
Những thực phẩm giúp đẹp da tại http://nhungthucphamgiupda.blogspot.com/
Thực phẩm giúp bạn trẻ đẹp tại http://thucphamgiuptre.blogspot.com/
Thực phẩm làm tăng tại http://thucphamlamtang.blogspot.com/
Những thực phẩm giúp làm giảm tại http://thucphamlamgiam.blogspot.com/
Những thực phẩm tốt cho tại http://thucphamtotcho.blogspot.com/
I really like the pics of your article. All the outfits are nice but my favourite is the first one. The top and the harness look so good together. picbear
Post a Comment