> Documentation index: https://developers.google.com/maps/documentation/llms.txt

# PlaceAnalyticsEvent

    struct PlaceAnalyticsEvent

    extension PlaceAnalyticsEvent : Equatable, Hashable, Sendable, SendableMetatype

An analytics event reported by a Places UI Kit component.

Places UI Kit components deliver events to handlers registered with
`View.onPlaceAnalyticsEvent(_:)`.
- `


  ### [==(_:_:)](https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Structs/PlaceAnalyticsEvent.md.txt#/s:17GooglePlacesSwift19PlaceAnalyticsEventV2eeoiySbAC_ACtFZ)


  ` Returns a Boolean value indicating whether two values are equal.

  Equality is the inverse of inequality. For any values `a` and `b`,
  `a == b` implies that `a != b` is `false`.

  #### Declaration

  Swift

      static func == (a: PlaceAnalyticsEvent, b: PlaceAnalyticsEvent) -> Bool

- `


  ### [ComponentType](https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Structs/PlaceAnalyticsEvent/ComponentType.md.txt)


  ` The Places UI Kit components that report analytics events.

  #### Declaration

  Swift

      enum ComponentType

- `


  ### [ContentType](https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Structs/PlaceAnalyticsEvent/ContentType.md.txt)


  ` The configurable content areas of a component that a `PlaceAnalyticsEvent` can relate to.

  #### Declaration

  Swift

      enum ContentType

- `


  ### [Tag](https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Structs/PlaceAnalyticsEvent/Tag.md.txt)


  ` Tags that describe what happened in a `PlaceAnalyticsEvent`.

  Tags name the user's intent or destination rather than the control that triggered it, so the
  same action reports the same tags wherever it appears. Events combine several independent
  tags; for example, tapping the Directions button reports `click`, `directions`, and
  `outbound`.

  #### Declaration

  Swift

      enum Tag

- `


  ### [componentType](https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Structs/PlaceAnalyticsEvent.md.txt#/s:17GooglePlacesSwift19PlaceAnalyticsEventV13componentTypeSSvp)


  ` The Places UI Kit component that reported the event.

  One of the `PlaceAnalyticsEvent.ComponentType` constants, such as
  `PlaceAnalyticsEvent.ComponentType.placeDetailsCompact`.

  #### Declaration

  Swift

      var componentType: String

- `


  ### [contentType](https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Structs/PlaceAnalyticsEvent.md.txt#/s:17GooglePlacesSwift19PlaceAnalyticsEventV11contentTypeSSSgvp)


  ` The `PlaceAnalyticsEvent.ContentType` value of the configurable content area the event
  relates to, or `nil` if the event does not relate to a configurable content area.

  #### Declaration

  Swift

      var contentType: String?

- `


  ### [hash(into:)](https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Structs/PlaceAnalyticsEvent.md.txt#/s:17GooglePlacesSwift19PlaceAnalyticsEventV4hash4intoys6HasherVz_tF)


  ` Hashes the essential components of this value by feeding them into the
  given hasher.

  Implement this method to conform to the `Hashable` protocol. The
  components used for hashing must be the same as the components compared
  in your type's `==` operator implementation. Call `hasher.combine(_:)`
  with each of these components.
  Important

  In your implementation of `hash(into:)`,
  don't call `finalize()` on the `hasher` instance provided,
  or replace it with a different instance.
  Doing so may become a compile-time error in the future.

  #### Declaration

  Swift

      func hash(into hasher: inout Hasher)

- `


  ### [hashValue](https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Structs/PlaceAnalyticsEvent.md.txt#/s:17GooglePlacesSwift19PlaceAnalyticsEventV9hashValueSivp)


  ` The hash value.

  Hash values are not guaranteed to be equal across different executions of
  your program. Do not save hash values to use during a future execution.
  Important
  `hashValue` is deprecated as a `Hashable` requirement. To conform to `Hashable`, implement the `hash(into:)` requirement instead. The compiler provides an implementation for `hashValue` for you.

  #### Declaration

  Swift

      var hashValue: Int { get }

- `


  ### [init(componentType:tags:places:contentType:)](https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Structs/PlaceAnalyticsEvent.md.txt#/s:17GooglePlacesSwift19PlaceAnalyticsEventV13componentType4tags6places07contentH0ACSS_ShySSGSayAA0D0VGSSSgtcfc)


  ` Creates an analytics event.

  #### Declaration

  Swift

      init(componentType: String, tags: Set<String> = [], places: [Place] = [], contentType: String? = nil)

  #### Parameters

  |---|---|
  | ` componentType ` | The `PlaceAnalyticsEvent.ComponentType` value of the reporting component. |
  | ` tags ` | The `PlaceAnalyticsEvent.Tag` values that describe what happened. |
  | ` places ` | The place(s) the event applies to. |
  | ` contentType ` | The `PlaceAnalyticsEvent.ContentType` value of the related content area. |

- `


  ### [places](https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Structs/PlaceAnalyticsEvent.md.txt#/s:17GooglePlacesSwift19PlaceAnalyticsEventV6placesSayAA0D0VGvp)


  ` The place(s) the event applies to, or an empty array if no place is loaded.

  Each place contains only its ID, coordinate, and viewport.

  #### Declaration

  Swift

      var places: [Place]

- `


  ### [tags](https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Structs/PlaceAnalyticsEvent.md.txt#/s:17GooglePlacesSwift19PlaceAnalyticsEventV4tagsShySSGvp)


  ` The `PlaceAnalyticsEvent.Tag` values that describe what happened, such as
  `PlaceAnalyticsEvent.Tag.click` and `PlaceAnalyticsEvent.Tag.outbound`.

  Tags are independent of each other and have no order.

  #### Declaration

  Swift

      var tags: Set<String>