How to run on demand scripts on server-side that could create a new file via Google Cloud Endpoints? - google-cloud-endpoints

I'd like to ask if it's possible to run scripts (bash, etc) that could read and create files, from Google Cloud Endpoints. Which Google products are appropriate? How to configure this? (Java)
(There are many google products, but the development documentations seem to be difficult to find. Even a google search could return too many different unrelated results.)
Thank you.

Related

Firebase Hosting - Analytics

I deployed an website using Firebase Hosting. could i Know the website traffic? I know that I can see the downloads of the website but I wanna see a number of people or something like that.
There are two main ways to do this:
Implement Google Analytics (or even Google Analytics for Firebase if you are building more of an interactive app).
Enable Cloud Logging which will cause a log entry to be generated for every request to Firebase Hosting, which you can then analyze using Cloud Monitoring, BigQuery, etc.
Based on your description (1) is probably the way to go as it's easy to implement and provides nice dashboards out-of-the-box.

Firebase Reporting Options

All my app's data is stored in Firebase. I'd like to build some reports with my data that aren't necessarily accessible through the web/app front-end. I don't see any good options for this in the Console. Has anyone found a good reporting solution for Firebase? I am looking for something like Crystal Reports or just an easy way to render Firebase data based on a query.
Thanks,
Rima.
I found a issue with the solution above. Firebase stores its data in JSON format, which cannot be consumed by solutions such as BigQuery, because it is expecting JSONL format and you get an error. It beats me why Google are not providing an elegant solution when integrating between two of their products, but I believe they have something planned.
Firebase does not have any "built-in" reporting tools other than the defined querying APIs.
If your database is small, you dump the JSON from the Firebase Console and then manually run analysis on it.
If your database is large, you can upgrade to the Flame or Blaze plans and sign up for daily private backups. This will create a JSON dump in the background without affecting your database performance and store it in the cloud. You could then use tools to grab that dump and perform advanced reporting on it.
1) Via BigQuery
Official Docs:
https://cloud.google.com/bigquery/docs/loading-data-cloud-firestore
Codelab Walkthrough:
https://codelabs.developers.google.com/codelabs/modern-data-pipeline-firestore-bigquery-dataflow-templates/index.html?index=..%2F..next17
Connect whatever BI tool you want to BigQuery. Google Data Studio is
free as is Metabase. Almost every Enterprise BI tool has a BigQuery
connector.
From https://www.reddit.com/r/Firebase/comments/arps42/reportingbi_tools_and_firestore/
2) Via "Custom Data Sources"
Cloud Firestore (and probably Realtime-Db) has a RESTFUL API. Many popular reporting tools support "custom", "restful", "ajax", and/or "HTTP" sources.
You should search your favorite reporting tools, and internet search accordingly.
I can see that Stimulsoft seems to support custom/RESTFUL sources. A PowerBI data connector seems to provide a lot of latitude - https://github.com/Microsoft/DataConnectors
Of course, this means that you need to create several data sources, and they probably won't be as optimised as a built-in source type. For example, the report engine probably won't know how to translate any front-end UI filters into custom-source query filters. Perhaps some platforms support the ability for you to create your own adaptors.

Is it possible to track search phrases in Google Play that lead to install?

I want to understand what people search in Google Play to find and install our app.
Is it possible to track search phrases/keywords in Google Play that lead to install?
Can google analytics do that?
No Google Analytics can't do that.
I'm not familiar with which reports Google Play makes available to app developers but I believe that's the only possible source of this kinds of data. So I'd check your Developers page for that.
Maybe 3rd parties have products that give you that kind of data but these would be guesses/estimates at best.

Is there anyway to grab Google Analytics via some kind of API?

Basically I have an admin CP I've coded for all my sites and I'd love to integrate the information gathered by Google Analytics on it to avoid having to look at both sites every morning.
BTW I'm using PHP, but I would assume if something like this exists it would just be exported as XML.
Nope.
Here's how to use Yahoo Pipes to scrape your Analytics page
Alternatively, you can export reports and use them
There's an official API in private beta. I'm looking forward to it!
http://analytics.blogspot.com/2008/10/more-enterprise-class-features-added-to.html
Nicolas Lierman has developed an AIR application that uses an API of his own creation to gather Google analytics data. He refuses to puplish the API though as apparently it exposes some severe security flaws in Analytics interface. Google themselves have never published an API for it.
If you really want to proceed with your plan, you'll have to reverse engineer the interface yourself.

Data from Google Analytics

So Google Analytics does not have an API that we can use to get our data, so is there an efficient way to programaticly fetch the data collected by Google, without logging it locally?
Edit:
I would prefer a Python or PHP solution but anything will work.
Google just announced that they're making available a data export API for Google Analytics. It sounds like that's exactly what you're looking for.
Per their announcement, the feature's currently in private beta, but I figure it'll be rolled out to all accounts in coming weeks/months. Depending on your needs, you may just want to wait, instead of building a short-term hackish solution.
If you're interested, I presume that the functionality's being rolled out first to members of the Google Analytics Trusted Tester program.
Also, I forgot about this: I never actually completely implemented this for a client because the deal fell through...
But you can customize the dashboard to include the sections of Google Analytics that your report might need and have a scheduled email. If the reports do not need to be too detailed and if Google already aggregates the data in the way you need it, then this might work for you.
The Google Analytics API is now open to everyone and looks like it contains the full data set
Well, it depends on what you want to do with the data. If you only want to process part of it, then I don't think it is difficult.
Here's a basic web search with a hit explanations from Google and someone else:
http://www.google.com/support/analytics/bin/answer.py?hl=en&answer=55561
http://blogoscoped.com/archive/2008-01-17-n73.html
There is a completely programmatic way to access the data using greqo(PHP), but the analytics class is in beta. Check it out here.
If beta is not acceptable, you can use a mixture of the XML and Yahoo Pipes to get what you need.
Basic Method
Obtain the tracking data in a usable
format – We can schedule Google
Analytics to email this as an XML file
on a regular basis.
Make the XML file accessible online –
By emailing an attachment to Google
Groups, the file is automatically
given a public URL.
Work out the URL of the most recent
report – Since Google Groups provides
RSS/Atom feeds for all messages, we
can easily find the URL of the most
recent message and therefore work out
the URL of the XML report.
Prepare the data for use – We need to
manipulate the XML and massage it into
a handy JSON format that we can use on
our blog, which can all be done using
Yahoo Pipes.
Taken from here.
I implemented a solution where we scheduled the analytics report to be emailed to a gmail account each day and I pulled the report on demand via POP3. It's pretty easy and works fast. I've heard Epic1 will do this for you as well. I'm researching that now.
If you're using Python, Pandas io is also very helpful. Pandas has an interface on top of the Google Analytics API. It's pretty simple to get up and running and integrates with Pandas so you get the aggregation, time series features, and other data analysis library features.
instructions on how to authenticate and shows examples: http://blog.yhathq.com/posts/pandas-google-analytics.html
more examples: http://quantabee.wordpress.com/2012/12/17/google-analytics-pandas/
I've also posted a few queries to get started
https://github.com/sk8asd123/ga_pandas
Its been a while since I had to deal with this, but Google Analytics has an XML output type, so you can parse that to get the data in your own system. However, I believe that there is no way to get the xml file programatically, so someone still has to go in and generate the file and feed it to your app.
Good question though, I'd love to see if there is a 100% automated solution.
We just released a product - Megalytic - that makes it very easy to create custom reports using data from the Google Analytics API. You can email these reports to others without sharing your Google Analytics account. Also, create links to reports, download as PDF, etc.

Resources