SEO, AdWords, affiliates, advertising, and promotions
I have my Shopify products feeding by API to Google Merchant Center, but I would really like to sign up for the Local Inventory Ads.
To do so, I need a tab-delimited file with just a few product attributes included, to meet the qualifications for a Local Product Inventory feed. https://support.google.com/merchants/answer/3061342?hl=en&ref_topic=3052707
I have reviewed the process for creating a custom xml file but specificallly for the Local Product Inventory feed, Google requires it to be txt or tab-delimited. I have also found a github article for creating a tab-delimited file, but I don't know how to map the Shopify-defined attribute names to fit Google's requirements. More specifically I would need
Columns:
store_code, populated by a static number
itemid, populated with ID
price populated with price
quantity populated with inventory-quantity
availability populated with stock_status
Then I need this file as a feed updated every 24 hours.
Thanks for your assistance.
The issue you will find is getting the item ID. Whith shopify it uses the variant ID and the parent ID.
So you will see something like this shopify_GB_0316546131123_13216546461
I have looked around in Shopify and can't see an easy way to get these values when you export the product data.
You could try and download data from Google Merchant, see if there is anything available.
Hope it helps.
No I'm not having a hard time with finding the specific Shopify data tags, I can find those from the xml feed. What I'm hoping to find out is how to set up the code for the actual liquid file to create a tab delimited file with this information in it, with the column headers redefined with Google's tags. I see instructions on creating an xml file but not a tab delimited one. Also I need to know how to set it up so it updates every 24 hours.
Jenny
Any luck on this? I'm in the same boat. It's mind boggling that Google would make it this difficult. Seems like there should be an option to assign an inventory attribute to the primary feed if you've designated it as the local product feed in the first place. Even simpler, if GMB is synced with merchant center the products should show up there without even having to create a local inventory feed.
@CustomFurniture @Neighborly_Shop @Manisports
Here is a sample of how to create a CSV file:
https://business.czarto.com/2016/07/08/shopify-fix-your-google-analytics-product-performance-reports...
The code looks like this:
{% layout none %}{% paginate collection.products by 1000 %}ga:productSku,ga:productName,ga:productVariant{% for product in collection.products %}{% for variant in product.variants %}
{{ variant.sku }},{{ product.title | replace: ',','' | remove: '"' | remove: "'" | strip_html | strip }},{{variant.title | replace: ',','' | remove: '"' | remove: "'" | strip_html | strip }}{% endfor %}{% endfor %}{% endpaginate %}
It uses the same strategy of using a custom Collection template to output something other than HTML (plain text in this case). First line is the header, and second line is the data that gets looped-over. You *should* be able to use it to pump out a tab delimited file. Note, that you have to have all the liquid code on the same line (or possibly avoid line breaks with {%- syntax).
Note, that although the above code probably looks like it's on more than 2 lines, it's actually only on two lines. Take a better look at it here:
https://github.com/Czarto/ShopifyScripts/blob/master/Templates/collection.csv-ga-product-feed.liquid
Hope this helps,
Alex
As a business owner, have you ever wondered when your customer's first impression of yo...
By Skye Jun 6, 2023We're excited to announce improvements to the threaded messaging experience in our communi...
By TyW May 31, 2023Thank you to everyone who participated in our AMA with Klaviyo. It was great to see so man...
By Jacqui May 30, 2023