Class: Google::Apis::AnalyticsV3::Goal

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/analytics_v3/classes.rb,
generated/google/apis/analytics_v3/representations.rb,
generated/google/apis/analytics_v3/representations.rb

Overview

JSON template for Analytics goal resource.

Defined Under Namespace

Classes: EventDetails, ParentLink, UrlDestinationDetails, VisitNumPagesDetails, VisitTimeOnSiteDetails

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ Goal

Returns a new instance of Goal.



2877
2878
2879
# File 'generated/google/apis/analytics_v3/classes.rb', line 2877

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

Instance Attribute Details

#account_idString

Account ID to which this goal belongs. Corresponds to the JSON property accountId

Returns:

  • (String)


2786
2787
2788
# File 'generated/google/apis/analytics_v3/classes.rb', line 2786

def 
  @account_id
end

#activeBoolean Also known as: active?

Determines whether this goal is active. Corresponds to the JSON property active

Returns:

  • (Boolean)


2791
2792
2793
# File 'generated/google/apis/analytics_v3/classes.rb', line 2791

def active
  @active
end

#createdDateTime

Time this goal was created. Corresponds to the JSON property created

Returns:

  • (DateTime)


2797
2798
2799
# File 'generated/google/apis/analytics_v3/classes.rb', line 2797

def created
  @created
end

#event_detailsGoogle::Apis::AnalyticsV3::Goal::EventDetails

Details for the goal of the type EVENT. Corresponds to the JSON property eventDetails



2802
2803
2804
# File 'generated/google/apis/analytics_v3/classes.rb', line 2802

def event_details
  @event_details
end

#idString

Goal ID. Corresponds to the JSON property id

Returns:

  • (String)


2807
2808
2809
# File 'generated/google/apis/analytics_v3/classes.rb', line 2807

def id
  @id
end

#internal_web_property_idString

Internal ID for the web property to which this goal belongs. Corresponds to the JSON property internalWebPropertyId

Returns:

  • (String)


2812
2813
2814
# File 'generated/google/apis/analytics_v3/classes.rb', line 2812

def internal_web_property_id
  @internal_web_property_id
end

#kindString

Resource type for an Analytics goal. Corresponds to the JSON property kind

Returns:

  • (String)


2817
2818
2819
# File 'generated/google/apis/analytics_v3/classes.rb', line 2817

def kind
  @kind
end

#nameString

Goal name. Corresponds to the JSON property name

Returns:

  • (String)


2822
2823
2824
# File 'generated/google/apis/analytics_v3/classes.rb', line 2822

def name
  @name
end

Parent link for a goal. Points to the view (profile) to which this goal belongs. Corresponds to the JSON property parentLink



2828
2829
2830
# File 'generated/google/apis/analytics_v3/classes.rb', line 2828

def parent_link
  @parent_link
end

#profile_idString

View (Profile) ID to which this goal belongs. Corresponds to the JSON property profileId

Returns:

  • (String)


2833
2834
2835
# File 'generated/google/apis/analytics_v3/classes.rb', line 2833

def profile_id
  @profile_id
end

Link for this goal. Corresponds to the JSON property selfLink

Returns:

  • (String)


2838
2839
2840
# File 'generated/google/apis/analytics_v3/classes.rb', line 2838

def self_link
  @self_link
end

#typeString

Goal type. Possible values are URL_DESTINATION, VISIT_TIME_ON_SITE, VISIT_NUM_PAGES, AND EVENT. Corresponds to the JSON property type

Returns:

  • (String)


2844
2845
2846
# File 'generated/google/apis/analytics_v3/classes.rb', line 2844

def type
  @type
end

#updatedDateTime

Time this goal was last modified. Corresponds to the JSON property updated

Returns:

  • (DateTime)


2849
2850
2851
# File 'generated/google/apis/analytics_v3/classes.rb', line 2849

def updated
  @updated
end

#url_destination_detailsGoogle::Apis::AnalyticsV3::Goal::UrlDestinationDetails

Details for the goal of the type URL_DESTINATION. Corresponds to the JSON property urlDestinationDetails



2854
2855
2856
# File 'generated/google/apis/analytics_v3/classes.rb', line 2854

def url_destination_details
  @url_destination_details
end

#valueFloat

Goal value. Corresponds to the JSON property value

Returns:

  • (Float)


2859
2860
2861
# File 'generated/google/apis/analytics_v3/classes.rb', line 2859

def value
  @value
end

#visit_num_pages_detailsGoogle::Apis::AnalyticsV3::Goal::VisitNumPagesDetails

Details for the goal of the type VISIT_NUM_PAGES. Corresponds to the JSON property visitNumPagesDetails



2864
2865
2866
# File 'generated/google/apis/analytics_v3/classes.rb', line 2864

def visit_num_pages_details
  @visit_num_pages_details
end

#visit_time_on_site_detailsGoogle::Apis::AnalyticsV3::Goal::VisitTimeOnSiteDetails

Details for the goal of the type VISIT_TIME_ON_SITE. Corresponds to the JSON property visitTimeOnSiteDetails



2869
2870
2871
# File 'generated/google/apis/analytics_v3/classes.rb', line 2869

def visit_time_on_site_details
  @visit_time_on_site_details
end

#web_property_idString

Web property ID to which this goal belongs. The web property ID is of the form UA-XXXXX-YY. Corresponds to the JSON property webPropertyId

Returns:

  • (String)


2875
2876
2877
# File 'generated/google/apis/analytics_v3/classes.rb', line 2875

def web_property_id
  @web_property_id
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
# File 'generated/google/apis/analytics_v3/classes.rb', line 2882

def update!(**args)
  @account_id = args[:account_id] if args.key?(:account_id)
  @active = args[:active] if args.key?(:active)
  @created = args[:created] if args.key?(:created)
  @event_details = args[:event_details] if args.key?(:event_details)
  @id = args[:id] if args.key?(:id)
  @internal_web_property_id = args[:internal_web_property_id] if args.key?(:internal_web_property_id)
  @kind = args[:kind] if args.key?(:kind)
  @name = args[:name] if args.key?(:name)
  @parent_link = args[:parent_link] if args.key?(:parent_link)
  @profile_id = args[:profile_id] if args.key?(:profile_id)
  @self_link = args[:self_link] if args.key?(:self_link)
  @type = args[:type] if args.key?(:type)
  @updated = args[:updated] if args.key?(:updated)
  @url_destination_details = args[:url_destination_details] if args.key?(:url_destination_details)
  @value = args[:value] if args.key?(:value)
  @visit_num_pages_details = args[:visit_num_pages_details] if args.key?(:visit_num_pages_details)
  @visit_time_on_site_details = args[:visit_time_on_site_details] if args.key?(:visit_time_on_site_details)
  @web_property_id = args[:web_property_id] if args.key?(:web_property_id)
end