Wednesday, November 28, 2012

Do you have a website with multiple JavaScript files? Each one of these
files adds an HTTP request to your pages, effectively increasing the
load time. JMerge is a simple web application that fetches and combines
JavaScript files from a URL to reduce the number of HTTP requests. In essence, it does the work for you. All you do is type in a URL, pick the files you want to combine, and voila! Try it out for yourself:

Tuesday, November 27, 2012

Make the Web Faster

Fast and optimized pages lead to higher visitor engagement, retention, and conversions. The PageSpeed family of tools is designed to help you optimize the performance of your website. PageSpeed Insights products will help you identify performance best practices that can be applied to your site, and PageSpeed optimization tools can help you automate the process.

What is PageSpeed Insights?

PageSpeed Insights analyzes the content of a web page, then generates suggestions to make that page faster. Reducing page load times can reduce bounce rates and increase conversion rates.

PageSpeed Insights Browser Extensions

PageSpeed Insights is available as an open-source browser extension for Google Chrome and Firefox. Webmasters and web developers can use PageSpeed Insights to evaluate the performance of their web pages and to get suggestions on how to improve them.

PageSpeed Insights performs several tests on a site's web server configuration and front-end code. These tests are based on a set of best practices known to enhance web page performance. Webmasters who run PageSpeed Insights on their pages get a score for each page, as well as suggestions on how to improve its performance. By following the suggestions you can make your site faster, keep Internet users engaged with your site, reduce your bandwidth and hosting costs and improve the web!

PageSpeed Insights extensions periodically checks for updates. If an update is available, the browser will give you the option of downloading the newer version of PageSpeed Insights to get the latest updates to the rules and functionality that is added by the community.

Friday, November 23, 2012

I was searching for Google Analytics API in .Net to display the core reporting information in my website from Analytics. I found the ga-ez-dash library (Google Analytics Easy Dashboard Javascript Library)

What is ga-ez-dash library?

This library is designed to create an easy way to build a custom Google Analytics Dashboard on your own page. The library is built on top of the Google Analytics Core Reporting and Chart Tools APIs and does all the heavy lifting of handling authorization, issuing queries, and transforming the results into pretty visualizations
But, at this time, each user who views a dashboard must have access to the Google Analytics account from which the dashboard data is generated. Currently you can’t create a dashboard for users who do not have access to your Google Analytics data. Getting Started To get started you need to perform the following 3 steps:

Register for a developer key

Copy & Paste the code to a web page

Configure the chart

All applications that use the Google Analytics API must be registered through the Google APIs Console. When you register in the console, you will create a new project and configure the settings to work with this library. Once configured, the console will provide you with a few values that you need in the configuration step. Here's exactly what you need to do

Go to the GoogleAPIs Console

To create a new APIs project and manage the API usage, click on Create Project button

Select services for the project. (Services -> Analytics API)

Next you will need to configure this project to use OAuth 2.0 authentication. Just like you need to login to your Google Analytics account to view your data, you will need to authorize this dashboard application to view your data. Authorization is handled through the OAuth2.0 protocol.

Getting your Client ID and API Key

In the Google APIs Console, for the project you just created:

Navigate on the left panel to API Access

Click the big blueCreate An OAuth 2.0 Client ID button

Add a cool product name and logo, then click Next

Under

Application Type – select Web Application

Your site or hostname – add the domain name or host name from where this script will be served.

Click Create Client ID

Note: This dashboard library will only work if the script the page is on is hosted from a web server. The domain (hostname) of the web server must match the values in the JavaScript origins field. This library will not work if it is hosted from a file.
Once complete, your project should have values (Branding information, Client ID for web applications and Simple API Access) as follows

Once compete, time to copy and paste the code to a web page!.

Copy the library and save to your server

Copy and paste the following code into a new web page (In MVC, it's View)

Configuration

Once you've copied and pasted the code, you just need to configure the chart to work with your data.
Replace the API_KEY and CLIENT_ID values with the respective API Key and Client ID that you created in the Google APIs console during the first step.
Replace the TABLE_ID parameter with ga: +your profile ID. Finding your profile ID is easy. Just log into Google Analytics and navigate to the profile you want to use. After logging in, there will be a profile ID at the end of the URL in the address bar after the 'p'. This is your profile ID. Example: p'XXXX'.

Or you can find it in Google Analytics under Admin > Profile > Profile Settings

Use ga: + your profile ID to get your Table ID. So if your profile ID was 8325, your table id would be ga:8325.
Save the file. You're done!

Usage

Navigate your browser to the URL this script is hosted on. The script will:

Display a button asking for you to authorize

Click the button. You will be prompted to login and authorize access

Once complete, the script will retrieve visitors over the past 30 days, and display the data in a pretty line chart