Content API for Shopping . conversionsources

Instance Methods

close()

Close httplib2 connections.

create(merchantId, body=None, x__xgafv=None)

Creates a new conversion source.

delete(merchantId, conversionSourceId, x__xgafv=None)

Archives an existing conversion source. It will be recoverable for 30 days. This archiving behavior is not typical in the Content API and unique to this service.

get(merchantId, conversionSourceId, x__xgafv=None)

Fetches a conversion source.

list(merchantId, pageSize=None, pageToken=None, showDeleted=None, x__xgafv=None)

Retrieves the list of conversion sources the caller has access to.

list_next()

Retrieves the next page of results.

patch(merchantId, conversionSourceId, body=None, updateMask=None, x__xgafv=None)

Updates information of an existing conversion source.

undelete(merchantId, conversionSourceId, body=None, x__xgafv=None)

Re-enables an archived conversion source.

Method Details

close()
Close httplib2 connections.
create(merchantId, body=None, x__xgafv=None)
Creates a new conversion source.

Args:
  merchantId: string, Required. The ID of the account that owns the new conversion source. (required)
  body: object, The request body.
    The object takes the form of:

{ # Represents a conversion source owned by a Merchant account. A merchant account can have up to 200 conversion sources.
  "conversionSourceId": "A String", # Output only. Generated by the Content API upon creation of a new `ConversionSource`. Format: [a-z]{4}:.+ The four characters before the colon represent the type of conversio source. Content after the colon represents the ID of the conversion source within that type. The ID of two different conversion sources might be the same across different types. The following type prefixes are supported: - galk: For GoogleAnalyticsLink sources. - mcdn: For MerchantCenterDestination sources.
  "expireTime": "A String", # Output only. The time when an archived conversion source becomes permanently deleted and is no longer available to undelete.
  "googleAnalyticsLink": { # "Google Analytics Link" sources can be used to get conversion data from an existing Google Analytics property into the linked Merchant Center account. # Immutable. Conversion Source of type "Link to Google Analytics Property".
    "attributionSettings": { # Represents attribution settings for conversion sources receiving pre-attribution data. # Output only. Attribution settings for the linked Google Analytics property.
      "attributionLookbackWindowInDays": 42, # Required. Lookback windows (in days) used for attribution in this source. Supported values are 7, 30, 40.
      "attributionModel": "A String", # Required. Attribution model.
      "conversionType": [ # Immutable. Unordered list. List of different conversion types a conversion event can be classified as. A standard "purchase" type will be automatically created if this list is empty at creation time.
        { # Message representing a types of conversion events
          "includeInReporting": True or False, # Output only. Option indicating if the type should be included in Merchant Center reporting.
          "name": "A String", # Output only. Conversion event name, as it'll be reported by the client.
        },
      ],
    },
    "propertyId": "A String", # Required. Immutable. ID of the Google Analytics property the merchant is linked to.
    "propertyName": "A String", # Output only. Name of the Google Analytics property the merchant is linked to.
  },
  "merchantCenterDestination": { # "Merchant Center Destination" sources can be used to send conversion events from a website using a Google tag directly to a Merchant Center account where the source is created. # Conversion Source of type "Merchant Center Tag Destination".
    "attributionSettings": { # Represents attribution settings for conversion sources receiving pre-attribution data. # Required. Attribution settings being used for the Merchant Center Destination.
      "attributionLookbackWindowInDays": 42, # Required. Lookback windows (in days) used for attribution in this source. Supported values are 7, 30, 40.
      "attributionModel": "A String", # Required. Attribution model.
      "conversionType": [ # Immutable. Unordered list. List of different conversion types a conversion event can be classified as. A standard "purchase" type will be automatically created if this list is empty at creation time.
        { # Message representing a types of conversion events
          "includeInReporting": True or False, # Output only. Option indicating if the type should be included in Merchant Center reporting.
          "name": "A String", # Output only. Conversion event name, as it'll be reported by the client.
        },
      ],
    },
    "currencyCode": "A String", # Required. Three-letter currency code (ISO 4217). The currency code defines in which currency the conversions sent to this destination will be reported in Merchant Center.
    "destinationId": "A String", # Output only. Merchant Center Destination ID.
    "displayName": "A String", # Required. Merchant-specified display name for the destination. This is the name that identifies the conversion source within the Merchant Center UI. Limited to 64 characters.
  },
  "state": "A String", # Output only. Current state of this conversion source. Can't be edited through the API.
}

  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Represents a conversion source owned by a Merchant account. A merchant account can have up to 200 conversion sources.
  "conversionSourceId": "A String", # Output only. Generated by the Content API upon creation of a new `ConversionSource`. Format: [a-z]{4}:.+ The four characters before the colon represent the type of conversio source. Content after the colon represents the ID of the conversion source within that type. The ID of two different conversion sources might be the same across different types. The following type prefixes are supported: - galk: For GoogleAnalyticsLink sources. - mcdn: For MerchantCenterDestination sources.
  "expireTime": "A String", # Output only. The time when an archived conversion source becomes permanently deleted and is no longer available to undelete.
  "googleAnalyticsLink": { # "Google Analytics Link" sources can be used to get conversion data from an existing Google Analytics property into the linked Merchant Center account. # Immutable. Conversion Source of type "Link to Google Analytics Property".
    "attributionSettings": { # Represents attribution settings for conversion sources receiving pre-attribution data. # Output only. Attribution settings for the linked Google Analytics property.
      "attributionLookbackWindowInDays": 42, # Required. Lookback windows (in days) used for attribution in this source. Supported values are 7, 30, 40.
      "attributionModel": "A String", # Required. Attribution model.
      "conversionType": [ # Immutable. Unordered list. List of different conversion types a conversion event can be classified as. A standard "purchase" type will be automatically created if this list is empty at creation time.
        { # Message representing a types of conversion events
          "includeInReporting": True or False, # Output only. Option indicating if the type should be included in Merchant Center reporting.
          "name": "A String", # Output only. Conversion event name, as it'll be reported by the client.
        },
      ],
    },
    "propertyId": "A String", # Required. Immutable. ID of the Google Analytics property the merchant is linked to.
    "propertyName": "A String", # Output only. Name of the Google Analytics property the merchant is linked to.
  },
  "merchantCenterDestination": { # "Merchant Center Destination" sources can be used to send conversion events from a website using a Google tag directly to a Merchant Center account where the source is created. # Conversion Source of type "Merchant Center Tag Destination".
    "attributionSettings": { # Represents attribution settings for conversion sources receiving pre-attribution data. # Required. Attribution settings being used for the Merchant Center Destination.
      "attributionLookbackWindowInDays": 42, # Required. Lookback windows (in days) used for attribution in this source. Supported values are 7, 30, 40.
      "attributionModel": "A String", # Required. Attribution model.
      "conversionType": [ # Immutable. Unordered list. List of different conversion types a conversion event can be classified as. A standard "purchase" type will be automatically created if this list is empty at creation time.
        { # Message representing a types of conversion events
          "includeInReporting": True or False, # Output only. Option indicating if the type should be included in Merchant Center reporting.
          "name": "A String", # Output only. Conversion event name, as it'll be reported by the client.
        },
      ],
    },
    "currencyCode": "A String", # Required. Three-letter currency code (ISO 4217). The currency code defines in which currency the conversions sent to this destination will be reported in Merchant Center.
    "destinationId": "A String", # Output only. Merchant Center Destination ID.
    "displayName": "A String", # Required. Merchant-specified display name for the destination. This is the name that identifies the conversion source within the Merchant Center UI. Limited to 64 characters.
  },
  "state": "A String", # Output only. Current state of this conversion source. Can't be edited through the API.
}
delete(merchantId, conversionSourceId, x__xgafv=None)
Archives an existing conversion source. It will be recoverable for 30 days. This archiving behavior is not typical in the Content API and unique to this service.

