Google Shopping Feed 数据整理之XML格式实现方法

伴随着越来越多的外贸B2C电商企业开始投放Google PLA广告,Google Shopping Feed 的数据创建一直困扰着一些外贸电商企业;创建数据 Feed 时,一定要选择最适合商家需要的格式。Google 支持两种常规格式的数据 Feed:文本 (.txt) 和 XML (.xml)。

 

对于大多数外贸商家,建议你使用 .txt 格式,因为这种格式对技术知识的要求最低。您可以使用电子表格编辑器(例如 Microsoft Excel 或 Google 电子表格)轻松地创建 .txt 数据 Feed。但是这种方法的缺点就是要手动更新数据,比较麻烦。我今天给大家介绍的是用 XML 创建 Feed 数据,产品Feed数据自动更新,管理轻松。在创建 Google Shopping Feed 数据之前,应该先熟读目标国家的商品 Feed 规范XML格式RSS2.0规范。尽量完善商品 Feed 规范要求的必须和推荐属性,有利于提高 Feed数据的质量和PLA广告的质量。

 

你需要在IT的帮助下把网站的所有产品生成符合 Google Feed 要求的 RSS 2.0 文档,如下图:

<?xml version=”1.0″?>
<rss version=”2.0″
xmlns:g=”http://base.google.com/ns/1.0″>
<channel>
<title>数据文件的名称</title>
<link>http://www.example.com</link>
<description>内容简介</description>
<item>
<g:id>{sku}</g:id>
<g:item_group_id>{parent_sku}</g:item_group_id>
<title>{name,[substr],[70],[…]}</title>
<link>{url parent}</link>
<g:price>{normal_price}</g:price>
<g:sale_price>{special_price}</g:sale_price>
<g:online_only>y</g:online_only>
<description>{description parent,[html_entity_decode],[strip_tags]}</description>
<g:condition>new</g:condition>
<g:google_product_category>{google_product_categoryparent}</g:google_product_category>
<g:product_type>{product_type parent}</g:product_type>
<g:image_link>image_link parent</g:image_link>
<g:availability>{is_in_stock parent?[in stock]:[out ofstock]}</g:availability>
<g:quantity>{qty}</g:quantity>
<g:featured_product>{is_special_price?[yes]:[no]}</g:featured_product>
<g:color>{color,[implode],[,]}</g:color>
<g:shipping_weight>{weight,[float],[2]}kilograms</g:shipping_weight>
<g:manufacturer>{manufacturer}</g:manufacturer>
<g:brand>Your Brand</g:brand>
<g:upc>{upc}</g:upc>
<g:adwords_labels>{product_category}</g:adwords_labels>
</item>
</channel>
</rss>

 

特别备注:

1.{}里的变量对应你网站上各个属性的变量;
2.红色属性代表 Google Feed 规范的要求的必要属性,这里主要参考 Summary of Attribute Requirements
3.对于面向美国、英国、德国、法国和日本的 Feed:属于 ‘服饰与配饰‘ 类别(包括所有子类别)的所有商品都必须提供本部分中的以下属性:性别(gender)、年龄段(age)、颜色(color)、尺寸(size)。

 

然后,叫IT把生成的 Google Shopping Feed URL 给你,比如 http://www.example.com/googleshopping-us.xml,Feed URL打开如下图所示(下图中我只列举了一些 Feed 的必须属性):

 

登录你的 Google Merchant Center,点击”Data feeds > New Data Feed“,如图:

 

Format 选择 “googlebase“,新建一个Data feed filename命名为”googleshopping-us“,如图:

 

点击”Create schedule“,如图:

下图,然后弹出一个窗口,Upload 你可以选择按月、周、日三种不同的时间更新数据,我推荐选择”Daily“即日更新数据,这样能保证数据的及时性和有效性;Timezone(时区)可以更具需要选择,我推荐选择目标国家的时区;Feed URL 区域填写Google Shopping Feed的路径”http://www.example.com/googleshopping-us.xml“,一定要填写正确,否者无法正确抓取数据;如果你的Feed URL设置有密码保护,请输入用户名和密码即可。如图:

然后点击”Schedule and fetch now“,Google 就会立即抓取所有 Feed URL 下所有的产品数据,几分钟之后,查看是否抓取有误;如果有误,Google 会提示原因,然后按照提示修改即可。

 

