Close httplib2 connections.
mutate(customerId, body=None, x__xgafv=None)
Creates, updates or removes conversion actions. Operation statuses are returned. List of thrown errors: [AuthenticationError]() [AuthorizationError]() [ConversionActionError]() [CurrencyCodeError]() [DatabaseError]() [FieldError]() [FieldMaskError]() [HeaderError]() [InternalError]() [MutateError]() [NewResourceCreationError]() [QuotaError]() [RangeError]() [RequestError]() [ResourceCountLimitExceededError]() [StringLengthError]()
close()
Close httplib2 connections.
mutate(customerId, body=None, x__xgafv=None)
Creates, updates or removes conversion actions. Operation statuses are returned. List of thrown errors: [AuthenticationError]() [AuthorizationError]() [ConversionActionError]() [CurrencyCodeError]() [DatabaseError]() [FieldError]() [FieldMaskError]() [HeaderError]() [InternalError]() [MutateError]() [NewResourceCreationError]() [QuotaError]() [RangeError]() [RequestError]() [ResourceCountLimitExceededError]() [StringLengthError]()
Args:
customerId: string, Required. The ID of the customer whose conversion actions are being modified. (required)
body: object, The request body.
The object takes the form of:
{ # Request message for ConversionActionService.MutateConversionActions.
"operations": [ # Required. The list of operations to perform on individual conversion actions.
{ # A single operation (create, update, remove) on a conversion action.
"create": { # A conversion action. # Create operation: No resource name is expected for the new conversion action.
"appId": "A String", # App ID for an app conversion action.
"attributionModelSettings": { # Settings related to this conversion action's attribution model. # Settings related to this conversion action's attribution model.
"attributionModel": "A String", # The attribution model type of this conversion action.
"dataDrivenModelStatus": "A String", # Output only. The status of the data-driven attribution model for the conversion action.
},
"category": "A String", # The category of conversions reported for this conversion action.
"clickThroughLookbackWindowDays": "A String", # The maximum number of days that may elapse between an interaction (for example, a click) and a conversion event.
"countingType": "A String", # How to count conversion events for the conversion action.
"creationTime": "A String", # Output only. Timestamp of the Floodlight activity's creation, formatted in ISO 8601.
"firebaseSettings": { # Settings related to a Firebase conversion action. # Output only. Firebase settings for Firebase conversion types.
"eventName": "A String", # Output only. The event name of a Firebase conversion.
"projectId": "A String", # Output only. The Firebase project ID of the conversion.
"propertyId": "A String", # Output only. The GA property ID of the conversion.
"propertyName": "A String", # Output only. The GA property name of the conversion.
},
"floodlightSettings": { # Settings related to a Floodlight conversion action. # Output only. Floodlight settings for Floodlight conversion types.
"activityGroupTag": "A String", # Output only. String used to identify a Floodlight activity group when reporting conversions.
"activityId": "A String", # Output only. ID of the Floodlight activity in DoubleClick Campaign Manager (DCM).
"activityTag": "A String", # Output only. String used to identify a Floodlight activity when reporting conversions.
},
"googleAnalytics4Settings": { # Settings related to a Google Analytics 4 conversion action. # Output only. Google Analytics 4 settings for Google Analytics 4 conversion types.
"eventName": "A String", # Output only. The name of the GA 4 event.
"propertyId": "A String", # Output only. The ID of the GA 4 property.
"propertyName": "A String", # Output only. The name of the GA 4 property.
},
"id": "A String", # Output only. The ID of the conversion action.
"includeInClientAccountConversionsMetric": True or False, # Whether this conversion action should be included in the "client_account_conversions" metric.
"includeInConversionsMetric": True or False, # Output only. Whether this conversion action should be included in the "conversions" metric.
"mobileAppVendor": "A String", # Output only. Mobile app vendor for an app conversion action.
"name": "A String", # The name of the conversion action. This field is required and should not be empty when creating new conversion actions.
"origin": "A String", # Output only. The conversion origin of this conversion action.
"ownerCustomer": "A String", # Output only. The resource name of the conversion action owner customer, or null if this is a system-defined conversion action.
"phoneCallDurationSeconds": "A String", # The phone call duration in seconds after which a conversion should be reported for this conversion action. The value must be between 0 and 10000, inclusive.
"primaryForGoal": True or False, # If a conversion action's primary_for_goal bit is false, the conversion action is non-biddable for all campaigns regardless of their customer conversion goal or campaign conversion goal. However, custom conversion goals do not respect primary_for_goal, so if a campaign has a custom conversion goal configured with a primary_for_goal = false conversion action, that conversion action is still biddable. By default, primary_for_goal will be true if not set. In V9, primary_for_goal can only be set to false after creation through an 'update' operation because it's not declared as optional.
"resourceName": "A String", # Immutable. The resource name of the conversion action. Conversion action resource names have the form: `customers/{customer_id}/conversionActions/{conversion_action_id}`
"status": "A String", # The status of this conversion action for conversion event accrual.
"tagSnippets": [ # Output only. The snippets used for tracking conversions.
{ # The site tag and event snippet pair for a TrackingCodeType.
"eventSnippet": "A String", # The event snippet that works with the site tag to track actions that should be counted as conversions.
"globalSiteTag": "A String", # The site tag that adds visitors to your basic remarketing lists and sets new cookies on your domain.
"pageFormat": "A String", # The format of the web page where the tracking tag and snippet will be installed, for example, HTML.
"type": "A String", # The type of the generated tag snippets for tracking conversions.
},
],
"thirdPartyAppAnalyticsSettings": { # Settings related to a third party app analytics conversion action. # Output only. Third Party App Analytics settings for third party conversion types.
"eventName": "A String", # Output only. The event name of a third-party app analytics conversion.
"providerName": "A String", # Output only. Name of the third-party app analytics provider.
},
"type": "A String", # Immutable. The type of this conversion action.
"valueSettings": { # Settings related to the value for conversion events associated with this conversion action. # Settings related to the value for conversion events associated with this conversion action.
"alwaysUseDefaultValue": True or False, # Controls whether the default value and default currency code are used in place of the value and currency code specified in conversion events for this conversion action.
"defaultCurrencyCode": "A String", # The currency code to use when conversion events for this conversion action are sent with an invalid or missing currency code, or when this conversion action is configured to always use the default value.
"defaultValue": 3.14, # The value to use when conversion events for this conversion action are sent with an invalid, disallowed or missing value, or when this conversion action is configured to always use the default value.
},
"viewThroughLookbackWindowDays": "A String", # The maximum number of days which may elapse between an impression and a conversion without an interaction.
},
"remove": "A String", # Remove operation: A resource name for the removed conversion action is expected, in this format: `customers/{customer_id}/conversionActions/{conversion_action_id}`
"update": { # A conversion action. # Update operation: The conversion action is expected to have a valid resource name.
"appId": "A String", # App ID for an app conversion action.
"attributionModelSettings": { # Settings related to this conversion action's attribution model. # Settings related to this conversion action's attribution model.
"attributionModel": "A String", # The attribution model type of this conversion action.
"dataDrivenModelStatus": "A String", # Output only. The status of the data-driven attribution model for the conversion action.
},
"category": "A String", # The category of conversions reported for this conversion action.
"clickThroughLookbackWindowDays": "A String", # The maximum number of days that may elapse between an interaction (for example, a click) and a conversion event.
"countingType": "A String", # How to count conversion events for the conversion action.
"creationTime": "A String", # Output only. Timestamp of the Floodlight activity's creation, formatted in ISO 8601.
"firebaseSettings": { # Settings related to a Firebase conversion action. # Output only. Firebase settings for Firebase conversion types.
"eventName": "A String", # Output only. The event name of a Firebase conversion.
"projectId": "A String", # Output only. The Firebase project ID of the conversion.
"propertyId": "A String", # Output only. The GA property ID of the conversion.
"propertyName": "A String", # Output only. The GA property name of the conversion.
},
"floodlightSettings": { # Settings related to a Floodlight conversion action. # Output only. Floodlight settings for Floodlight conversion types.
"activityGroupTag": "A String", # Output only. String used to identify a Floodlight activity group when reporting conversions.
"activityId": "A String", # Output only. ID of the Floodlight activity in DoubleClick Campaign Manager (DCM).
"activityTag": "A String", # Output only. String used to identify a Floodlight activity when reporting conversions.
},
"googleAnalytics4Settings": { # Settings related to a Google Analytics 4 conversion action. # Output only. Google Analytics 4 settings for Google Analytics 4 conversion types.
"eventName": "A String", # Output only. The name of the GA 4 event.
"propertyId": "A String", # Output only. The ID of the GA 4 property.
"propertyName": "A String", # Output only. The name of the GA 4 property.
},
"id": "A String", # Output only. The ID of the conversion action.
"includeInClientAccountConversionsMetric": True or False, # Whether this conversion action should be included in the "client_account_conversions" metric.
"includeInConversionsMetric": True or False, # Output only. Whether this conversion action should be included in the "conversions" metric.
"mobileAppVendor": "A String", # Output only. Mobile app vendor for an app conversion action.
"name": "A String", # The name of the conversion action. This field is required and should not be empty when creating new conversion actions.
"origin": "A String", # Output only. The conversion origin of this conversion action.
"ownerCustomer": "A String", # Output only. The resource name of the conversion action owner customer, or null if this is a system-defined conversion action.
"phoneCallDurationSeconds": "A String", # The phone call duration in seconds after which a conversion should be reported for this conversion action. The value must be between 0 and 10000, inclusive.
"primaryForGoal": True or False, # If a conversion action's primary_for_goal bit is false, the conversion action is non-biddable for all campaigns regardless of their customer conversion goal or campaign conversion goal. However, custom conversion goals do not respect primary_for_goal, so if a campaign has a custom conversion goal configured with a primary_for_goal = false conversion action, that conversion action is still biddable. By default, primary_for_goal will be true if not set. In V9, primary_for_goal can only be set to false after creation through an 'update' operation because it's not declared as optional.
"resourceName": "A String", # Immutable. The resource name of the conversion action. Conversion action resource names have the form: `customers/{customer_id}/conversionActions/{conversion_action_id}`
"status": "A String", # The status of this conversion action for conversion event accrual.
"tagSnippets": [ # Output only. The snippets used for tracking conversions.
{ # The site tag and event snippet pair for a TrackingCodeType.
"eventSnippet": "A String", # The event snippet that works with the site tag to track actions that should be counted as conversions.
"globalSiteTag": "A String", # The site tag that adds visitors to your basic remarketing lists and sets new cookies on your domain.
"pageFormat": "A String", # The format of the web page where the tracking tag and snippet will be installed, for example, HTML.
"type": "A String", # The type of the generated tag snippets for tracking conversions.
},
],
"thirdPartyAppAnalyticsSettings": { # Settings related to a third party app analytics conversion action. # Output only. Third Party App Analytics settings for third party conversion types.
"eventName": "A String", # Output only. The event name of a third-party app analytics conversion.
"providerName": "A String", # Output only. Name of the third-party app analytics provider.
},
"type": "A String", # Immutable. The type of this conversion action.
"valueSettings": { # Settings related to the value for conversion events associated with this conversion action. # Settings related to the value for conversion events associated with this conversion action.
"alwaysUseDefaultValue": True or False, # Controls whether the default value and default currency code are used in place of the value and currency code specified in conversion events for this conversion action.
"defaultCurrencyCode": "A String", # The currency code to use when conversion events for this conversion action are sent with an invalid or missing currency code, or when this conversion action is configured to always use the default value.
"defaultValue": 3.14, # The value to use when conversion events for this conversion action are sent with an invalid, disallowed or missing value, or when this conversion action is configured to always use the default value.
},
"viewThroughLookbackWindowDays": "A String", # The maximum number of days which may elapse between an impression and a conversion without an interaction.
},
"updateMask": "A String", # FieldMask that determines which resource fields are modified in an update.
},
],
"partialFailure": True or False, # If true, successful operations will be carried out and invalid operations will return errors. If false, all operations will be carried out in one transaction if and only if they are all valid. Default is false.
"responseContentType": "A String", # The response content type setting. Determines whether the mutable resource or just the resource name should be returned post mutation.
"validateOnly": True or False, # If true, the request is validated but not executed. Only errors are returned, not results.
}
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 ConversionActionService.MutateConversionActions.
"partialFailureError": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # Errors that pertain to operation failures in the partial failure mode. Returned only when partial_failure = true and all errors occur inside the operations. If any errors occur outside the operations (for example, auth errors), we return an RPC level error.
"code": 42, # The status code, which should be an enum value of google.rpc.Code.
"details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
{
"a_key": "", # Properties of the object. Contains field @type with type URL.
},
],
"message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
},
"results": [ # All results for the mutate.
{ # The result for the conversion action mutate.
"conversionAction": { # A conversion action. # The mutated conversion action with only mutable fields after mutate. The field will only be returned when response_content_type is set to "MUTABLE_RESOURCE".
"appId": "A String", # App ID for an app conversion action.
"attributionModelSettings": { # Settings related to this conversion action's attribution model. # Settings related to this conversion action's attribution model.
"attributionModel": "A String", # The attribution model type of this conversion action.
"dataDrivenModelStatus": "A String", # Output only. The status of the data-driven attribution model for the conversion action.
},
"category": "A String", # The category of conversions reported for this conversion action.
"clickThroughLookbackWindowDays": "A String", # The maximum number of days that may elapse between an interaction (for example, a click) and a conversion event.
"countingType": "A String", # How to count conversion events for the conversion action.
"creationTime": "A String", # Output only. Timestamp of the Floodlight activity's creation, formatted in ISO 8601.
"firebaseSettings": { # Settings related to a Firebase conversion action. # Output only. Firebase settings for Firebase conversion types.
"eventName": "A String", # Output only. The event name of a Firebase conversion.
"projectId": "A String", # Output only. The Firebase project ID of the conversion.
"propertyId": "A String", # Output only. The GA property ID of the conversion.
"propertyName": "A String", # Output only. The GA property name of the conversion.
},
"floodlightSettings": { # Settings related to a Floodlight conversion action. # Output only. Floodlight settings for Floodlight conversion types.
"activityGroupTag": "A String", # Output only. String used to identify a Floodlight activity group when reporting conversions.
"activityId": "A String", # Output only. ID of the Floodlight activity in DoubleClick Campaign Manager (DCM).
"activityTag": "A String", # Output only. String used to identify a Floodlight activity when reporting conversions.
},
"googleAnalytics4Settings": { # Settings related to a Google Analytics 4 conversion action. # Output only. Google Analytics 4 settings for Google Analytics 4 conversion types.
"eventName": "A String", # Output only. The name of the GA 4 event.
"propertyId": "A String", # Output only. The ID of the GA 4 property.
"propertyName": "A String", # Output only. The name of the GA 4 property.
},
"id": "A String", # Output only. The ID of the conversion action.
"includeInClientAccountConversionsMetric": True or False, # Whether this conversion action should be included in the "client_account_conversions" metric.
"includeInConversionsMetric": True or False, # Output only. Whether this conversion action should be included in the "conversions" metric.
"mobileAppVendor": "A String", # Output only. Mobile app vendor for an app conversion action.
"name": "A String", # The name of the conversion action. This field is required and should not be empty when creating new conversion actions.
"origin": "A String", # Output only. The conversion origin of this conversion action.
"ownerCustomer": "A String", # Output only. The resource name of the conversion action owner customer, or null if this is a system-defined conversion action.
"phoneCallDurationSeconds": "A String", # The phone call duration in seconds after which a conversion should be reported for this conversion action. The value must be between 0 and 10000, inclusive.
"primaryForGoal": True or False, # If a conversion action's primary_for_goal bit is false, the conversion action is non-biddable for all campaigns regardless of their customer conversion goal or campaign conversion goal. However, custom conversion goals do not respect primary_for_goal, so if a campaign has a custom conversion goal configured with a primary_for_goal = false conversion action, that conversion action is still biddable. By default, primary_for_goal will be true if not set. In V9, primary_for_goal can only be set to false after creation through an 'update' operation because it's not declared as optional.
"resourceName": "A String", # Immutable. The resource name of the conversion action. Conversion action resource names have the form: `customers/{customer_id}/conversionActions/{conversion_action_id}`
"status": "A String", # The status of this conversion action for conversion event accrual.
"tagSnippets": [ # Output only. The snippets used for tracking conversions.
{ # The site tag and event snippet pair for a TrackingCodeType.
"eventSnippet": "A String", # The event snippet that works with the site tag to track actions that should be counted as conversions.
"globalSiteTag": "A String", # The site tag that adds visitors to your basic remarketing lists and sets new cookies on your domain.
"pageFormat": "A String", # The format of the web page where the tracking tag and snippet will be installed, for example, HTML.
"type": "A String", # The type of the generated tag snippets for tracking conversions.
},
],
"thirdPartyAppAnalyticsSettings": { # Settings related to a third party app analytics conversion action. # Output only. Third Party App Analytics settings for third party conversion types.
"eventName": "A String", # Output only. The event name of a third-party app analytics conversion.
"providerName": "A String", # Output only. Name of the third-party app analytics provider.
},
"type": "A String", # Immutable. The type of this conversion action.
"valueSettings": { # Settings related to the value for conversion events associated with this conversion action. # Settings related to the value for conversion events associated with this conversion action.
"alwaysUseDefaultValue": True or False, # Controls whether the default value and default currency code are used in place of the value and currency code specified in conversion events for this conversion action.
"defaultCurrencyCode": "A String", # The currency code to use when conversion events for this conversion action are sent with an invalid or missing currency code, or when this conversion action is configured to always use the default value.
"defaultValue": 3.14, # The value to use when conversion events for this conversion action are sent with an invalid, disallowed or missing value, or when this conversion action is configured to always use the default value.
},
"viewThroughLookbackWindowDays": "A String", # The maximum number of days which may elapse between an impression and a conversion without an interaction.
},
"resourceName": "A String", # Returned for successful operations.
},
],
}