Google AJAX indexing for your Ecwid store

Last updated

This article is outdated. Since October 2015 Ecwid store pages are natively indexed by Google. Please refer to this article for details: SEO


This article describes how you can implement the Google AJAX indexing approach on your custom-build site with Ecwid store.

If you're using Wordpress, Drupal or Joomla and for the general information on SEO in Ecwid, please refer to this article: SEO .

What it is

Google AJAX indexing (Google AJAX Crawling API) is a Google specification for native indexing of AJAX applications. Ecwid supports it so you can use it as a powerful tool to get your Ecwid store indexed by search engines. For the general information on SEO in Ecwid, please refer to this article: SEO .

How it works

Google AJAX indexing approach, as you might see from the Google's specification on it, relies on the following things:

  1. The specific URL scheme (that includes '#!' parts) - it has been added to Ecwid in the recently released version 13 and it automatically works for every Ecwid merchant
  2. The specific reply of your server on a slightly modified URL. That reply of your server must contain the page-specific data, i.e. products/categories titles, description, prices and pictures.

While the part #1 is done by Ecwid automatically, the part #2 requires a special script on your site that will process so-called escaped-fragment requests and response with HTML snapshots representing your products and categories (for those who use our ready Wordpress and Joomla plugins, this is done automatically as well). The details of such integration are available in the Google AJAX indexing specification docs:

In a nutshell, the script will need to do the following:

  • receive requests with the '_escaped_fragment_' GET parameter
  • parse the request parameters and detect what product or category is requested
  • get the corresponding product/category data from your store via Ecwid Product API
  • generate an HTML version of product/category page with necessary title, meta tags, product description, product price, links to other pages etc. 

Also, it is important to place a special meta tag on the main store page so it will be indexed as well:

<meta name="fragment" content="!">

How to set it up on your site

WordPress, Drupal and Joomla

If you're using Wordpress, Drupal or Joomla, all you need is one of paid Ecwid plans and our ready plugin for your CMS. Please refer to this article for the details: SEO.

Any site

If you are not Wordpress, Drupal or Joomla user, you will need to integrate a custom script on your server as mentioned in the 'How it works' part of this article. You can either do it yourself or hire a programmer for this task. If you opt for hiring a developer, we'd recommend Qualiteam - they are team of professionals who have great experience in various e-commerce sites customizations including modifications for Ecwid store. If you're interested, please contact them at for the details.

Alternatively, if you cannot create a script for some reason, you can consider other ways to get your store indexed . 

Below is an example of such script created in PHP which can be installed on most custom PHP sites and CMS. Please mind that if you have different setup (e.g. if your site uses another programming language like Python or ASP.Net), the Google AJAX indexing approach is still can be used, but you will likely need to create such a script from scratch.

PHP Example


Make sure your setup meets the following requirements: 

  • Make sure you are on paid Ecwid plan. It is necessary for using Ecwid Product API
  • Your site's web server must allow you to edit your site's codes and to add new PHP files
  • PHP must be enabled on your server. I.e. the web server must be able to execute PHP files
  • CURL PHP extension must be installed and enabled on the sever

If you're not sure whether your server configuration fits, please contact your hosting support.


You can download the script here: . The file name is 'ecwid_ajax_indexing.php' .

The example of usage is given in the index.php file in that folder:


Please mind these steps below require basic skills in managing and editing files on your web server and basic PHP knowledge. Please don't perform then on a live store if you're not sure you can do it - in this case, please hire a programmer for this task.

Basic installation:

1. Download the file 'ecwid_ajax_indexing.php' and place it in your site's directory on your server.

2. In the PHP file, which is responsible for displaying your store page, add the following code in the head section (between the <head> and </head> tags) before title and description tags:

$ecwid_store_id = YOUR_ACTUAL_STORE_ID;
include_once "%PATH%/ecwid_ajax_indexing.php";
if (!isset($_GET['_escaped_fragment_'])) {
  echo '<meta name="fragment" content="!" />';

In the code above:

  • replace YOUR_ACTUAL_STORE_ID with your store ID (how to find it)
  • replace %PATH% with the real path to the uploaded 'ecwid_ajax_indexing.php' file

3. Find the Ecwid product browser integration code in your store page file and add the following code after the Ecwid integration codes:

echo '<!-- START Google AJAX indexing for Ecwid -->';
echo $ecwid_html_index;
echo '<!-- END Google AJAX indexing for Ecwid -->';

Thats' all - now search engines can index your catalog.

Advanced options:

  • For auto-generating of the page title, please place the following code in your file instead of the existing <title> tag:
if (!empty($ecwid_title)) {
  echo $ecwid_title;
} else {
  echo 'My store page title';

Please feel free to place any text instead of the 'My store page title' - it will be the title of your store's main page.

  • For auto-generating of page description, please place the following code instead of the meta description tag:
if (!empty($ecwid_description)) {
  echo '<meta name="description" content="' .$ecwid_description. '">';
} else {
  echo '<meta name="description" content="My store page description">';

Like with titles, replace 'My store page description' with the description of your main store page.

For auto-generating of page canonical tag, please place the following code inside the <head> section of the page:

if (!empty($ecwid_canonical)) {
echo '<link rel="canonical" href="' . $ecwid_canonical . '" />';

How to make sure Google AJAX indexing works

1. In your browser, open your store page and check it source code. In the head section of the document (between the <head> and </head> tags), you should see the fragment meta tag that looks as follows:

<meta name="fragment" content="!" />

2. Open this page in your browser:

Do not forget to replace '' with your actual store page URL.  

On that page, besides Ecwid widgets, you should see the plain list of links to your categories. The links to your products will also be there if there are products in your store which do not belong to any category. 

If one of these points is not passed then something must be installed wrong. Please make sure your setup meets the requirements and you complete all the steps listed above.

Google AJAX indexing feature is available in Venture and higher tier plans Upgrade to get this feature
Back to top
Was this article helpful? 0 out of 2 found this helpful