Class CustomerAnalytics

A singleton class to access the Mappedin Analytics platform. Correct usage will improve Smart Search results, and lead to more accurate insights. This will be created for you as part of Mappedin.{{#crossLink "Mappedin/initialize:method"}}{{/crossLink}}, but you can also create one manually. You are mostly going to use locationSelected.

Hierarchy

  • CustomerAnalytics

Implements

  • IInternalAnalytics

Properties

BLUEDOT_EVENT: {
    ATTEMPT_BLUEDOT: string;
    FOUND_FLOOR: string;
    FOUND_POSITION: string;
}

Enum of valid bluedot events. Pass a property of this into the {{#crossLink "Analytics/trackBlueDotEvent:method"}}{{/crossLink}} method. Valid properties are: ATTEMPT_BLUEDOT, FOUND_POSITION, FOUND_FLOOR.

Type declaration

  • ATTEMPT_BLUEDOT: string
  • FOUND_FLOOR: string
  • FOUND_POSITION: string

Example

Analytics.trackBlueDotEvent(Analytics.BLUEDOT_EVENT.ATTEMPT_BLUEDOT)
instance: null | CustomerAnalytics

Methods

  • Whenever a category is selected, you should fire this event.

    Parameters

    • category: any

      {MappedinCategory} The category the user selected.

    Returns void

    Method

    categorySelected

  • Returns string

  • Whenever a user requests directions, you should fire this event.

    Parameters

    • start: any

      {MappedinLocation} The start location for wayfinding.

    • end: any

      {MappedinLocation} The end location for wayfinding.

    Returns void

    Method

    getDirections

  • Returns string

  • Whenever a location is selected, you should fire this event. What "selected" means can vary by venue, but a good rule of thumb is that you fire the event whenever you would show the location's details. Typically this is when the user taps it's polygon on the map, picks it from search results or a category list. or deep links directly into the map.

    Parameters

    • location: any

      {MappedinLocation} The location the user selected.

    Returns void

    Method

    locationSelected

  • Parameters

    • type: any
    • forced: any
    • benchmark: any
    • reason: any

    Returns void

  • Parameters

    • mode: any

      {Boolean} Indicates whether the user's geolocation is enabled.

    Returns void

  • Parameters

    • target: string
    • query: Record<string, any>

    Returns void

  • Track an event.

    Parameters

    • blueDotEvent: any

    Returns void

    Method

    trackBlueDotEvent

  • Parameters

    • searchAnalyticsObject: any

    Returns void

  • Parameters

    • searchAnalyticsObject: any

    Returns void

  • This method should be called whenever the user's position changes. This information will be sent when a track call is made.

    Parameters

    • position: undefined | AnalyticsUserPosition

      {AnalyticsUserPosition} The user's current position.

    Returns void

  • The static method to create a singleton instance of the Analytics class.

    Parameters

    • options: AnalyticsOptions

      {Object} A list of configuration options for the Analytics API.

    Returns CustomerAnalytics

    The singleton instance of the Analytics class.