Args:
  merchantId: string, Required. The ID of the account that owns the new conversion source. (required)
  conversionSourceId: string, Required. The ID of the conversion source to be deleted. (required)
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format
get(merchantId, conversionSourceId, x__xgafv=None)
Fetches a conversion source.

Args:
  merchantId: string, Required. The ID of the account that owns the new conversion source. (required)
  conversionSourceId: string, Required. The REST ID of the collection. (required)
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Represents a conversion source owned by a Merchant account. A merchant account can have up to 200 conversion sources.
  "conversionSourceId": "A String", # Output only. Generated by the Content API upon creation of a new `ConversionSource`. Format: [a-z]{4}:.+ The four characters before the colon represent the type of conversio source. Content after the colon represents the ID of the conversion source within that type. The ID of two different conversion sources might be the same across different types. The following type prefixes are supported: - galk: For GoogleAnalyticsLink sources. - mcdn: For MerchantCenterDestination sources.
  "expireTime": "A String", # Output only. The time when an archived conversion source becomes permanently deleted and is no longer available to undelete.
  "googleAnalyticsLink": { # "Google Analytics Link" sources can be used to get conversion data from an existing Google Analytics property into the linked Merchant Center account. # Immutable. Conversion Source of type "Link to Google Analytics Property".
    "attributionSettings": { # Represents attribution settings for conversion sources receiving pre-attribution data. # Output only. Attribution settings for the linked Google Analytics property.
      "attributionLookbackWindowInDays": 42, # Required. Lookback windows (in days) used for attribution in this source. Supported values are 7, 30, 40.
      "attributionModel": "A String", # Required. Attribution model.
      "conversionType": [ # Immutable. Unordered list. List of different conversion types a conversion event can be classified as. A standard "purchase" type will be automatically created if this list is empty at creation time.
        { # Message representing a types of conversion events
          "includeInReporting": True or False, # Output only. Option indicating if the type should be included in Merchant Center reporting.
          "name": "A String", # Output only. Conversion event name, as it'll be reported by the client.
        },
      ],
    },
    "propertyId": "A String", # Required. Immutable. ID of the Google Analytics property the merchant is linked to.
    "propertyName": "A String", # Output only. Name of the Google Analytics property the merchant is linked to.
  },
  "merchantCenterDestination": { # "Merchant Center Destination" sources can be used to send conversion events from a website using a Google tag directly to a Merchant Center account where the source is created. # Conversion Source of type "Merchant Center Tag Destination".
    "attributionSettings": { # Represents attribution settings for conversion sources receiving pre-attribution data. # Required. Attribution settings being used for the Merchant Center Destination.
      "attributionLookbackWindowInDays": 42, # Required. Lookback windows (in days) used for attribution in this source. Supported values are 7, 30, 40.
      "attributionModel": "A String", # Required. Attribution model.
      "conversionType": [ # Immutable. Unordered list. List of different conversion types a conversion event can be classified as. A standard "purchase" type will be automatically created if this list is empty at creation time.
        { # Message representing a types of conversion events
          "includeInReporting": True or False, # Output only. Option indicating if the type should be included in Merchant Center reporting.
          "name": "A String", # Output only. Conversion event name, as it'll be reported by the client.
        },
      ],
    },
    "currencyCode": "A String", # Required. Three-letter currency code (ISO 4217). The currency code defines in which currency the conversions sent to this destination will be reported in Merchant Center.
    "destinationId": "A String", # Output only. Merchant Center Destination ID.
    "displayName": "A String", # Required. Merchant-specified display name for the destination. This is the name that identifies the conversion source within the Merchant Center UI. Limited to 64 characters.
  },
  "state": "A String", # Output only. Current state of this conversion source. Can't be edited through the API.
}
list(merchantId, pageSize=None, pageToken=None, showDeleted=None, x__xgafv=None)
Retrieves the list of conversion sources the caller has access to.