这样如果在网站上修改产品数据(比如价格,库存等等),Google会自动抓取和更新,Google Merchant Center 的产品数据会自动更新,无需重新整理和上传产品 Feed 数据,很方便。

 

注意事项:

1.要为其排定计划的文件的大小必须小于 1 千兆字节 (GB),且不得阻止用户代理“Googlebot”访问包含 Feed 的目录(网站的robot.txt文件)。
2.请确保 Feed 网址采用了某种我们支持的文件格式直接指向您的数据 Feed 文件。 请注意,如果指向您网站上的某个 HTML 网页,将导致系统无法处理您的 Feed。
3.及时关注 Google Feed 标准和 Google 购物政策的变化,以便调整 Feed。

 

转载注明出处《尉聊子的网络营销博客》
原链接:http://www.hurencai.com/archives/533

 

官方xml实例:

<?xml version="1.0"?>
<rss xmlns:g="http://base.google.com/ns/1.0" version="2.0">
	<channel>
		<title>Example - Online Store</title>
		<link>http://www.example.com</link>
		<description>This is a sample feed containing the required and recommended attributes for a variety of different products</description>
		
		<!-- First example shows what attributes are required and recommended for items that are not in the apparel category -->
		<item>
			<!-- The following attributes are always required -->
			<g:id>TV_123456</g:id>
			<g:title>LG 22LB4510 - 22" LED TV - 1080p (FullHD)</g:title>
			<g:description>Attractively styled and boasting stunning picture quality, the LG 22LB4510 - 22&quot; LED TV - 1080p (FullHD) is an excellent television/monitor. The LG 22LB4510 - 22&quot; LED TV - 1080p (FullHD) sports a widescreen 1080p panel, perfect for watching movies in their original format, whilst also providing plenty of working space for your other applications.</g:description>
			<g:link>http://www.example.com/electronics/tv/22LB4510.html</g:link>
			<g:image_link>http://images.example.com/TV_123456.png</g:image_link>
			<g:condition>used</g:condition>
			<g:availability>in stock</g:availability>
			<g:price>159.00 USD</g:price>
			<g:shipping>
				<g:country>US</g:country>
				<g:service>Standard</g:service>
				<g:price>14.95 USD</g:price>
			</g:shipping>
			
			<!-- 2 of the following 3 attributes are required fot this item according to the Unique Product Identifier Rules -->
			<g:gtin>71919219405200</g:gtin>
			<g:brand>LG</g:brand>
			<g:mpn>22LB4510/US</g:mpn>
			
			<!-- The following attributes are not required for this item, but supplying them is recommended -->
			<g:google_product_category>Electronics > Video > Televisions > Flat Panel Televisions</g:google_product_category>
			<g:product_type>Consumer Electronics &gt; TVs &gt; Flat Panel TVs</g:product_type>
		</item>
		
		<!-- Second example demonstrates the use of CDATA sections instead of entities to deal with special characters. Note that CDATA sections can be used for any attribute -->
		<item>
			<!-- The following attributes are always required -->
			<g:id>DVD-0564738</g:id>
			<g:title><![CDATA[Merlin: Series 3 - Volume 2 - 3 DVD Box set]]></g:title>
			<g:description><![CDATA[Episodes 7-13 from the third series of the BBC fantasy drama set in the mythical city of Camelot, telling the tale of the relationship between the young King Arthur (Bradley James) & Merlin (Colin Morgan), the wise sorcerer who guides him to power and beyond. Episodes are: 'The Castle of Fyrien', 'The Eye of the Phoenix', 'Love in the Time of Dragons', 'Queen of Hearts', 'The Sorcerer's Shadow', 'The Coming of Arthur: Part 1' & 'The Coming of Arthur: Part 2']]></g:description>
			<g:link><![CDATA[http://www.example.com/media/dvd/?sku=384616&src=gshopping&lang=en]]></g:link>
			<g:image_link><![CDATA[http://images.example.com/DVD-0564738?size=large&format=PNG]]></g:image_link>
			<g:condition>new</g:condition>
			<g:availability>in stock</g:availability>
			<g:price>11.99 USD</g:price>
			<g:shipping>
				<g:country>US</g:country>
				<g:service>Express Mail</g:service>
				<g:price>3.80 USD</g:price>
			</g:shipping>
			
			<!-- 2 out of the 3 unique product identifer attributes are required for this item -->
			<g:gtin>88392916560500</g:gtin>
			<g:brand>BBC</g:brand>
			
			<!-- The following attribute is required because this item is in the 'Media' category -->
			<g:google_product_category><![CDATA[Media > DVDs & Videos]]></g:google_product_category>
			
			<!-- The following attributes are not required for this item, but supplying them is recommended if applicable -->
			<g:product_type><![CDATA[DVDs & Movies > TV Series > Fantasy Drama]]></g:product_type>
		</item>
		
		<!-- Third example shows how to include multiple images and shipping types-->
		<item>
			<!-- The following attributes are always required -->
			<g:id>PFM654321</g:id>
			<g:title>Dior Capture XP Ultimate Wrinkle Correction Creme 1.7 oz</g:title>
			<g:description>Dior Capture XP Ultimate Wrinkle Correction Creme 1.7 oz reinvents anti-wrinkle care by protecting and relaunching skin cell activity to encourage faster, healthier regeneration.</g:description>
			<g:link>http://www.example.com/perfumes/product?Dior%20Capture%20R6080%20XP</g:link>
			<g:image_link>http://images.example.com/PFM654321_1.jpg</g:image_link>
			<g:condition>new</g:condition>
			<g:availability>in stock</g:availability>
			<g:price>99 USD</g:price>
			<g:shipping>
				<g:country>US</g:country>
				<g:service>Standard Rate</g:service>
				<g:price>4.95 USD</g:price>
			</g:shipping>
			<g:shipping>
				<g:country>US</g:country>
				<g:service>Next Day</g:service>
				<g:price>8.50 USD</g:price>
			</g:shipping>
			
			<!-- 2 out of the 3 unique product identifer attributes are required for this item  -->
			<g:gtin>3348901056069</g:gtin>
			<g:brand>Dior</g:brand>
			
			<!-- The following attributes are not required for this item, but supplying them is recommended if applicable -->
			<g:product_type>Health &amp; Beauty &gt; Personal Care &gt; Cosmetics &gt; Skin Care &gt; Lotion</g:product_type>
			<g:google_product_category>Health &amp; Beauty &gt; Personal Care &gt; Cosmetics &gt; Skin Care &gt; Anti-Aging Skin Care Kits</g:google_product_category>
			<g:additional_image_link>http://images.example.com/PFM654321_2.jpg</g:additional_image_link>
			<g:additional_image_link>http://images.example.com/PFM654321_3.jpg</g:additional_image_link>
		</item>
		
		<!-- Fourth example shows what attributes are required and recommended for items that are in the apparel category -->
		<item>
			<!-- The following attributes are always required -->
			<g:id>CLO-29473856-1</g:id>
			<g:title>Roma Cotton Rich Bootcut Jeans - Size 8 Standard</g:title>
			<g:description>A smart pair of bootcut jeans in stretch cotton.</g:description>
			<g:link>http://www.example.com/clothing/women/Roma-Cotton-Bootcut-Jeans/?extid=CLO-29473856</g:link>
			<g:image_link>http://images.example.com/CLO-29473856-front.jpg</g:image_link>
			<g:condition>new</g:condition>
			<g:availability>out of stock</g:availability>	
			<g:price>29.50 USD</g:price>
					
			<!-- The following attributes are required because this item is apparel -->
			<g:google_product_category>Apparel &amp; Accessories &gt; Clothing &gt; Pants &gt; Jeans</g:google_product_category>
			<g:brand>M&amp;S</g:brand>
			<g:gender>Female</g:gender>
			<g:age_group>Adult</g:age_group>
			<g:color>Navy</g:color>
			<g:size>8 Standard</g:size>
			
			<!-- The following attribute is required because this item has variants -->
			<g:item_group_id>CLO-29473856</g:item_group_id>
			
			<!-- The following attributes are not required for this item, but supplying them is recommended if applicable -->
			<g:mpn>B003J5F5EY</g:mpn>
			<g:product_type>Women's Clothing &gt; Jeans &gt; Bootcut Jeans</g:product_type>
			<g:additional_image_link>http://images.example.com/CLO-29473856-side.jpg</g:additional_image_link>
			<g:additional_image_link>http://images.example.com/CLO-29473856-back.jpg</g:additional_image_link>
		</item>
		
		<!-- This is a variant of the last item (same 'item group id'). In this case the variant is only by size, but the item could be repeated in the same way for other variants -->
		<item>
			<!-- The following attributes are always required -->
			<g:id>CLO-29473856-2</g:id>
			<g:title>Roma Cotton Rich Bootcut Jeans - Size 8 Tall</g:title>
			<g:description>A smart pair of bootcut jeans in stretch cotton.</g:description>
			<g:link>http://www.example.com/clothing/women/Roma-Cotton-Bootcut-Jeans/?extid=CLO-29473856</g:link>
			<g:image_link>http://images.example.com/CLO-29473856-front.jpg</g:image_link>
			<g:condition>new</g:condition>
			<g:availability>in stock</g:availability>
			<g:price>29.50 USD</g:price>
						
			<!-- The following attributes are required because this item is apparel -->
			<g:google_product_category>Apparel &amp; Accessories &gt; Clothing &gt; Pants &gt; Jeans</g:google_product_category>
			<g:brand>M&amp;S</g:brand>
			<g:gender>Female</g:gender>
			<g:age_group>Adult</g:age_group>
			<g:color>Navy</g:color>
			<g:size>8 Tall</g:size>
			
			<!-- The following attribute is required because this item has variants -->
			<g:item_group_id>CLO-29473856</g:item_group_id>
			
			<!-- The following attributes are not required for this item, but supplying them is recommended if applicable -->
			<g:mpn>B003J5F5EY</g:mpn>
			<g:product_type>Women's Clothing &gt; Jeans &gt; Bootcut Jeans</g:product_type>
			<g:additional_image_link>http://images.example.com/CLO-29473856-side.jpg</g:additional_image_link>
			<g:additional_image_link>http://images.example.com/CLO-29473856-back.jpg</g:additional_image_link>
		</item>
		
		<!-- Fifth example demonstrates the use of the sale price attributes  -->
		<item>
			<!-- The following attributes are always required -->
			<g:id>CLO-1029384</g:id>
			<g:title>Tenn Cool Flow Ladies Long Sleeved Cycle Jersey</g:title>
			<g:description>A ladies' cycling jersey designed for the serious cyclist, tailored to fit a feminine frame. This sporty, vibrant red, black and white jersey is constructed of a special polyester weave that is extremely effective at drawing moisture away from your body, helping to keep you dry.  With an elasticised, gripping waist, it will stay in place for the duration of your cycle, and won't creep up like many other products. It has two elasticised rear pockets and the sleeves are elasticated to prevent creep-up.</g:description>
			<g:link>http://www.example.com/clothing/sports/product?id=CLO1029384&amp;src=gshopping&amp;popup=false</g:link>
			<g:image_link>http://images.example.com/CLO-1029384.jpg</g:image_link>
			<g:condition>new</g:condition>
			<g:availability>in stock</g:availability>
			<g:price>33.99 USD</g:price>
			<g:shipping>
				<g:country>US</g:country>
				<g:service>Standard Free Shipping</g:service>
				<g:price>0 USD</g:price>
			</g:shipping>
			
			<!-- The following attributes are required because this item is apparel -->
			<g:brand>Tenn Cool</g:brand>
			<g:google_product_category>Apparel &amp; Accessories &gt; Clothing &gt; Activewear &gt; Bicycle Activewear &gt; Bicycle Jerseys</g:google_product_category>
			<g:gender>Female</g:gender>
			<g:age_group>Adult</g:age_group>
			<g:color>Black/Red/White</g:color> <!-- Indicates all the colours found on the garment in order of dominance -->
			<g:size>M</g:size>
			
			<!-- The following demonstrate the use of the 'sale price' and 'sale price effective date' and attributes -->
			<g:sale_price>25.49 USD</g:sale_price>
			<g:sale_price_effective_date>2011-09-01T16:00-08:00/2011-09-03T16:00-08:00</g:sale_price_effective_date>
			
			<!-- The following attributes are not required for this item, but supplying them is recommended if applicable -->
			<g:gtin>5060155240282</g:gtin>			
		</item>
	</channel>
</rss>

 

Loading

Add a Comment

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.