A blend of programming and seo

Category — google

How to get listed in google products

What is google products?

Many people don’t know that google has a search engine designed for products called google products. This service can be used to get more traffic to products on your website.

gproduct logo How to get listed in google products

The first step is to signup with google base. Next, You can start adding your products.

There are a few ways to doing this:


1) one at a time

gproduct one How to get listed in google products

This is the easiest way to add a product. Google provides a step-by-step interface for adding individual products. This works well if you only have a couple of products.

2) Data feed

This format makes it easier to update large amounts of products at one time. Your feed file can be in a variety of different formats: text, XML, or shopping.com/shopzilla feeds.

Here is an example feed (all of these fields are required):

<feed>
<g:condition>refurbished</g:condition>
<g:description>test description</g:description>
<g:id>01</g:id>
<g:link>http://www.mysite.com/product1</g:link>
<g:price>10.00</g:price>
<g:title>my new product</g:title>
</feed>

More information about this can be found here.

After your feed is setup, you can schedule when you want google to retrieve it (daily,monthly, or weekly) by clicking “create” under the schedule column. You just need to specify a link to the xml file (on your webserver).

gproduct schedule How to get listed in google products

3) google base data api

This is an XML based api that allows you to add, update, edit, and remove product information from your feed. More information about this can be found here.

July 2, 2009   No Comments

Free php library for the google analytics API

Here is a list of other services that google supports using this same protocol:

Application Service name
Calendar Data API cl
Google Base Data API gbase
Blogger Data API blogger
Contacts Data API cp
Documents List Data API writely
Picasa Web Albums Data API lh2
Google Apps Provisioning API apps
Spreadsheets Data API wise
YouTube Data API youtube
Google analytics analytics

Login

Google uses something called the oauth protocol. It’s more secure than basic authentication because it encrypts your datastream. (Twitter currently uses basic authentication for API access, but will also support oath at some point in the future).

From the oath website:

“The Initiative for Open Authentication (OATH) is a collaborative effort of IT industry leaders aimed at providing a reference architecture for universal strong authentication across all users and all devices over all networks. Using open standards, OATH will offer more hardware choices, lower cost of ownership, and allow customers to replace existing disparate and proprietary security systems whose complexity often leads to higher costs.”

I have created a free PHP toolkit for retrieving data from your analytics account.

Example of usage:

<?php
require_once 'googleAPI.class.php';

$gapi = new googleAPI('your username','your password',"a profile");
$reportData = $gapi->viewReport("2009-04-01","2009-04-25","ga:pageviews,ga:visits,ga:newVisits","ga:country,ga:city,ga:date,ga:browserVersion");
?>

You just need to include the analytics library and initialize the object with your username, password, and profile (this is the site name(s) that you see when you first login to your analytics account).

Parameters:

$dateStart: The start date of the report data
$dateEnd: The end date of the report data
$metrics: metric list (multiple metrics need to be separated by commas)
$dimensions: dimensions list (multiple dimensions need to be separated by commas)

You can download it here

Return values

The “viewReport” function returns an array with a list of all the dimensions/metrics that you requested.

Also, a full list of dimensions and metrics can be found here

May 1, 2009   9 Comments

Google, Microsoft, and Yahoo announce duplicate content hints

In a recent announcement on the google blog:

“we now support a format that allows you to publicly specify your preferred version of a URL. If your site has identical or vastly similar content that’s accessible through multiple URLs, this format provides you with more control over the URL returned in search results. It also helps to make sure that properties such as link popularity are consolidated to your preferred version”

This new tag, called canonical, can be easily added to any webpage and allows you to specify a preferred version of the current page. The tag should be placed with the <head></head> tags on your page.

<link rel=”canonical” href=”http://www.yoursite.com/content” />

Is rel=”canonical” a hint or a directive?
It’s a hint that we honor strongly. We’ll take your preference into account, in conjunction with other signals, when calculating the most relevant page to display in search results.

Can I use a relative path to specify the canonical, such as <link rel=”canonical” href=”product.php?item=swedish-fish” />?
Yes, relative paths are recognized as expected with the <link> tag. Also, if you include a <base> link in your document, relative paths will resolve according to the base URL.

Is it okay if the canonical is not an exact duplicate of the content?
We allow slight differences, e.g., in the sort order of a table of products. We also recognize that we may crawl the canonical and the duplicate pages at different points in time, so we may occasionally see different versions of your content. All of that is okay with us.

What if the rel=”canonical” returns a 404?
We’ll continue to index your content and use a heuristic to find a canonical, but we recommend that you specify existent URLs as canonicals.

What if the rel=”canonical” hasn’t yet been indexed?
Like all public content on the web, we strive to discover and crawl a designated canonical URL quickly. As soon as we index it, we’ll immediately reconsider the rel=”canonical” hint.

Can rel=”canonical” be a redirect?
Yes, you can specify a URL that redirects as a canonical URL. Google will then process the redirect as usual and try to index it.

What if I have contradictory rel=”canonical” designations?
Our algorithm is lenient: We can follow canonical chains, but we strongly recommend that you update links to point to a single canonical page to ensure optimal canonicalization results.

Can this link tag be used to suggest a canonical URL on a completely different domain?
No. To migrate to a completely different domain, permanent (301) redirects are more appropriate. Google currently will take canonicalization suggestions into account across subdomains (or within a domain), but not across domains. So site owners can suggest www.example.com vs. example.com vs. help.example.com, but not example.com vs. example-widgets.com.

Plugins:

There have already been some plugins created for auto-generating this tag.

Magento canonical plugin – Download here
Drupal canonical extension – Download here
Wordpress canonical plugin – Download here

February 16, 2009   No Comments