Args:
  merchantId: string, Required. The ID of the account that owns the new conversion source. (required)
  pageSize: integer, The maximum number of conversion sources to return in a page. If no `page_size` is specified, `100` is used as the default value. The maximum value is `200`. Values above `200` will be coerced to `200`. Regardless of pagination, at most `200` conversion sources are returned in total.
  pageToken: string, Page token.
  showDeleted: boolean, If true, also returns archived conversion sources.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Response message for the ListConversionSources method.
  "conversionSources": [ # List of conversion sources.
    { # Represents a conversion source owned by a Merchant account. A merchant account can have up to 200 conversion sources.
      "conversionSourceId": "A String", # Output only. Generated by the Content API upon creation of a new `ConversionSource`. Format: [a-z]{4}:.+ The four characters before the colon represent the type of conversio source. Content after the colon represents the ID of the conversion source within that type. The ID of two different conversion sources might be the same across different types. The following type prefixes are supported: - galk: For GoogleAnalyticsLink sources. - mcdn: For MerchantCenterDestination sources.
      "expireTime": "A String", # Output only. The time when an archived conversion source becomes permanently deleted and is no longer available to undelete.
      "googleAnalyticsLink": { # "Google Analytics Link" sources can be used to get conversion data from an existing Google Analytics property into the linked Merchant Center account. # Immutable. Conversion Source of type "Link to Google Analytics Property".
        "attributionSettings": { # Represents attribution settings for conversion sources receiving pre-attribution data. # Output only. Attribution settings for the linked Google Analytics property.
          "attributionLookbackWindowInDays": 42, # Required. Lookback windows (in days) used for attribution in this source. Supported values are 7, 30, 40.
          "attributionModel": "A String", # Required. Attribution model.
          "conversionType": [ # Immutable. Unordered list. List of different conversion types a conversion event can be classified as. A standard "purchase" type will be automatically created if this list is empty at creation time.
            { # Message representing a types of conversion events
              "includeInReporting": True or False, # Output only. Option indicating if the type should be included in Merchant Center reporting.
              "name": "A String", # Output only. Conversion event name, as it'll be reported by the client.
            },
          ],
        },
        "propertyId": "A String", # Required. Immutable. ID of the Google Analytics property the merchant is linked to.
        "propertyName": "A String", # Output only. Name of the Google Analytics property the merchant is linked to.
      },
      "merchantCenterDestination": { # "Merchant Center Destination" sources can be used to send conversion events from a website using a Google tag directly to a Merchant Center account where the source is created. # Conversion Source of type "Merchant Center Tag Destination".
        "attributionSettings": { # Represents attribution settings for conversion sources receiving pre-attribution data. # Required. Attribution settings being used for the Merchant Center Destination.
          "attributionLookbackWindowInDays": 42, # Required. Lookback windows (in days) used for attribution in this source. Supported values are 7, 30, 40.
          "attributionModel": "A String", # Required. Attribution model.
          "conversionType": [ # Immutable. Unordered list. List of different conversion types a conversion event can be classified as. A standard "purchase" type will be automatically created if this list is empty at creation time.
            { # Message representing a types of conversion events
              "includeInReporting": True or False, # Output only. Option indicating if the type should be included in Merchant Center reporting.
              "name": "A String", # Output only. Conversion event name, as it'll be reported by the client.
            },
          ],
        },
        "currencyCode": "A String", # Required. Three-letter currency code (ISO 4217). The currency code defines in which currency the conversions sent to this destination will be reported in Merchant Center.
        "destinationId": "A String", # Output only. Merchant Center Destination ID.
        "displayName": "A String", # Required. Merchant-specified display name for the destination. This is the name that identifies the conversion source within the Merchant Center UI. Limited to 64 characters.
      },
      "state": "A String", # Output only. Current state of this conversion source. Can't be edited through the API.
    },
  ],
  "nextPageToken": "A String", # Token to be used to fetch the next results page.
}
list_next()
Retrieves the next page of results.

        Args:
          previous_request: The request for the previous page. (required)
          previous_response: The response from the request for the previous page. (required)

        Returns:
          A request object that you can call 'execute()' on to request the next
          page. Returns None if there are no more items in the collection.
        
