This FAQ covers what you need to know about GTIN.

What you need to know

Many marketplaces, including eBay and Google shopping feeds, require the retailer to supply the UPC/EAN/ISBN (collectively referred to as the GTIN, or commonly also known as the barcode) for all the products they want to list.  This field is a specific format and can't be "made up" by the retailer; it needs to be an officially assigned GTIN (see here for more details: Depending on the source region of a product, it may have a UPC (Universal Product Code - common in the U.S.), an EAN (European Article Numer) or if it's a media product such as a book or a DVD, an ISBN (International Standard Book Number).

To ensure you are providing the GTIN, you will need to assign it as follows in WooCommerce.  If you have a custom product or you are selling own-brand items there may not be a UPC for that product. You will need to check that the marketplace will allow you to still list based on its rules around which brands and categories of products are mandated to have a GTIN. The rules around which products are mandated to have a GTIN can be complex and vary per marketplace; your most reliable source of information are the listing errors that are returned when attempting to upload a product to a marketplace - look for GTIN-related error messages. If you believe your product should list, you will need to discuss your situation with the marketplace directly. In certain circumstances they may update their rules or give you additional feedback and suggestions on how to list without having a GTIN.

You can check GTIN existence here

Single-variant product

A simple single-variant product has a single GTIN associated with it.  Set it up as shown below, as a custom attribute of the product.  The name of the attribute must be one of UPC, EAN or ISBN, as appropriate.

Multi-variant product

Each variant needs to have its own GTIN assigned to it.  Each variant therefore needs its own value of the custom attribute, as shown below:

Then on the Variations tab you need to assign a GTIN to each variant: