Back to Top

Guide for Magento 2 Google Shopping Feed

Updated 9 May 2024

Magento 2 Google Shopping Feed Extension provides store owners with the ability to show their products on the Google search page in a visual manner, next to all the competitors in line.

Allow Magento 2 (Adobe Commerce Cloud) store owners to create Google Product feeds for their store’s products, export the products to their Google Merchant account, and map the categories (many to many) in Magento with Google shopping feed categories.

Apart from this, the Google Feed is auto-updated once the product gets saved on the store end.

Watch the video to understand the extension:-

Module Configuration Settings

Searching for an experienced
Magento 2 Company ?
Find out More
yaso2a05nEY

Extension Workflow

A6kvGGDqzcI

Sign Up At Google Merchant Center

JB1JaC75WgI

Generating Client ID & Secret Key

rIXGEyAmJoM

Features

  • Store products add to Google Feed using content API.
  • Google Feed Auto-update on product save on store.
  • Using a cron schedule, export products to Google Shopping Feed automatically.
  • Dynamic Attribute mapping.
  • Map store category with Google shopping feed categories.
  • Many to Many Category mapping available.
  • Supports Simple, Virtual, Bundle Products, Downloadable, and Configurable product types.
  • Option to Authenticate the Merchant account of the user.
  • The product deleted at Magento is auto-deleted from the Google Feeds.
  • Set account ID in case of multiple accounts in the merchant center.
  • Products without identification number (MPM/ GTIN) admin can set as a custom product.
  • Individual products can export to the google shopping feed.
  • Store Product and Google Product Feed Map record grid.
  • One can export products to a Google Merchant Account through OAuth With and Without a Separate account.
  • Admin can also export products to a Google Merchant Account through service account With and Without a Separate account.

Note:  The authentication has been expire in every 2 hrs, so need to authenticate the user again.

Installation

Firstly, follow the below steps for installing the extension –

Step 1:

Unzip the respective extension zip and then move the “app” folder (inside “src” folder) into Magento root directory on the server.

google shopping feed magento 2 command-1

Step 2:

Moreover, run the below-mentioned commands in the Magento 2 root directory via the terminal.

First Command –

composer require google/apiclient

Second Command –

php bin/magento setup:upgrade

Third Command –

php bin/magento setup:di:compile

Fourth Command –

php bin/magento setup:static-content:deploy

For cron schedule run command:

php bin/magento cron:install
php bin/magento cron:run

Step 3:

Lastly, flush the cache and re-index all by navigating through System->Cache management.
google shopping feed magento 2 flush cache

Module Translation

Moreover, for translating the Google Shopping Feed for Magento 2 module language, please go to app>code>Webkul>GoogleShoppingFeed>i18n and edit the en_US.csv file.

Furthermore, translate the words on the right and upload the modified file to the same location.

The filename of the translated file should be according to the language and region code like de_DE.csv.

google shopping feed magento 2

How to get the Credentials – Client ID and Client Secret

Create APP, Get the Client Id & Secret:

1: Go to console.developers.google and log in using your Gmail ID. After login click a dropdown arrow for the Select a Project option.

APIs-Services-Google-API-Console-1-1-1

2: Click the NEW PROJECT option.

Select Project

3: Enter your project name and select the location and click the Create button.

New-Project-–-Google-API-Console-14: Select your created project and then click ENABLE APIS & SERVICES button.

Enable-APIs-and-Services-1

5: Now in the search box type in Shopping.

API-Library-Project2-Google-API-Console-3

6: The results will populate and then selectContent API for Shopping.

API-Library-Project2-result-1

On clicking the same, another page, Content API for Shopping will become visible as shown below.

Content-API-for-Shopping-page-1

7: After clicking on the “Enable” button now select the created app and then click on the Create Credentials button.

create-credentials-2-1

8: Now select OAuth client ID as shown below in the snapshot.

credentials2-4

9: Now on the next screen to create an OAuth client ID, you must first set a product type on the consent screen. For that, the admin will click on the “Configure consent screen”.

configure-consent-screen

Configure And Register The App

After that from the OAuth consent screen, the admin will choose how you want to configure and register your app, including your target users.

You can only associate one app with your project.

user-type_external-3

