Class: Google::Apis::ContentV2_1::ConversionSource

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
lib/google/apis/content_v2_1/classes.rb,
lib/google/apis/content_v2_1/representations.rb,
lib/google/apis/content_v2_1/representations.rb

Overview

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ ConversionSource

Returns a new instance of ConversionSource.



3475
3476
3477
# File 'lib/google/apis/content_v2_1/classes.rb', line 3475

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#conversion_source_idString

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. Corresponds to the JSON property conversionSourceId

Returns:

  • (String)


3448
3449
3450
# File 'lib/google/apis/content_v2_1/classes.rb', line 3448

def conversion_source_id
  @conversion_source_id
end

#expire_timeString

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

Returns:

  • (String)


3454
3455
3456
# File 'lib/google/apis/content_v2_1/classes.rb', line 3454

def expire_time
  @expire_time
end

"Google Analytics Link" sources can be used to get conversion data from an existing Google Analytics property into the linked Merchant Center account. Corresponds to the JSON property googleAnalyticsLink



3460
3461
3462
# File 'lib/google/apis/content_v2_1/classes.rb', line 3460

def google_analytics_link
  @google_analytics_link
end

#merchant_center_destinationGoogle::Apis::ContentV2_1::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. Corresponds to the JSON property merchantCenterDestination



3467
3468
3469
# File 'lib/google/apis/content_v2_1/classes.rb', line 3467

def merchant_center_destination
  @merchant_center_destination
end

#stateString

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

Returns:

  • (String)


3473
3474
3475
# File 'lib/google/apis/content_v2_1/classes.rb', line 3473

def state
  @state
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3480
3481
3482
3483
3484
3485
3486
# File 'lib/google/apis/content_v2_1/classes.rb', line 3480

def update!(**args)
  @conversion_source_id = args[:conversion_source_id] if args.key?(:conversion_source_id)
  @expire_time = args[:expire_time] if args.key?(:expire_time)
  @google_analytics_link = args[:google_analytics_link] if args.key?(:google_analytics_link)
  @merchant_center_destination = args[:merchant_center_destination] if args.key?(:merchant_center_destination)
  @state = args[:state] if args.key?(:state)
end