Which Google Analytics Api client library-node or javascript to use for my website? - google-analytics-api

I am making a website which displays report generated using google analytics data.My frontend is in React JS and backend in Node js and I have used the create-react-app boilerplate for React.I am really confused as to which client library -Node or Javascript to use for my website.Please could someone help me out..I am really confused.

Google Analytics has 2 API's for getting reporting data: the core api v3 and the reporting api v4. For new projects I would suggest using the latest reporting api v4.
To use any of these api's I would use Google's officially supported Node.js client library: google-api-nodejs-client
I also wrote a complete guide on how to work with Node.js and the Google Analytics Reporting API. This will definitely help you get started.

Related

Can i use my hosted WEB API (created in ASP.NET) in Mulesoft API manger?

I am trying to learn mulesoft AnyPoint Platform, and trying to host an API using API Manager.
I already have an API created in asp.net, can i use it in API manager, or i need to create new API.
Please help
Yes its possible if you are using Cloud based API Manager where below are the steps -
Click on the "Add New API" button.
Enter the API name of Mythical
Mobile Experience API (Replace Mythical with your preferred company
name)
Enter Version name of 1.0 Leave the the API Endpoint blank for
now.
Enter a description.
You should see the API administration page for your newly created API. From this page, you can Define API in API designer using RAML, publish an API portal, and Configure endpoint for the API.
Note, If you are using on-prem API Gateway then you need to develop a proxy Mule application which then need to be deployed using auto discovery component so that it will register under api manager then You should see the API administration page for your newly created API. From this page, you can Define API in API designer using RAML, publish an API portal, and Configure endpoint for the API.
Yes you can use the API Manager for hosting the API.
Yes you can use the API created.

Using REST api to build a web app

What happens when we do not use REST api to build a web application? And also please tell how to build a web service using REST api in PHP.
What happens when we do not use REST api to build a web application?
Nothing, you can do your project with or without REST API. Assume you are running a restaurant and you want to attach with online food service like Foodpanda,zomato you need to provide an API to interact your data without any user interface which can be done easily using REST.
Why do we need RESTful web services?
REST should be used if it is very important for you to minimize the coupling between client and server components in a distributed application. [read more]
How to build a web service using REST api in PHP?
There are many resources available in internet. Here I found something related to PHP
PHP RESTful Web Service

Google Analytics Embed API with Server Side Authorization - Firebase Hosting

I completed the basic setup for Google Analytics and inserted the tracking code into my webpage(s). I can log in to analytics.google.com and see historical data just fine.
I have an admin page on my website where I want to display Google Analytics information to several users automatically (no additional logon req'd) and read that this is possible using the Embed API with Server-side Authorization.
I followed the instructions and created a Service Account that shows up under Service account keys in my Google API Manager portal. I also successfully ran 'sudo pip install --upgrade google-api-python-client' on my Cloud9 IDE and pushed the change to my hosting provider, Firebase, i.e. 'firebase deploy'. Lastly, I located and pasted my Analytics View ID in to the code sample provided with the Demo/Setup. My page is served with <!DOCTYPE html> declared.
I can't get it to work. Browser console says:
Uncaught TypeError: window.google.load is not a function
I am thinking that I am not invoking the get_access_token() in that Python module. In other words, I am thinking that server-side scripting is not supported with Firebase hosting.
Anyone know if and how to get Google Analytics Embed API with Server Side Authorization running with Firebase hosting?
This is not exactly a direct answer to your question, but rather an alternative solution to this problem. At least I’m using approach.
You can use Google Design Studio to build and embed amazing analytics and BI dashboards anywhere you like (also on your Admin website). But even easier would be to use Google’s authentication (via gmail) to provide access to select dashboards directly, as Google’s authentication and authorisation is likely more secure that your website’s.

Azure media server rest example

I am trying to find a sample project which utilizes rest / json to upload videos and manage them to azure media service.
I am not able to use the .net wrapper which is available via nuget.
You can look into some code snippets for utilizing REST/JSON to upload videos:https://msdn.microsoft.com/en-us/library/azure/jj129593.aspx. You can check out most of REST APIs documentations here: https://msdn.microsoft.com/en-us/library/azure/hh973629.aspx.

node.js RESTful API with amazon like auth

I'm looking to build a RESTful API in node.js and want to authenticate users with an API key and API secret musch like the service in Amazon Web Services (AWS).
The question is where to start, googling has lead me to a lot of irrelevant sites and I wondered if anyone had some good site suggestions of sample or skeleton code?
Thanks Ric
Here is an oAuth2 provider module. oAuth is quickly becoming the standard for API's.
https://github.com/AF83/oauth2_server_node