Selecting the user type will click on the “Create.

After clicking on the Create, now on the next screen, the admin needs to configure the consent screen for all applications in this project.

  1. The name of the app asking for consent.
  2. An image on the consent screen that will help users recognize your app.

oauth-consent-screen-2

After adding details under OAuth consent screen, click on Save an Continue. This takes your to the Scopes section.

Here, your can Add or Remove Scopes and further Save and Continue.

scopes-6

This takes you to the Optional Info Section, under which one can add the details necessary, and click on Save and Continue.

optional-info-1-1

This navigates to the Summary section, under which all the details are visible as shown in the image below.

summary-3

The one needs to click on the Back to Dashboard button. It navigates to the OAuth consent screen and displays the App name and its Verification Status and User Type.

verification-status-1

After that move to the credentials section again.

The admin will click on OAuth client ID as shown below in the snapshot.select-oauth-5

Step 10: Under Application, type selects the Web Application, under the Authorized redirect URIs enter the redirect URL

Now, click the Create button.

Note-

  • The authorization URL should be in this format: https://example.com/googleshoppingfeed/oauth/index/

credentials-1

Step 11: Now you can see the client id and the client secret key. Copy them into the module configuration settings.

oauth-client-created-1

Sign Up for Google Merchant:

1) Go to Merchant Center and click on the Sign-Up button.

Screenshot-14-3

2) login with your Gmail address that you have used for creating the credentials and click the Next button.

merchant-center-login

  3) As soon as one logs in, a Google Merchant Center page as shown in the image pop will display.

google-merchant-center-page-after-login

4) Navigate to the Enter your Business Information section and add the details as shown in the image. Tickmark the Terms and Conditions checkbox, and continue and proceed further.

enter-your-business-information

This navigates to the Google Merchant Center| Signup Complete page as shown below. Now the user must click on Continue.

Signup-complete-Merchant-Center-1

5) Now, you need to verify and claim your website URL. To do so, firstly you need to select the Settings from the dashboard.

Overview-Merchant-Center

6) After this under the tools section, the admin will select the Business Information option then Website.

screencapture-merchants-google-mc-overview-2020-11-05-19_17_07

7) Add URL against the Website URL field and click on Save.

Business-information-Merchant-Center

8) On doing so, another section, i.e. “Select an option so Google can help you verify your website” becomes visible.

9) Then choose the “Add Html tag and  Upload Html File” option, and clicking which the “Select a method” section opens up.

Confirm-the-online-store-of-your-business-Merchant-Center

Now follow the Upload HTML file to your website method.

Download the HTML file provided at the point no. 1

Now, using a file transfer wizard-like FileZilla transfer this file to where you have installed the Magento.

google shopping feed magento 2 verify and claim website

To Confirm this transfer, click the link provided at point no. 3 after which you can see the below-shown result.

google shopping feed magento 2 verify and claim websiteAfter the above steps click Verify URL button.

10) After clicking the Continue button in the image above, you can see that the website is verified and claimed. Lastly, click the Finish button.

google shopping feed magento 2 verify and claim websiteNow, you can see the Google Merchant Center dashboard.

Screenshot_9_-1

Module Configuration

After the successful installation, the admin can configure the module by navigating through Stores > Configuration > Webkul > Google Shopping Feed or Google Shopping Feeds > Configurations.

Under Google shopping Feed, the admin will find the following configurations-

  1. General Settings, and
  2. Default Configurations

General Settings

Under General Settings, the admin needs to configure the fields such as OAuth Consumer Key, OAuth Consumer Secret, Authenticate User, Export to Google Shop, and Google Merchant ID. 

magento2-google-shopping-feed

The admin can configure the General Settings under-


1. OAuth Consumer Key – Enter the OAuth consumer key that you received after registering at console.developers.google.com
2. OAuth Consumer Secret  – Enter the OAuth consumer secret that you received after registering at console.developers.google.

3. Authenticate User – Click here to authenticate your Google merchant account.

4. Export to Google Shop – Click here to export your products to the Google merchant account.

5. Google Merchant ID – The admin must enter the Google Merchant ID. Which the admin procures upon creating a new Google Merchant Account.

Default Configurations

Under Default Configurations