patch(merchantId, conversionSourceId, body=None, updateMask=None, x__xgafv=None)
Updates information of an existing conversion source.

Args:
  merchantId: string, Required. The ID of the account that owns the new conversion source. (required)
  conversionSourceId: string, Required. The ID of the conversion source to be updated. (required)
  body: object, The request body.
    The object takes the form of:

{ # Represents a conversion source owned by a Merchant account. A merchant account can have up to 200 conversion sources.
  "conversionSourceId": "A String", # Output only. Generated by the Content API upon creation of a new `ConversionSource`. Format: [a-z]{4}:.+ The four characters before the colon represent the type of conversio source. Content after the colon represents the ID of the conversion source within that type. The ID of two different conversion sources might be the same across different types. The following type prefixes are supported: - galk: For GoogleAnalyticsLink sources. - mcdn: For MerchantCenterDestination sources.
  "expireTime": "A String", # Output only. The time when an archived conversion source becomes permanently deleted and is no longer available to undelete.
  "googleAnalyticsLink": { # "Google Analytics Link" sources can be used to get conversion data from an existing Google Analytics property into the linked Merchant Center account. # Immutable. Conversion Source of type "Link to Google Analytics Property".
    "attributionSettings": { # Represents attribution settings for conversion sources receiving pre-attribution data. # Output only. Attribution settings for the linked Google Analytics property.
      "attributionLookbackWindowInDays": 42, # Required. Lookback windows (in days) used for attribution in this source. Supported values are 7, 30, 40.
      "attributionModel": "A String", # Required. Attribution model.
      "conversionType": [ # Immutable. Unordered list. List of different conversion types a conversion event can be classified as. A standard "purchase" type will be automatically created if this list is empty at creation time.
        { # Message representing a types of conversion events
          "includeInReporting": True or False, # Output only. Option indicating if the type should be included in Merchant Center reporting.
          "name": "A String", # Output only. Conversion event name, as it'll be reported by the client.
        },
      ],
    },
    "propertyId": "A String", # Required. Immutable. ID of the Google Analytics property the merchant is linked to.
    "propertyName": "A String", # Output only. Name of the Google Analytics property the merchant is linked to.
  },
  "merchantCenterDestination": { # "Merchant Center Destination" sources can be used to send conversion events from a website using a Google tag directly to a Merchant Center account where the source is created. # Conversion Source of type "Merchant Center Tag Destination".
    "attributionSettings": { # Represents attribution settings for conversion sources receiving pre-attribution data. # Required. Attribution settings being used for the Merchant Center Destination.
      "attributionLookbackWindowInDays": 42, # Required. Lookback windows (in days) used for attribution in this source. Supported values are 7, 30, 40.
      "attributionModel": "A String", # Required. Attribution model.
      "conversionType": [ # Immutable. Unordered list. List of different conversion types a conversion event can be classified as. A standard "purchase" type will be automatically created if this list is empty at creation time.
        { # Message representing a types of conversion events
          "includeInReporting": True or False, # Output only. Option indicating if the type should be included in Merchant Center reporting.
          "name": "A String", # Output only. Conversion event name, as it'll be reported by the client.
        },
      ],
    },
    "currencyCode": "A String", # Required. Three-letter currency code (ISO 4217). The currency code defines in which currency the conversions sent to this destination will be reported in Merchant Center.
    "destinationId": "A String", # Output only. Merchant Center Destination ID.
    "displayName": "A String", # Required. Merchant-specified display name for the destination. This is the name that identifies the conversion source within the Merchant Center UI. Limited to 64 characters.
  },
  "state": "A String", # Output only. Current state of this conversion source. Can't be edited through the API.
}

  updateMask: string, Required. List of fields being updated.
  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format

