What are Google Merchant and Google Shopping?
In order to use Simple Google Shopping for Shopify, you should be aware of what Google Merchant and Google Shopping are.
Here is some basic knowledge about Google Shopping and data feed management.
What are Google Shopping and Google Merchant?
Google Shopping is a free Google service allowing customers to find and compare products they want to buy online. If you are an online merchant, you can submit all your products to Google Shopping and attract potential customers by allowing them to view your products more easily.
Google Merchant Center is a tool that helps you upload your store and product data to Google and so make it available for Google Shopping ads and other services of Google Learn more on how to get started with Merchant Center.
How to create my Google Merchant Account?
In order to submit your products to Google Shopping, you need to create a Google Merchant Account. Click on the following link for further information on creating an account: https://support.google.com/merchants/answer/188924?hl=en
Once
What is a products data feed?
A data feed is a file made up of a unique group of attributes that define each one of your products. This allows customers to search and find your items more easily. This file is similar to
To know more about the product data feeds, feel free to have a look at the Google Merchant Center support site: https://support.google.com/merchants/answer/188478?hl=en
How to create a products data feed?
Simple Google Shopping for Shopify allows you to quickly configure, generate, and automate several product data feeds.
How to use Simple Google Shopping for Shopify?
STEP 1: Configure your data feeds with Simple Google Shopping for Shopify
To create and configure your data feeds, go to:
ShopifyApplicationsSimple Google Shopping
Your data feeds will be listed according to IDs.
You will find the name of the file, its path as well as the link to the data feed file. You should also get a message that sums up the number of products exported and the number of errors and warnings in your data feed.
The status of your data feed will vary according to the situation:
- Pending: the data feed has never been generated or the scheduled hour is passed (waiting for the execution of the cron task)
- Succeeded: successful generation of the data feed, manually or automatically (the generation corresponds with a schedule)
- Hold: in the process of generation (latency, indeterminate status)
- Fetching: generation progression percentage
- Error: the generation is stopped
From the Action
- Edit
- Preview
- Generate
- Delete
Click on + new data feed to configure your data feed as you want.
Settings
In that first tab is the main configuration of the data feed. To customize your feed, you'll find several fields to fill in.
- Name
Enter a name for the data feed. - Status
Enable or disable the data feed. - Language
Define the language that will be used for the product attributes. - File Name
Enter the name for the file. - Title
Enter a title for the data feed. - Description
Enter a description for the data feed
Template
The Simple Google Shopping app for Shopify includes a preview tool to help you configure your feed and see what is wrong very quickly.
Product pattern
Placeholders library
Data feed preview
Report
You can get reports on the errors and warnings of your data feeds.
This will help you save time by quickly identifying the main problems of your data feed and making the necessary changes.
- In red will be displayed the error that you must correct to be able to submit your data feed:
Missing required attribute: google_product_category. - In orange will be displayed the warnings
: Missing recommended attribute: product_type.
Collections - filter type
In the Collections tab, you can filter your collections according to two different ways:
- Include products from selected collections.
- Exclude products from selected collections.
Collections - selection and mapping
In that subtab, you can select and map your collections to Google categories. This step is very important so that Google can make a link between their product categories and your collections.
What is category mapping?
The Google product taxonomy is a tree of categories that will help you generate values for the Google product category attribute listing all possibilities.
Categories names you are using in your Shopify shop aren't always the same as the ones used by Google Merchant to reference your products.
This means you have to find out which Google Merchant categories have the best matching with your collections, according to the Google product taxonomy.
For example, if you're selling furniture like coffee tables, you'll have a Coffee table collection in your Shopify back-office. But Google Merchant doesn't handle this kind of category. The closest Google product category could be Kitchen & Dining Room Table.
So this should appear this way in your data feed:
<g:google_product_category>Furniture > Desks & Tables > Kitchen & Dining Room Tables</g:google_product_category>
How to map your collections to Google categories?
Simple Google Shopping for Shopify provides you with an easy way to input Google product categories that are matching your collections.
In your data feed configuration, go to the Collections tab. Then, in the Collections selection and mapping section, you'll find a tree view of all your collections.
First, select the Google Taxonomy source on which the category mapping is based.
Taxonomy files for the main countries are directly included in the app to allow you to map your collections more easily. You can also have a look at the below documentation to know how to add a new taxonomy file.
For each collection, you have a little arrow followed by mapped as.
There, you'll be able to start typing a keyword in order to display a list of all categories including that keyword. You simply need to select the one you need.
Once all your collections are mapped, you can click on the Save button.
Here are a few guidelines for choosing the most appropriate category:
- Use the category that best describes your item. To do this, first determine the primary function of the products you are submitting. For specific items like MP3 Players, select the MP3 Players category. While some MP3 players can also serve different functions, like those that contain a clock, they are primarily MP3 Players.
- Use only one category. For some products, more than one category might be relevant. For example, an adapter to allow an MP3 player to be used in a car could be in both categories Motor Vehicles > Audio & Video and Electronics > Audio > Audio Accessories > MP3 Player Accessories. In such cases, you should choose the category that seems the most appropriate to you, but do not include more than one.
- Use the most specific category possible. Being specific will help improve your data quality and in turn ensure that offers are presented in the right category. When viewing the taxonomy, try to navigate to the most specific category that still covers all the products being submitted. For instance, if you are submitting MP3 player chargers use the category MP3 Player Chargers. Conversely, if you are submitting multiple types of chargers use the category Chargers.
How to include the Google category in the XML template?
Finally, so that the Google category is retrieved in your data feed, you must add the following attribute to the XML template:
<g:google_product_category>{{product.google_product_category | parent.google_product_category}}</g:google_product_category>
Read also: https://support.google.com/merchants/answer/6324406?hl=en
How to add a taxonomy file?
With Simple Google Shopping for Shopify, you have the possibility to change the file on which the category mapping is based.
From that page, choose the language you want to use for your taxonomy at the bottom right. Then, in the Downloadable taxonomy, open the Plain Text link that contains full category names.
Save that file and paste it in:
GoogleTaxonomies
Don't forget to apply the permissions 644 to the file.
You'll then be able to choose that specific taxonomy from your data feed configuration.
Filters
Simple Google Shopping for Shopify also allows you to filter your products on several levels.
Product types
First of all, you can choose to include products to your feed according to their types:
- Include main products
- Include variant products
Advanced Filters
- LIKE / NOT LIKE
name like %shirt: will include all products whose name ends with 'shirt'.
name not like %shirt: won't include any product whose name ends with 'shirt'.
- IS NULL / IS NOT NULL
Color is null: will include all products that don't have color. Color is not null: will include all products whose color is not null.
- IS ONE OF / IS NOT ONE OF
Size is one of S L: will include only products from these 2 sizes.
Size is not one of S L: will include all products whose size is not S or L.
Schedule
Simple Google Shopping for Shopify provides you with a fully configurable schedule in the Schedule tab of each data feed.
You just have to tick the days and hours when you want your data feed to be generated.
STEP 2: Generate and download the data feeds
Generate the data feeds
Simple Google Shopping for Shopify allows you to generate the data feeds manually or automatically.
Manually
You can generate your data feeds manually from the action
You also have the possibility to do it from the configuration panel by clicking on Generate.
With the cron tasks
You need to select a least one day and
Download the generated data feed
When a data feed is ready to be downloaded, the link is displayed in:
- the data feeds grid
- the data feed Settings tab
To download the data feed, select Save link as after clicking on the link (right-click).
Manage your data feed templates with Simple Google Shopping for Shopify
10 Things to know when creating an XML data feed with Simple Google Shopping for Shopify
- An XML data feed is using opening and closing tags that include a value.
<g:id>123456</g:id> <price>45.99 USD</price>
- A data feed template is made of several tags including dynamic or fixed values.
<g:id>{{product.sku}}</g:id> <g:brand>Fixed Brand</g:brand>
- Dynamic values are called variables and use the attribute codes of your Shopify website preceded with the object. The variable must be enclosed using double brackets.
<g:id>{{product.sku}}</g:id> <price>{{parent.price}}</price>
- You can include some fixed values between every opening and closing tag. Fixed values are simply text.
<g:brand>YOUR BRAND</g:brand>
- You have also the possibility to add several variables and fixed values in
the tag.same
<title>{{parent.name}}, available in {{product.color}} for only ${{product.price}}</title>
- Some attributes may have further configuration options or parameters that will correspond to your specific data feed needs.
<availability>{{product.availability out_of_stock='not available' in_stock='available' backorders='available'}}</availability>
- You're allowed to use PHP code if you want to customize the pattern. Check how to add PHP scripts to your patterns.
<g:shipping_weight> {{product.weight output="float($self,2)"}}kg </g:shipping_weight>
- The syntactic coloration in Simple Google Shopping for Shopify will also help you to avoid many errors in your pattern.
- You can use one or more fallback variables in case the previous is empty or null. If attributeA exists then the value will be attributeA, otherwise, the value will be attributeB...
{{product.color | product.colour}}
- CDATA is recommended. CDATA stands for Character Data. It means that the data in between these tags include data that could be interpreted as XML markup but should not be (Wikipedia article).
<description> <![CDATA[<p>Fantastic <b>Watch</b>, that not only tells you what time it is,but also gives the weather trends</p>]]> </description>
How is a variable structured?
To modify your pattern as you want, before anything you need to respect a particular syntax.
Indeed, in order to retrieve attributes, the Simple Google Shopping app for Shopify uses a specific structure. Then it is essential that you know how the variable is built to be able to configure your data feed according to your needs.
The above screen details the different components of a variable.
object Defines what is the target for the attribute to retrieve.attribute Defines the code of the attribute to retrieve.- parameters
Defines some additional parameters for specific attributes. value Defines the different values available for the previous parameter.
Attribute specifications
The data feed pattern is totally customizable.
OBJECTS
In order to retrieve the value of an attribute, you need to define which object is targeted. Below are the different types of objects that you can use.
{{product.attribute_code}}
Retrieves the attribute for the product.
For example:
{{product.sku}}
{{product.color}}
{{parent.attribute_code}}
Retrieves the parent attribute value.
For example:
{{parent.product_type}}
PRODUCT IDENTIFIERS
You'll find below the attributes most commonly used to identify the products in data feeds patterns.
{{object.sku}}
Retrieves the
For example:
{{product.sku}}
{{object.id}}
Retrieves the id of the product.
For example:
{{product.id}}
{{object.barcode}}
Retrieves the barcode of the product.
For example:
{{product.barcode}}
BASIC INFORMATION
You'll find below the attributes that are generally used to define basic information about products in the data feeds.
{{object.status}}
Retrieves the status of the product.
For example:
{{product.status}}
{{object.title}}
Retrieves the name of the product.
For example:
{{product.title}}
{{object.handle}}
Retrieves a unique human-friendly string of the product's title.
For example:
{{product.handle}}
{{object.description}}
Retrieves the description of the product.
For example:
{{product.description}}
{{object.descriptionHtml}}
Retrieves the description of the product, complete with HTML formatting.
For example:
{{product.descriptionHtml}}
{{object.typeId}}
Retrieves the type of the product: Product or VariantProduct
For example:
{{product.typeId}}
{{object.createdAt}}
Retrieves the date and time (ISO 8601 format) when the product was created.
For example:
{{product.createdAt}}
{{object.customProductType}}
Retrieves the custom product type specified by the merchant.
For example:
{{product.customProductType}}
{{object.mediaCount}}
Retrieves the total count of media belonging to a product.
For example:
{{product.mediaCount}}
{{object.productType}}
Retrieves the product type specified by the merchant.
For example:
{{product.productType}}
{{object.updatedAt}}
Retrieves the date and time when the product was last modified.
For example:
{{product.updatedAt}}}
{{object.vendor}}
Retrieves the name of the product's vendor.
For example:
{{product.vendor}}
{{object.standardizedProductType}}
Retrieves the standardized product type in the Shopify product taxonomy.
For example:
{{product.standardizedProductType}}
{{object.tags}}
Retrieves a comma-separated list of tags associated with the product.
For example:
{{product.tags}}
You also have the possibility to use some parameters with this attribute:
- nth= Get the nth tag.
{{product.tags nth='2'}}
{{object.templateSuffix}}
Retrieves the theme template used when viewing the product in a store.
For example:
{{product.templateSuffix}}
{{object.displayName}}
Retrieves the name of the variant, based on the product's title and the variant's title.
For example:
{{product.displayName}}
{{object.fulfillmentService}}
Retrieves the fulfillment service associated with the product.
For example:
{{product.fulfillmentService}}
{{object.fulfillmentServiceEditable}}
Whether changes to the fulfillment service for the product variant are allowed.
For example:
{{product.fulfillmentServiceEditable}}
{{object.position}}
Retrieves the order of the product variant in the list of product variants. The first position in the list is 1.
For example:
{{product.position}}
{{object.selectedOptions}}
Retrieves the list of product options applied to the variant.
For example:
{{product.selectedOptions name='color'}}
{{product.selectedOptions name='size'}}
{{object.translations}}
Retrieves the translations associated with the resource.
For example:
{{product.translations}}
{{object.weight}}
Retrieves the weight of the product variant in the unit system specified with weight_unit.
For example:
{{product.weight}}
{{object.weightUnit}}
Retrieves the unit of measurement that applies to the product variant's weight. If you don't specify a value for weight_unit, then the shop's default unit of measurement is applied. Valid values: g, kg, oz, lb.
For example:
{{product.weightUnit}}
COLLECTIONS
To retrieve the collections of your products, you can check the below attributes.
{{object.google_product_category}}
Retrieves the Google Product Category associated with the collections of the product (in the Collections section).
You also have the possibility to use a parameter with this attribute:
- nth = index of the category mapping
For example:
{{product.google_product_category nth='1'}}
{{object.collections}}
Display the collections associated with the product.
- Default Category
- Sales
- Clothes
- Men
- Pants
- Spring and Summer Sales
In order to display a specific collection you have the possibility to use a parameter with this attribute:
- nth = display the nth collection, if not specified the 1st collection is used by default. Negative values are allowed.
For example:
{{product.collections nth="1"}}
Shows the first collection
{{product.categories nth="-1"}}
Shows the last collection:Spring and Summer Sales
{{product.categories nth="-2"}}
Shows the before last collection:Pants
{{object.category_mapping}}
Retrieves collections mapping associated with the product (in the Collections tab). If no mapping is assigned to the first collection found, the second collection will be used, etc…
You also have the possibility to use some parameters with this attribute:
- nth = nth of the category mapping
For example:
{{product.category_mapping nth='3'}}
LINKS
Below are listed the attributes that are generally used to retrieve any kind of link.
{{object.image}}
Retrieves the featured image for the variant.
For example:
{{product.image}}
{{object.images}}
Retrieves the product’s images.
You also have the possibility to use some parameters with this attribute:
- nth = the nth image (default is the first image).
For example:
{{product.images nth='2'}}
{{object.onlineStorePreviewUrl}}
Retrieves the online store preview URL.
For example:
{{product.onlineStorePreviewUrl}}
{{object.onlineStoreUrl}}
Retrieves the online store URL for the product. A value of null indicates that the product is not published to the Online Store sales channel.
For example:
{{product.onlineStoreUrl}}
{{object.onlineStorePreviewUrlConfig}}
Retrieves the online store preview URL with pre-selection of the variant options.
For example:
{{product.onlineStorePreviewUrlConfig}}
{{object.onlineStoreUrlConfig}}
Retrieves the online store URL with pre-selection of the variant options.
For example:
{{product.onlineStoreUrlConfig}}
AVAILABILITY
The below attributes are often used to retrieve the availability of your products, for
{{object.inventoryQuantity}}
Retrieves the total sellable quantity of the variant.
For example:
{{product.inventoryQuantity}}
{{object.inventoryItem}}
Retrieves the inventory item, which is used to query for inventory information.
For example:
{{product.inventoryItem}}
{{object.totalInventory}}
Retrieves the quantity of inventory in stock.
For example:
{{product.totalInventory}}
{{object.hasOnlyDefaultVariant}}
Whether the product has only a single variant with the default option and value.
You also have the possibility to use some parameters with this attribute:
- yes = Value when true. Default value true
- no = Value when no. Default value false
For example:
{{product.hasOnlyDefaultVariant yes='positive' no='negative'}}
{{object.availability}}
Retrieves the availability of the product.
You also have the possibility to use some parameters with this attribute:
- in_stock = the product is in stock. Default value in stock.
- out_of_stock= the product is out of stock. Default value out of stock.
backorderable = the product is out of stock but allows backorders. Default value backorders.
For example:
{{product.availability out_of_stock='not available' in_stock='available' backorders='available'}}
{{object.hasOutOfStockVariants}}
Whether the product has out of stock variants.
You also have the possibility to use some parameters with this attribute:
- yes = value when true. Default value true.
- no = value when no. Default value false.
For example:
{{product.hasOutOfStockVariants yes='positive' no='negative'}}
{{object.totalVariants}}
Retrieves the number of variants that are associated with the product.
For example:
{{product.totalVariants}}
{{object.tracksInventory}}
Whether inventory tracking has been enabled for the product.
For example:
{{product.tracksInventory}}
{{object.inventoryPolicy}}
Whether customers are allowed to place an order for the product variant when it's out of stock.
For example:
{{product.inventoryPolicy}}
{{object.delivery}}
Retrieves the delivery profile for the variant.
For example:
{{product.delivery}}
PRICES AND PROMOTIONS
Below is a list of the price attributes that you can use in your feed pattern. For most of them, you can add some parameters in order to define the currency used or the VAT to apply for example.
{{object.price}}
Retrieves the price of the product variant in the default shop currency.
You also have the possibility to use some parameters with this attribute:
- country = automatically converts the original product price to a specified currency. It uses an exchange rate that you have already stored in your Shopify admin panel. By default, your local currency is used.
For example:
{{product.price country='FR'}}
{{object.minPrice}}
Retrieves the product minimum price
For example:
{{product.minPrice}}
{{object.maxPrice}}
Retrieves the product maximum price.
For example:
{{product.maxPrice}}
{{object.normalPrice}}
Retrieves the price of the product variant in the default shop currency (no discount applied).
For example:
{{product.normalPrice}}
{{object.privateMetafield}}
Retrieves a private metafield by namespace and key that belongs to the resource.
For example:
{{product.privateMetafield}}
{{object.sellableOnlineQuantity}}
Retrieves the total sellable quantity of the variant for online channels. This doesn't represent the total available inventory or capture limitations based on customer location.
For example:
{{product.sellableOnlineQuantity}}
{{object.availableForSale}}
Whether the product variant is available for sale.
For example:
{{product.availableForSale}}
{{object.contextualPricing}}
Retrieves the pricing that applies for a customer in a given context.
For example:
{{product.contextualPricing}}
{{object.sale_price_to}}
Retrieves the ending date for the sale price.
For example:
{{product.sale_price_to}}
{{object.compareAtPrice}}
Retrieves the compare-at price of the variant in the default shop currency.
For example:
{{product.compareAtPrice}}
{{object.giftCardTemplateSuffix}}
Retrieves the theme template used when viewing the gift card in a store.
For example:
{{product.giftCardTemplateSuffix}}
{{object.isGiftCard}}
Retrieves whether the product is a gift card.
You also have the possibility to use some parameters with this attribute:
- yes = value when true. Default value true.
- no = value when no. Default value false.
For example:
{{product.isGiftCard yes='positive' no='negative'}}
{{object.taxCode}}
Retrieves the tax code for the product variant.
For example:
{{product.taxCode}}
{{object.taxable}}
Retrieves whether a tax is charged when the product variant is sold.
You also have the possibility to use some parameters with this attribute:
- yes = value when true. Default value true.
- no = value when no. Default value false.
For example:
{{product.taxable yes='positive' no='negative'}}
{{object.sellingPlanGroupCount}}
Retrieves the count of selling plan groups associated with the product.
For example:
{{product.sellingPlanGroupCount}}
{{object.requiresSellingPlan}}
Retrieves whether the product can only be purchased with a selling plan (subscription).
You also have the possibility to use some parameters with this attribute:
- yes = value when true. Default value true.
- no = value when no. Default value false.
For example:
{{product.requiresSellingPlan yes='positive' no='negative'}}
METAFIELDS
In the case where you're using metafields, then you can use the following attributes.
{{object.metafield}}
Retrieves a metafield by namespace and key that belongs to the resource.
You also have the possibility to use some parameters with this attribute:
- namespace = namespace of the metafield.
- field: name of the metafield.
For example:
{{product.metafield namespace='my_namespace' field='my_field'}}
GENERAL PARAMETERS
Below are listed all the parameters that you can use with any attribute in your data feeds.
{{object.attribute prefix="value"}}
The prefix is what will be displayed before the attribute value only if it is not null,
Below is an example:
To add the currency symbol before the price and not retrieve anything when the value of the attribute is null:
{{product.price prefix="$"}}
{{object.attribute suffix="value"}}
The suffix is what will be displayed after the attribute value only if it is not
Below is an example:
To add the currency code after the price and not retrieve anything when the value of the attribute is null:
{{product.price suffix=" USD"}}
{{object.attribute as="myVariable"}}
The as
Here are a few examples:
Display the product name and store the value in a variable $name:
<!-- Product name is displayed and stored under a new variable "name" -->
<name>{{product.name as="name"}}</name>
$name can be then used in a PHP script later in the template:
<?php
/* If variable $name is equal to "Apple", then display "Apple" then display "Banana"
*/
if($name=="Apple") return $name;else return "Banana";
?>
Store the visibility of a product and use it in a condition for another attribute
<!-- Product visibility is stored under a new variable "visibility" and the attribute doesn't display -->
{{product.visibility as="visibility" output="null"}}
<!-- If the product is hidden then we display the parent product url, otherwise we use the product url-->
<url>{{parent.url if="visibility==hidden" | product.url}}</url>
{{object.attribute if="condition"}}
The if parameter allows you to define one or more necessary conditions to display the given attribute in the data feed.
One condition is built with 3 items :
- the variable to check :
a product attribute
a variable previously stores thanks to the as parameter (see as parameter) - the comparison statement
== equal
<= lower or equal to
=> hieght or equal to
< lower than
> higher than
!= different from - the value
Example:
<!-- Product description will be displayed only if product sku is banana -->
<name>{{product.description if="product.sku==banana"}}</name>
{{object.attribute output="functions"}}
The output parameter allows you to define the output format for a given attribute.
You can use the basic functions (see basic functions), or any
You must refer to the attribute by using the $
Example :
<!-- Get the product name with the first letter of each word in uppercase -->
<name>{{product.name output="ucwords($self)"}}</name>
If you want to use several functions, they must be imbricated as you do with PHP:
Example :
<!-- Remove all html tags from the description and limit the description to the first 100 characters -->
<name>{{product.description output="substr(strip_tags($self),0,100)"}}</name>
You can also use null to display an empty string or you can use any string to display a specific message:
Example :
<!-- If product price is greater than $10 then display "Free Shipping"-->
<shipping_cost>{{product.price if="product.price>10" output="'Free Shipping'"}}</shipping_cost>
BASIC FUNCTIONS
You can use any of the native
The syntax to use in order to include
{{object.attribute output=”function(parameters)”}}
You can also apply one or more functions to all of these attributes by using the following syntax:
{{object.attribute output=”function1(function2(function3($self,parameters)))”}}
All options are executed in the written order:
<title>{{product.name}}</title>
<title>{{product.name output="strtoupper($self)"}}</title>
<title>{{product.name output="strtoupper(substr($self,15,'...'))"}}</title>
This will produce:
<title>V-Neck T-Shirt</title>
<title>V-NECK T-SHIRT</title>
<title>V-NECK T-SHI...</title>
float($self,$decimal)
Converts a numeric value to a floating number.
You need to define some parameters:
- decimal = number of floating numbers. By default: 0
For example:
<g:shipping_weight> {{product.weight output="float($self,2)"}}kg </g:shipping_weight>
cleaner($self)
Removes all characters that don't belong to the UTF-8 charset.
For example:
<g:title>{{product.name output="cleaner($self)"}}</g:title>
inline($self)
Removes all EOL characters from the value.
For example:
<description> {{product.description output="inline($self)"}} </description>