The admin needs to configure the fields such as Default Category, Weight Unit, Age Group, Product Available For, Product Condition, etc

google-feed-configure

The admin can configure the Default Configurations as under-

Default Category – Indicate the category of your item based on the Google product taxonomy. Categorizing your product helps ensure that your ad is shown with the right search results.

Weight Unit– Enter the weight unit that you are using for your store. It will be applicable to the items on Google feeds.

Age Group – Select the target age group of the item on Google feeds.

Product Available For – Select the target gender of the item on Google feeds.

Product Condition – Select the product conditions as – New, Refurbished, or Used.

Tax Apply on Ship – Select Yes or No.

Export Products for Each Store  – Select “Yes” if you want to export the products according to each store or else select “No”.

Google-shopping-feed-1

Conditions for Tax Apply on Ship Field.

If Tax Apply on Ship field is set as Yes as shown in the image below, the admin can further select two options, i.e. Global or As Product.

  • Condition 1- Choosing Tax Apply on Ship as Yes and Shipping Tax Apply as Global.

On choosing Tax Apply on Ship as Yes, another field, i.e. Shipping Tax Apply as shall become visible as shown in the image below.

The admin can either select Global or As Product against the Shipping Tax apply as field.

On choosing Global, another field namely, Tax Rate becomes visible, where the admin has to select the tax rate, for instance, 20 in this case.

This rate (for instance, 20) shall be applicable to all the products that display on the Google Shopping Feed site after the admin exports the products.

webkul-magento2-google-shopping-feed-default-configurations-choosing-tax-apply-as-yes-and-global

  • Condition 2- Choosing Tax Apply on Ship as Yes and Shipping Tax Apply as As Product.

On choosing Tax Apply on Ship as Yes, and selecting As Product against the Shipping Tax Apply as, the tax will be applicable Product Wise.

webkul-magento2-google-shopping-feed-default-configurations-choosing-tax-apply-as-yes-and-as-product

The admin can configure the Cron Schedule  as under-

Cron Schedule

Under Cron Schedule, the admin needs to configure the cron to export products  to google shopping feed.

Mode of Execution: Select “cron” if you want to export the products automatically on the schedule time else select “manually”

Cron Frequency: Select if you want to run the export job once a day, once a week, once every 15 days (fortnightly), once a month, or once every 90 days.

Start Time: Set the start time for the cron to start exporting the product.

google-feed-configure

When you will select “Weekly” then you have to select the day of the week.

google-feed-configure

When you will select “Monthly” then you have to enter date.

google-feed-configure

Furthermore, after setting up the configuration, click the Authenticate User button to authenticate your credentials.

Meanwhile, this brings up a pop-up, just select your email address or log in with your Google account to proceed further.

select-account

Now, the section that appears click the Allow button.

consent-allow

Lastly, you will see the Google merchant center account successfully authorized message just click on the Ok button. After that, just refresh the configuration page.

webkul google shopping feed magento 2 authenticate user

You can see the account is Authorized now.

Configuration-Settings-Stores-Magento-Admin-5

Workflow – Admin’s End

After the successful installation, the admin will be able to see the Google Shopping Feed menu option with mentioned sub-options :

  • Map Attribute
  • Map Category
  • Google Feeds Products
  • Configuration

magento2-google-shopping-feed

Map Attribute:

Under this section, the admin will be able to map the Google Merchant Account attributes with your Magento store attributes as shown below in the snapshot. Here, the admin can map the values, reset, and save the mapping data as required.

google shooping feed

After selecting the respective fields for the Google shopping feeds click the Save Mapping Data button to save the mapped data. After save, you see a confirmation message for the same.google shooping feed

Map Category:

Under this section, the admin will be able to find a list of all mapped categories, their details, and can map the categories of his Magento 2 store with the Google Merchant Account categories. The mapping here is basically a Many to Many mapping.Map Category

Further, to map a new category click the Map Category button in the snapshot above and this brings up the section to map the store categories with the Google Feed Category.

To map, select your store category and after that select the corresponding Google Shopping Category, it’s sub-categories if any as required.

Lastly, click the Save Mapping Data button to save the mapping and you can also see a success message for the same. Here, you can do a many-to-many mapping.

