Skip to main content

Google Merchant Center Data Source

Nexla's bi-directional connectors allow data to flow both to and from any location, making it simple to create a FlexFlow, DB-CDC, Spark ETL, or Replication data flow that ingests data from a Google Merchant Center location.
gmcontent_api.png

Google Merchant Center

Follow the instructions below to create a new data flow that ingests data from a Google Merchant Center source in Nexla.

Create a New Data Flow

  1. To create a new data flow, navigate to the Integrate section, and click the New Data Flow button. Then, select the desired flow type from the list, and click the Create button.

  2. Select the Google Merchant Center connector tile from the list of available connectors. Then, select the credential that will be used to connect to the Google Merchant Center account, and click Next; or, create a new Google Merchant Center credential for use in this flow.

  3. In Nexla, Google Merchant Center data sources can be created using pre-built endpoint templates, which expedite source setup for common Google Merchant Center endpoints. Each template is designed specifically for the corresponding Google Merchant Center endpoint, making source configuration easy and efficient.
    • To configure this source using a template, follow the instructions in Configure Using a Template.

    Google Merchant Center sources can also be configured manually, allowing you to ingest data from Google Merchant Center endpoints not included in the pre-built templates or apply further customizations to exactly suit your needs.
    • To configure this source manually, follow the instructions in Configure Manually.

Configure Using a Template

Nexla provides pre-built templates that can be used to rapidly configure data sources to ingest data from common Google Merchant Center endpoints. Each template is designed specifically for the corresponding Google Merchant Center endpoint, making data source setup easy and efficient.

Endpoint Settings

  • Select the endpoint from which this source will fetch data from the Endpoint pulldown menu. Available endpoint templates are listed in the expandable boxes below. Click on an endpoint to see more information about it and how to configure your data source for this endpoint.

    List Resources Of a Type

    List all resources of a type (ex: account, products, orders) in your Merchant Center account.

    • Enter your Google Merchant Center Merchant ID in the Merchant ID field. This is the ID of the managing account for fetching resources. The Merchant ID can be found in your Google Merchant Center account settings or in the URL when viewing your account.
    • Enter the type of resource you want to fetch in the Resource Type field. Common resource types include products, orders, accounts, etc. The default value is products if not specified. The resource type determines which type of data will be retrieved from your Merchant Center account.
    • The endpoint uses GET requests to https://shoppingcontent.googleapis.com/content/v2.1/{merchant_id}/{resource_type} where {merchant_id} is your Merchant ID and {resource_type} is the Resource Type you provide. The endpoint URL is automatically constructed based on the Google Merchant Center Content API base URL, the merchant ID, and the resource type.
    • The endpoint uses token-based pagination (iteration.type: paging.next.token) through the nextPageToken mechanism. The response data path is $.resources[*], which extracts all items from the resources array in the API response.

    This endpoint retrieves all resources of the specified type from your Merchant Center account. The endpoint supports pagination through the nextPageToken parameter, which allows you to retrieve large datasets efficiently. The response includes a nextPageToken field when more results are available, and Nexla automatically handles fetching additional pages. Common resource types include products for product listings, orders for order data, and accounts for account information. For detailed information about available resource types and the API response format, see the Google Merchant Center Content API documentation.

    Fetch Performance Metrics Report

    Retrieves merchant performance metrics matching the search query and optionally segmented by selected dimensions.

    • Enter your Google Merchant Center Merchant ID in the Merchant ID field. This is the ID of the merchant making the call. Must be a standalone account or an MCA subaccount. The Merchant ID can be found in your Google Merchant Center account settings or in the URL when viewing your account.
    • Enter the query string for the performance metrics report in the Query String field. This query defines the performance metrics to retrieve and dimensions according to which the metrics are to be segmented. The query should follow the SQL-like format used by the Google Merchant Center Performance Reports API. The default value is SELECT segments.program, segments.offer_id, metrics.impressions,metrics.clicks, metrics.ctr FROM MerchantPerformanceView if not specified.
    • The endpoint uses POST requests to https://shoppingcontent.googleapis.com/content/v2.1/{merchant_id}/reports/search where {merchant_id} is your Merchant ID you provide. The endpoint URL is automatically constructed based on the Google Merchant Center Content API base URL and the merchant ID.
    • The endpoint sends the query string in the request body as JSON with the format {"query": "{query_string}"}. The query string is automatically formatted according to the Google Merchant Center Performance Reports API specification.
    • The endpoint uses token-based pagination (iteration.type: paging.next.token) through the nextPageToken mechanism. The response data path is $.results[*], which extracts all items from the results array in the API response.

    This endpoint retrieves performance metrics reports from your Merchant Center account based on the query you provide. The query uses a SQL-like syntax to select metrics and dimensions from the MerchantPerformanceView. You can segment metrics by various dimensions such as program, offer_id, date, etc. Common metrics include impressions, clicks, CTR (click-through rate), conversions, and revenue. The endpoint supports pagination through the nextPageToken parameter, which allows you to retrieve large reports efficiently. For detailed information about query syntax, available metrics, and dimensions, see the Google Merchant Center Content API documentation.

    Fetch Authenticated User

    Returns information about the authenticated user.

    • This endpoint automatically retrieves information about the authenticated user from your Google Merchant Center account. No additional configuration is required beyond selecting this endpoint template.
    • The endpoint uses GET requests to https://shoppingcontent.googleapis.com/content/v2.1/accounts/authinfo. The endpoint URL is automatically constructed based on the Google Merchant Center Content API base URL.
    • The endpoint does not use pagination (iteration.type: static.url) and returns a single response. The response data path is $, which extracts the entire root-level object from the API response.

    This endpoint retrieves information about the authenticated user, including account details and available permissions. This is useful for verifying authentication and understanding what data you have access to. The endpoint returns a single response with user and account information. For detailed information about the response format and available fields, see the Google Merchant Center Content API documentation.

Configure Manually

Google Merchant Center data sources can be manually configured to ingest data from any valid Google Merchant Center API endpoint. Manual configuration provides maximum flexibility for accessing endpoints not covered by pre-built templates or when you need custom API configurations.

With manual configuration, you can also create more complex Google Merchant Center sources, such as sources that use custom query parameters, different HTTP methods, or custom data transformations.

Content Format

  1. Select the format in which the data from the Google Merchant Center API will be received from the Content Format pulldown menu. Nexla will automatically parse the data in the selected format. The Google Merchant Center Content API typically returns data in JSON format.

API Endpoint URL

  1. Enter the URL of the Google Merchant Center API endpoint from which this source will fetch data in the Set API URL field. This should be the complete URL including the protocol (https://) and any required path parameters. Google Merchant Center Content API endpoints typically follow the pattern https://shoppingcontent.googleapis.com/content/v2.1/{merchant_id}/{endpoint_path} where {merchant_id} is your Merchant Center Merchant ID.

Ensure the API endpoint URL is correct and accessible with your current credentials. You can test the endpoint using the Test button after configuring the URL. The endpoint requires OAuth2 authentication via the Authorization: Bearer {token} header, which is handled automatically by your credential configuration. For detailed information about Google Merchant Center API endpoints and available APIs, see the Google Merchant Center Content API documentation.