For those who are unfamiliar with Google Shopping, it is a search through e-commerce products. Similar to what we have as Images search or Google News. In our case, we will talk about Google Shopping Ads, which allows advertising your e-commerce products as visual cards in Google SERP.
This is a good way to improve your conversion and visibility. One more benefit, it helps to avoid visitors who just searching for information about certain topics. Google Shopping shows it’s advertising as product cards and makes it obvious that this site is about e-commerce.
Some of our clients who use Drupal as an e-commerce platform requested to integrate it with Google Shopping platform. Even though the topic is quite obvious, I decided to sum up our experience with it so far.
Preparing a Drupal Commerce products feed
There a few different ways to set up a data export suitable for Google Shopping. Google Shopping allows data provided as CSV feed, as REST API requests or as Google Spreadsheet. I will focus on CSV export since it is the most convenient and flexible approach.
Drupal.org database contains a bunch of modules meant to be a Google Shopping integration:
- https://www.drupal.org/project/commerce_twenga_feed_google_shopping (Drupal 7 only and barely used)
- https://www.drupal.org/sandbox/robertoperuzzo/2339909 (Sandbox)
- https://www.drupal.org/project/commerce_google_shopping (no information)
- https://www.drupal.org/project/google_feeds (does not seem to be flexible, has a Drupal 8 version, though)
One might consider this result very unfortunate since none of the modules listed above is well-maintained. Fortunately for us, Google expects a simple CSV, which can be easily configured through the views, using Views Data Export module.
Configuring the Google Merchant part using Views Data Export
Using Views Data Export module is well documented and web flooded with all sorts of tutorials. In our case views configuration looks like the following screenshot:
All data were retrieved from Product and Product Variation entities, except for a few fields:
- GTIN. In our case products did not have GTIN, so this value was hardcoded to empty string.
- MPN. The same situation as with GTIN.
- Availability. We created data export for blck.ink project. This project is meant to supply products on demand directly from the manufacturer with no warehouse. In this case, our availability is hardcoded to be always “in stock”. In your case, it can be a separate boolean field in product variation.
Once the data export has been configured, the only thing left is to set up a Google Merchant account and submit a data. Google runs its own validation and finally allows to promote your products through a special type of Google Adwords campaign.
Possible issues with Google Merchant and Drupal Commerce
Our first version of Google Merchant Feed was refused to be published due to the following errors:
- Account suspended due to policy violation: return and refund policy
- Account suspended due to policy violation: no online purchasing means
Account suspended due to policy violation: return and refund policy
This type of error was easily fixed by moving the “refund policy” link in a more prominent place. (initially, it was hidden on some page with no direct link to the particular section.
Account suspended due to policy violation: no online purchasing means
This one was a bit tricky. Since I could not find any relevant explanation of what kind of “purchasing mean” these guys expect. I was thinking that huge “Add to Cart” button is enough for customers to understand that this product can be purchased.
- Here are a few tips which can help you if you have this issue:
- Ensure that you have an obvious “Add to cart” button.
- Ensure that the product “Quantity” field defaults to 1 (or whatever amount is minimal value for your site).
- Ensure that customers can proceed with checkout without a registration
- Ensure that customers can select “Home delivery” delivery in their shipping options (in our case we did not have such an option and our account was suspended).
We continue experimenting with Google Merchant platform and I assume that later we might have something to add.
Read our blog, follow our social networks, and feel free to contact us if you need any help with Drupal or Google Shopping.