Map CategoryThe admin can also delete the mappings as required by first checking the mapping and then choosing the delete option from the Actions drop-down.

Delete OptionApart from the above options, the admin also needs to navigate to Catalog>Products>Add New Product. On the add new product page, navigate to the Google Shopping Feed Fields.

Here, the admin will find the Google shopping fields for which you need to select their corresponding values.

Moreover, these are the new attributes that have been added via the extension itself.

The user needs to select the values for them before saving the product otherwise the default values set in the admin panel will be applicable for these new attributes.

Google Shopping Feed Fields

Google Feed Products:

For this you will have to go through Google Shopping Feed > Google Feed Products Here admin can see all of the products which are exported to the Google Merchant Account with their details like Map ID, Google Feed ID, Magento Product ID & Expiring date.

webkul google shopping feed magento 2 authenticate user

How to export products according to store and Multiple languages?

In the configuration settings, we have the option for – Export Products For Each Store.

google-feed-configure

Here, the admin can select a “Yes” option for exporting the products according to store language to Google Shopping Feeds else select “No”.

How to Export Products to Google Merchant Account?

To export your Magento 2 products to the Google Merchant Account navigate to Stores>Configuration>Webkul>Google Shopping Feed.

Initially, after you have authenticated the user by entering the Client Id and the Client secret and then clicking the Authenticate User button, you will see Authorized check in front of it.

Now, to export the products just click on the Export to Google Shop button.

Export to Google Shop

Also, the admin can Export the products to Google Shopping field from the product list page by navigating to the Catalog>>Products. Further, the admin will select the only specific products that need to be exported rather than all products in the store.

After selecting the products, under the Action option, the admin will click on the Export Items On Google Feed.

Google Feed

Moreover, the user will see that the products will start syncing on the pop-up. Further the successful export, you will see the success message for the same.

Products export to Google shopping feed

Workflow at Google Merchant Account

After the admin has configured the extension, mapped the attributes, and categories, and exported the products to Google’s Merchant Account.

Google shopping feed

The exported products will be visible under the Products>List section.

List:

webkul google shopping feed magento 2 authenticate user

Final Attributes:

webkul google shopping feed magento 2 authenticate user

Export products through OAuth with a separate account

To export products through OAuth with a separate account, the admin first configures the module.

magento2-google-shopping-feed

Here the admin will:-

Enable – Enable the Module.

Allow Separate Accounts – Set Yes to separate Account.

Authorization Type- Set Authorization type to OAuth.

OAuth Consumer Key- Enters the OAuth Consumer Key.

OAuth Consumer Secret- Enter the OAuth Consumer Secret.

Google Merchant ID-  Enter the Google Merchant ID.

After completing all this the admin will save the configuration.

Merchant Accounts

After saving the configuration the admin will navigate to Google Shopping Feed -> Merchant Account Connect.

magento2-google-shopping-feed

Here the admin will add a new Merchant Account.

magento2-google-shopping-feed

To add a new merchant account the admin will:-

Store(s): The admin will select the store.

Merchant ID:  Enters the Merchant ID.

Then click on Save account.

magento2-google-shopping-feed

Now the admin will move to console.developers.google and log in using your Gmail ID.

Google_developer_console_1

Then Navigate to the OAuth consent Screen -> click on Add Users

magento2-google-shopping-feed

After clicking on Add User a new section will appear. Here you have to enter the Email ID.

magento2-google-shopping-feed

Then Click on Save.

The New Merchant account has been added. Now the store admin will edit the Merchant Account.

magento2-google-shopping-feed

Google Merchant Info

magento2-google-shopping-feed

Products

Here the admin will select the item from the product list and export item on Google Feed.

then click on the submit button.

magento2-google-shopping-feed

A new window will appear and all the selected items will move to the Google Feed.

Exporting product to google feed

Google Feed Products

You can check your Export product in Google Feed Products.

magento2-google-shopping-feed

Export Products Through a Service Account Without the Separate Account

To export products through service without a separate account, the admin first configures the module.

Here the admin will:-

Enable – Enable the Module.

Allow Separate Accounts – Set NO to separate Account.

Authorization Type- Set the Authorization type to Service Account.

Private Key- Enters the Private key.

