REST Resource: accounts.conversionSources

Resource: ConversionSource

Represents a conversion source owned by a Merchant account. A merchant account can have up to 200 conversion sources.

JSON representation
{
  "name": string,
  "state": enum (State),
  "expireTime": string,
  "controller": enum (Controller),

  // Union field source_data can be only one of the following:
  "googleAnalyticsLink": {
    object (GoogleAnalyticsLink)
  },
  "merchantCenterDestination": {
    object (MerchantCenterDestination)
  }
  // End of list of possible types for union field source_data.
}
Fields
name

string

Output only. Identifier. 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.

state

enum (State)

Output only. Current state of this conversion source. Can't be edited through the API.

expireTime

string (Timestamp format)

Output only. The time when an archived conversion source becomes permanently deleted and is no longer available to undelete.

controller

enum (Controller)

Output only. Controller of the conversion source.

Union field source_data. Required. Conversion source data specific to each different type of source. source_data can be only one of the following:
merchantCenterDestination

object (MerchantCenterDestination)

Conversion Source of type "Merchant Center Tag Destination".

AttributionSettings

Represents attribution settings for conversion sources receiving pre-attribution data.

JSON representation
{
  "attributionLookbackWindowDays": integer,
  "attributionModel": enum (AttributionModel),
  "conversionType": [
    {
      object (ConversionType)
    }
  ]
}
Fields
attributionLookbackWindowDays

integer

Required. Lookback windows (in days) used for attribution in this source. Supported values are 7, 30, 40.

attributionModel

enum (AttributionModel)

Required. Attribution model.

conversionType[]

object (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.

AttributionModel

The attribution model used for this source. We support the same set of models offered by Google Analytics 4, as described in: https://support.google.com/analytics/answer/10596866.

Enums
ATTRIBUTION_MODEL_UNSPECIFIED Unspecified model.
CROSS_CHANNEL_LAST_CLICK Cross-channel Last Click model.
ADS_PREFERRED_LAST_CLICK Ads-preferred Last Click model.
CROSS_CHANNEL_DATA_DRIVEN Cross-channel Data Driven model.
CROSS_CHANNEL_FIRST_CLICK Cross-channel First Click model.
CROSS_CHANNEL_LINEAR Cross-channel Linear model.
CROSS_CHANNEL_POSITION_BASED Cross-channel Position Based model.
CROSS_CHANNEL_TIME_DECAY Cross-channel Time Decay model.

ConversionType

Message representing a types of conversion events

JSON representation
{
  "name": string,
  "report": boolean
}
Fields
name

string

Output only. Conversion event name, as it'll be reported by the client.

report

boolean

Output only. Option indicating if the type should be included in Merchant Center reporting.

MerchantCenterDestination

"Merchant Center Destination" sources can be used to send conversion events from an online store using a Google tag directly to a Merchant Center account where the source is created.

JSON representation
{
  "destination": string,
  "attributionSettings": {
    object (AttributionSettings)
  },
  "displayName": string,
  "currencyCode": string
}
Fields
destination

string

Output only. Merchant Center Destination ID.

attributionSettings

object (AttributionSettings)

Required. Attribution settings being used for the Merchant Center Destination.

displayName

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.

currencyCode

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.

State

Represents state of the conversion source.

Enums
STATE_UNSPECIFIED Conversion source has unspecified state.
ACTIVE Conversion source is fully functional.
ARCHIVED Conversion source has been archived in the last 30 days and not currently functional. Can be restored using the undelete method.
PENDING Conversion source creation has started but not fully finished yet.

Controller

Entity controlling the conversion source.

Enums
CONTROLLER_UNSPECIFIED Default value. This value is unused.
MERCHANT Controlled by the Merchant who owns the Conversion Source.
YOUTUBE_AFFILIATES Controlled by the YT Affiliates program.

Methods

create

Creates a new conversion source.

delete

Archives an existing conversion source.

get

Fetches a conversion source.

list

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

patch

Updates information of an existing conversion source.

undelete

Re-enables an archived conversion source.