Options
All
  • Public
  • Public/Protected
  • All
Menu

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 options

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

  • Analytics

Index

Constructors

  • new Analytics(options: AnalyticsOptions): Analytics
  • Parameters

    • options: AnalyticsOptions

    Returns Analytics

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.

property

BLUEDOT_EVENT {Object}

example

Analytics.trackBlueDotEvent(Analytics.BLUEDOT_EVENT.ATTEMPT_BLUEDOT)

Type declaration

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

Methods

  • categorySelected(category: any): void
  • Whenever a category is selected, you should fire this event.

    method

    categorySelected

    Parameters

    • category: any

      The category the user selected.

    Returns void

  • getDeviceID(): string
  • Returns string

  • getDirections(start: any, end: any): void
  • Whenever a user requests directions, you should fire this event.

    method

    getDirections

    Parameters

    • start: any

      The start location for wayfinding.

    • end: any

      The end location for wayfinding.

    Returns void

  • getSessionID(): string
  • Returns string

  • locationSelected(location: any): void
  • 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.

    method

    locationSelected

    Parameters

    • location: any

      The location the user selected.

    Returns void

  • mapViewLoaded(type: any, forced: any, benchmark: any, reason: any): void
  • Parameters

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

    Returns void

  • setGeolocationMode(mode: any): void
  • Parameters

    • mode: any

      Indicates whether the user's geolocation is enabled.

    Returns void

  • track(target: any, query: any): void
  • Parameters

    • target: any
    • query: any

    Returns void

  • trackBlueDotEvent(blueDotEvent: any): void
  • Track an event.

    method

    trackBlueDotEvent

    Parameters

    • blueDotEvent: any

    Returns void

  • trackSearch(searchAnalyticsObject: any): void
  • Parameters

    • searchAnalyticsObject: any

    Returns void

  • trackSearchSuggest(searchAnalyticsObject: any): void
  • Parameters

    • searchAnalyticsObject: any

    Returns void