Returns:
  An object of the form:

    { # Represents a conversion source owned by a Merchant account. A merchant account can have up to 200 conversion sources.
  "conversionSourceId": "A String", # Output only. Generated by the Content API upon creation of a new `ConversionSource`. Format: [a-z]{4}:.+ The four characters before the colon represent the type of conversio source. Content after the colon represents the ID of the conversion source within that type. The ID of two different conversion sources might be the same across different types. The following type prefixes are supported: - galk: For GoogleAnalyticsLink sources. - mcdn: For MerchantCenterDestination sources.
  "expireTime": "A String", # Output only. The time when an archived conversion source becomes permanently deleted and is no longer available to undelete.
  "googleAnalyticsLink": { # "Google Analytics Link" sources can be used to get conversion data from an existing Google Analytics property into the linked Merchant Center account. # Immutable. Conversion Source of type "Link to Google Analytics Property".
    "attributionSettings": { # Represents attribution settings for conversion sources receiving pre-attribution data. # Output only. Attribution settings for the linked Google Analytics property.
      "attributionLookbackWindowInDays": 42, # Required. Lookback windows (in days) used for attribution in this source. Supported values are 7, 30, 40.
      "attributionModel": "A String", # Required. Attribution model.
      "conversionType": [ # Immutable. Unordered list. List of different conversion types a conversion event can be classified as. A standard "purchase" type will be automatically created if this list is empty at creation time.
        { # Message representing a types of conversion events
          "includeInReporting": True or False, # Output only. Option indicating if the type should be included in Merchant Center reporting.
          "name": "A String", # Output only. Conversion event name, as it'll be reported by the client.
        },
      ],
    },
    "propertyId": "A String", # Required. Immutable. ID of the Google Analytics property the merchant is linked to.
    "propertyName": "A String", # Output only. Name of the Google Analytics property the merchant is linked to.
  },
  "merchantCenterDestination": { # "Merchant Center Destination" sources can be used to send conversion events from a website using a Google tag directly to a Merchant Center account where the source is created. # Conversion Source of type "Merchant Center Tag Destination".
    "attributionSettings": { # Represents attribution settings for conversion sources receiving pre-attribution data. # Required. Attribution settings being used for the Merchant Center Destination.
      "attributionLookbackWindowInDays": 42, # Required. Lookback windows (in days) used for attribution in this source. Supported values are 7, 30, 40.
      "attributionModel": "A String", # Required. Attribution model.
      "conversionType": [ # Immutable. Unordered list. List of different conversion types a conversion event can be classified as. A standard "purchase" type will be automatically created if this list is empty at creation time.
        { # Message representing a types of conversion events
          "includeInReporting": True or False, # Output only. Option indicating if the type should be included in Merchant Center reporting.
          "name": "A String", # Output only. Conversion event name, as it'll be reported by the client.
        },
      ],
    },
    "currencyCode": "A String", # Required. Three-letter currency code (ISO 4217). The currency code defines in which currency the conversions sent to this destination will be reported in Merchant Center.
    "destinationId": "A String", # Output only. Merchant Center Destination ID.
    "displayName": "A String", # Required. Merchant-specified display name for the destination. This is the name that identifies the conversion source within the Merchant Center UI. Limited to 64 characters.
  },
  "state": "A String", # Output only. Current state of this conversion source. Can't be edited through the API.
}
undelete(merchantId, conversionSourceId, body=None, x__xgafv=None)
Re-enables an archived conversion source.

Args:
  merchantId: string, Required. The ID of the account that owns the new conversion source. (required)
  conversionSourceId: string, Required. The ID of the conversion source to be undeleted. (required)
  body: object, The request body.
    The object takes the form of:

{ # Request message for the UndeleteConversionSource method.
}

  x__xgafv: string, V1 error format.
    Allowed values
      1 - v1 error format
      2 - v2 error format