Client EmailEnters the Client Email.

Client ID-  Enters the client ID.

Google Merchant ID-  Enter the Google Merchant ID.

After completing all this the admin will save the configuration.

 

magento2-google-shopping-feed

Credentials For Service Account

The admin will move to console.developers.google and log in using your Gmail ID.

Then the admin will navigate to Service Accounts -> Create Service Account.

magento2-google-shopping-feed

Then the admin will fill in the details to create a service account.

magento2-google-shopping-feed

After filling in all the details the admin will click on Done.

A new account will be created.

magento2-google-shopping-feed

Then the admin will navigate to the keys.

magento2-google-shopping-feed

Then Click on the Add key.

In the Dropdown menu select Create New Key. Admin will select JSON as a file type, to download the new key.

Then click on Create.

magento2-google-shopping-feed

Now the Key is downloaded.

magento2-google-shopping-feed

In the key admin will copy the Private key, Client ID, and Client Email in the module configuration.

magento2-google-shopping-feed

Adding Service Account Email.

The admin needs to visit the Google merchant center.

magento2-google-shopping-feed

Then click on the Sign In, then select the Sign In to Merchant Center.

After logging in to the merchant center, the admin will select the project and click on settings.

magento2-google-shopping-feed

Then click on Account Access.

magento2-google-shopping-feed

 

Then click on Add User And enter the Email ID provided in the JSON file.

magento2-google-shopping-feed

Select the user access. Then, click on the Save user.

magento2-google-shopping-feed

After saving the user is added successfully.

You can also check the verification status.

magento2-google-shopping-feed

 

Export Products Through a Service Account With a Separate Account

To export products through service with a separate account, the admin first configures the module.

Here the admin will:-

Enable – Enable the Module.

Allow Separate Accounts – Set Yes to separate Account.

Authorization Type- Set the Authorization type to Service Account.

Private Key- Enters the Private key.

Client EmailEnters the Client Email.

Client ID-  Enters the client ID.

Google Merchant ID-  Enter the Google Merchant ID.

magento2-google-shopping-feed

After completing all this the admin will save the configuration.

Merchant Accounts

After saving the configuration the admin will navigate to Google Shopping Feed -> Merchant Account Connect.

magento2-google-shopping-feed

Here the admin will add a new Merchant Account.

magento2-google-shopping-feed

To add a new merchant account  the admin will:-

Store(s): The admin will select the store.

Private key: Enter the private key.

Client ID: Enter the Client ID.

Client Email: Enter the Client Email.

Merchant ID:  Enters the Merchant ID.

module configuration

Then click on Save account.

Note: The Merchant Account Connect option is available for the admin only if the admin allows the separate account from the module configuration.

Note: To generate API credentials for a service account with a separate account is the same as for the Without Service Account.

Products

Here the admin will select the item from the product list and export the item on Google Feed.

then click on the submit button.

magento2-google-shopping-feed

A new window will appear and all the selected items will move to the Google Feed.

Exporting product to google feed

Google Feed Products

You can check your Export product in Google Feed Products.

Google shopping products

Also, you can watch your products on your Google Merchant Account.

webkul google shopping feed magento 2 authenticate user

Support

That’s all for the Google Shopping Feed For Magento 2 (Adobe Commerce Cloud). If you have any queries or doubts get back to us at [email protected] or raise a ticket at webkul.uvdesk.com.

Current Product Version - 4.0.6

Supported Framework Version - Magento 2.0.x, 2.1.x, 2.2.x,2.3.x, 2.4.x

Blog Version - Magento 2.0.x, 2.1.x, 2.2.x,2.3.x, 2.4.x
  • Version 2.0.x, 2.1.x, 2.2.x, 2.3.x, 2.4.x
  • Version 2.0.x , 2.1.x , 2.2.x , 2.3.x , 2.4.x
. . .

Leave a Comment

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


6 comments

  • Shaikh Sarfaraz Ali
    • Jyotsna Gautam (Moderator)
  • Dennis
    • Archana Tiwari (Moderator)
  • Jesper
    • Nishad Bhan (Moderator)
  • Back to Top

    Message Sent!

    If you have more details or questions, you can reply to the received confirmation email.

    Back to Home

    Table of Content