Class CustomerAnalytics

A 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.

Param

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

Param

{String} The same key you are using for getVenue. Handled automatically in Mapview.initialize()

Param

{String} The same secret you are using for getVenue. Handled automatically in Mapview.initialize()

Param

{String} The same venue slug you are using for getVenue. Handled automatically in MapView.initialize()

Param

{String} The context to pass with the analytics request. Defaults to "websdk".

Param

{Boolean} Whether authentication should not be sent with analytics requests.

Param

{Boolean} Whether analytics events should be dropped because this is running in a test environment.

Hierarchy

  • CustomerAnalytics

Implements

  • IInternalAnalytics

Constructors

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)

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