Technical Notes, References and the sort
Back in June 2014 (this month, when writing this post) Google improved their Drive web hosting service, with some unintended side effects, that we suffered for about two days.
We learnt an important lesson: even a giant like Google can create some "unintended side effects", but when you are ridding his wave, you can trust in a prompt solution, we are not alone.
I have copied below all the notes and updates we publish at that time, just for any future reference.
Temporary Issue Note (as June 12, 2014) updated Jun.16 | Jun.17 | Jun.18 FIXED !!
- Google Drive is redirecting the Url, adding a prefix Id and removing the parameters in that web page call
- Your map page link is like https://googledrive.com/host/folderID/xsMapping.html?f=mySheet.Data.json
- But, it's converted into this, without the parameter at the end ?f=mySheet.Data.json
** that's the reason it's loading demo data instead of the user's data **
- we opened an issue ticket (see link below)
apologies for the inconvenience
* LATEST update Jun.18 @7:25pm EDT: FIXED, since two (2) hours ago, as reported by Google, working fine since then as confirmed by several users.
** Temporary workaround you can do on your map call, while Google is fixing this issue **
Original map Url: https://googledrive.com/host/folderID/xsMapping.html?f=mySheet.Data.json
Google Issue Url: https://prefixID.googledrive.com/host/folderID/xsMapping.html
Use this Url instead: https://prefixID.googledrive.com/host/folderID/xsMapping.html?f=mySheet.Data.json
(replace prefixID, folderID and mySheet with your own information)
and it should work
* update Jun.18 @9:05am EDT: Still waiting for a fix from Google. See a workaround explained above
* update Jun.17 @11:50am EDT: Google is working on fixing this issue >> this is Google latest comment #23
"Thank you all for the reports. After some investigation, it seems that some recent changes that were made to improve Drive web hosting had some unintended side effects that are the cause of these errors.
These are in the process of being addressed, and should be corrected soon."
* update Jun.17 @11:35am EDT: this issue is back and strong since yesterday
* update Jun.12 @7:20pm EDT: it looks like this issue has been fixed, at least it's working now from my side
Please, submit a feedback (form below) if you are still having any problem
* update Jun.12 @12:20pm EDT: this problem is only happening with the Chrome browser, it is working fine on Mozilla Firefox, IE and pending to check on Mac Safari
To Track Or Not To Track?
Tracking visitors in your Web site is great for statistics but I would say, do it always Anonymously, in other words, do not collect neither track personal behavior, it's not polite nor completely legal. Particularly if you do it using GA (Google Analytics, see TOS #7 Privacy).
Now, let's deal with the technicalities around monitoring user's visitors within your domain site using Google Apps Script, step by step simplified:
I believe, that's it
Share your comments and question with g+1 below, I will thank you for that ;)
When writing an App using Google Apps Script (that's GAS;) I had to provide some documents list within a folder with filtering functionality. So when the user enter a search string the App would list all documents within the App folder that matched that criteria, being within title or the actual content.
What I have learnt so far?
1. Google doesn't search within the actual documents but in their indexes, what makes a lot of sense Google-wise, however you have to be prepare for some delay for recent documents to appear on that search (minutes, hours, maybe more?). In the mean time you better remember what was about your latest documents.
2. Google will search within the revisions history of your documents, so it will show documents that match your search even if they are not currently containing that string criteria but they had in the past, what is good, very good.
3. My first "naive" approach to search was using always the function find like this line of code below
However, I ended finding out that searching for an empty string will take a lot of time (many seconds I mean)
I had to change the approach using getFiles function for empty string instead, like below few more code lines
4. When doing as above I found out (at least in my case) that find function will return documents sorted by "last modified date, reverse" while getFiles function would sorted by "document name, normal". Just to get more consistency and having all sorted by "last modified date, reverse", as it was the requirement to show the more recent changes first, I introduced an intermediate array to sort as below
In this case we get the documents list sorted by getLastUpdated reverse and the first two elements of this array are ready to be added as items in a list box.
ps. I would update this post if anything else important comes to my attention on this subject.
When working on Google Apps Engine you have a choice of Databases
Although "the best tool is the one you master" having regular skills in both approaches would give you plenty of choice when starting a new project.
Here is a video presentation from Google IO 2012 on the subject that shows some confrontation towards reconciliation at the end. The presentation goes over a few topics on both databases like Queries, Transactions, Consistency, Scalability, Management and Schema.
In my view
Other than that we should look at cost while running an App using either one
ps. more choices as usual > look for Google Cloud Storage and ScriptDb JSON Database.
Quick reference to
- standard signature
go Gmail settings > general: signature and you would find there a simple HTML editor to create your standard / default signature, to be included on each of your email, so keep it simple not to bother your audience to much
- trying some html and image
- getting fancy with canned responses
While using Gmail for your domain within Google Apps for Business, you can improve the functionality with a few extras included in Labs. Some of them would be just "crazy experimental stuff", however the some would be default features at some point.
Go Settings > Labs and enable the following features for better experience:
There are many others for you to try, we have settled for these few extras.
1-6 of 6