How tags and vars are mapped with Google Product Sync

How Product Feed attributes are mapped to tags and vars

Fields in your Google Product Feed can be mapped to a content field as a tag, a custom field, or both. Some fields are mapped to content fields automatically (primary fields). For additional fields in your Google Product Feed, you can manage how these are mapped to content fields.

Primary Field Mapping

Some of the fields defined in the Google Product Sync specification are automatically mapped to content fields. To view these primary fields, select Edit from the Google Product Sync home screen. This will show how these fields have been mapped to content fields, alongside sample Zephyr code for calling these fields. Google Product Sync primary fields

Additional Field Mapping

Additional fields from your Google Product Feed aren't automatically mapped to content fields. To view your feed, select Edit beside the feed from the Google Product Sync home screen. From there, configure these fields to map to tags, custom fields, or both. Google Product Sync additional fields Notes:
  • TSV/CSV formatted files - Any additional fields can be mapped to tags or custom fields.
  • XML formatted files - Only additional fields in your feed which are defined by the Google Product specification can be mapped to tags or custom fields.
  • Any non-alphanumeric characters (e.g. spaces) will be replaced with underscores.
  • Content tags have a 32 character limit. If you choose to map a field from your Google Product Feed to tags, only tags less than or equal to 32 characters will be added to your content items.

Call Feed Items with Zephyr

Custom Fields

For every field in your Google Product Feed mapped to a custom field, a custom field (aka "var") is created on the content called variants, which stores some of the attribute information from the product feed. This data type is an array to support duplicate URLs/variants in the product feed and ensure duplicated content isn't loaded into Sailthru (see Duplicate URLs). You can obtain the first item in the variants array in Zephyr as follows:
{variant = first(content.vars.variants)}
You can choose to map any additional fields in CSV/TSV formatted files which are not defined by the Google product data specification to custom fields, which will be automatically be included as vars on the variant object. For example, if you include a "custom product category" field in your TSV or CSV formatted product feed, you'll be able to access the value of that field in Zephyr like so:
{variant = first(content.vars.variants)}
{variant.custom_product_category}

Tags

For fields you choose to map as tags, a tag will be created on each content item containing only the value of the specified field. For instance, if you choose to map the "color" field, items will be tagged with their color.

Group all products in a feed with Feed-level Tags

Use feed-level tags to apply tags to all content items in your Google Product Feed. Feed-level tags allow you to know which source a content item came from, e.g. if you have different Google Product Feeds for US and New Zealand products. Using feed-level tags to label products from the US feed with "us" and product from the New Zealand feed with "nz" will make it easier to recommend only New Zealand products to your New Zealand audiences. To add a feed-level tag, navigate to the New Source page in Product Sync, and enter your tags (separated by commas) in the Tags for this source field: Google Product Sync feed-level tags

Tags in the Tags for this source field will be applied to each item imported from this source. In the instance above, all products imported from the Google Product Feed will have the tags this, that and the-other in all of the resulting content items.

Pull additional tags from your webpages with Meta Tags

If you've previously implemented <meta> tags in the HTML of your website content, but these tags are not present in your Google Product Feed, you can add these tags to your Sailthru content by selecting the Enable web tagging option. When web tagging is enabled for a Google Product Feed, we'll collect additional content tags from each product's page on your website.

There must be a <meta> tag with a name either sailthru.tags or keywords, with comma-separated tags in a content field for us to collect tags from the product's page, as described here. Note that when Web Tags is enabled, we will only collect tags, and no other metadata.

For example:
  • <meta name="sailthru.tags" content="red,triangular,soft"> will result in a content item with tags including red, triangular and soft
  • <meta name="keywords" content="blue,square,hard"> will result in a content item with tags including blue, square and hard

By default, when we're collecting these<meta> tags, we'll query your website at a maximum rate of 2 requests per second. If this seems like too much or too little for your use case, please don't hesitate to get in touch with our support team, and we'll do our best to help out.

Contact us

Top