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.



3523
3524
3525
# File 'lib/google/apis/content_v2_1/classes.rb', line 3523

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)


3496
3497
3498
# File 'lib/google/apis/content_v2_1/classes.rb', line 3496

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)


3502
3503
3504
# File 'lib/google/apis/content_v2_1/classes.rb', line 3502

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



3508
3509
3510
# File 'lib/google/apis/content_v2_1/classes.rb', line 3508

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



3515
3516
3517
# File 'lib/google/apis/content_v2_1/classes.rb', line 3515

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)


3521
3522
3523
# File 'lib/google/apis/content_v2_1/classes.rb', line 3521

def state
  @state
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3528
3529
3530
3531
3532
3533
3534
# File 'lib/google/apis/content_v2_1/classes.rb', line 3528

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