SightMap® Metrics API

Introduction

The SightMap® Metrics API provides third-party developers a consistent event API for gathering metric data from a SightMap® iFrame which can be tightly integrated into Google Analytics or similar platforms. This functions as part of the SightMap® JavaScript iFrame API.

The web page must listen for the desired metrics events and send the wanted data to the analytics platform of your choosing. This may be easily activated through your website provider, if available, or otherwise should be configured by a web developer familiar with JavaScript (see our Quick Start guide).

👍

The Metrics API only exposes the metric data, so it can be made compatible with any analytics platform.


metrics.unitMatches.impression

Fired when the SightMap application is first rendered.

{
    name: "metrics.unitMatches.impression",
    data: {
        units: [
            {
                id: "374030",
                mapId: "374030", // deprecated, use `id` instead
                unitNumber: "2-101",
                area: 1887,
                areaDisplay: "1,877 Sq. Ft.",
                price: 2315, // nullable
                priceDisplay: "$2,315", // nullable
                availableOn: "2018-09-14", // nullable
                availableOnDisplay: "Available Now", // nullable
                floor: {
                    id: "7961",
                    filterLabel: "Floor 1",
                    filterShortLabel: "1"
                },
                floorPlan: {
                    id: "25575",
                    name: "A2",
                    bedroomCount: 1,
                    bathroomCount: 1
                }
            },
            {
                id: "374030",
                mapId: "374030", // deprecated, use `id` instead
                unitNumber: "2-101",
                area: 1887,
                areaDisplay: "1,877 Sq. Ft.",
                price: 2315, // nullable
                priceDisplay: "$2,315", // nullable
                availableOn: "2018-09-14", // nullable
                availableOnDisplay: "Available Now", // nullable
                floor: {
                    id: "7961",
                    filterLabel: "Floor 1",
                    filterShortLabel: "1"
                },
                floorPlan: {
                    id: "25575",
                    name: "A2",
                    bedroomCount: 1,
                    bathroomCount: 1
                }
            }
        ]
    }
}
embed.on('metrics.unitMatches.impression', function (event) {
  console.log(event);
});

metrics.unitMatches.change

Fired when the units in the application change.

{
    name: "metrics.unitMatches.change",
    data: {
        units: [
            {
                id: "374030",
                mapId: "374030", // deprecated, use `id` instead
                unitNumber: "2-101",
                area: 1887,
                areaDisplay: "1,877 Sq. Ft.",
                price: 2315, // nullable
                priceDisplay: "$2,315", // nullable
                availableOn: "2018-09-14", // nullable
                availableOnDisplay: "Available Now", // nullable
                floor: {
                    id: "7961",
                    filterLabel: "Floor 1",
                    filterShortLabel: "1"
                },
                floorPlan: {
                    id: "25575",
                    name: "A2",
                    bedroomCount: 1,
                    bathroomCount: 1
                }
            },
            {
                id: "374030",
                mapId: "374030", // deprecated, use `id` instead
                unitNumber: "2-101",
                area: 1887,
                areaDisplay: "1,877 Sq. Ft.",
                price: 2315, // nullable
                priceDisplay: "$2,315", // nullable
                availableOn: "2018-09-14", // nullable
                availableOnDisplay: "Available Now", // nullable
                floor: {
                    id: "7961",
                    filterLabel: "Floor 1",
                    filterShortLabel: "1"
                },
                floorPlan: {
                    id: "25575",
                    name: "A2",
                    bedroomCount: 1,
                    bathroomCount: 1
                }
            }
        ]
    }
}
embed.on('metrics.unitMatches.change', function (event) {
  console.log(event);
});

metrics.unitList.impression

Fired when the unit list is first rendered.

{
    name: "metrics.unitList.impression",
    data: {
        units: [
            {
                id: "374030",
                mapId: "374030", // deprecated, use `id` instead
                unitNumber: "2-101",
                area: 1887,
                areaDisplay: "1,877 Sq. Ft.",
                price: 2315, // nullable
                priceDisplay: "$2,315", // nullable
                availableOn: "2018-09-14", // nullable
                availableOnDisplay: "Available Now", // nullable
                floor: {
                    id: "7961",
                    filterLabel: "Floor 1",
                    filterShortLabel: "1"
                },
                floorPlan: {
                    id: "25575",
                    name: "A2",
                    bedroomCount: 1,
                    bathroomCount: 1
                }
            },
            {
                id: "374030",
                mapId: "374030", // deprecated, use `id` instead
                unitNumber: "2-101",
                area: 1887,
                areaDisplay: "1,877 Sq. Ft.",
                price: 2315, // nullable
                priceDisplay: "$2,315", // nullable
                availableOn: "2018-09-14", // nullable
                availableOnDisplay: "Available Now", // nullable
                floor: {
                    id: "7961",
                    filterLabel: "Floor 1",
                    filterShortLabel: "1"
                },
                floorPlan: {
                    id: "25575",
                    name: "A2",
                    bedroomCount: 1,
                    bathroomCount: 1
                }
            }
        ]
    }
}
embed.on('metrics.unitList.impression', function (event) {
  console.log(event);
});

metrics.unitList.change

Fired when the units in the unit list change.

{
    name: "metrics.unitList.change",
    data: {
        units: [
            {
                id: "374030",
                mapId: "374030", // deprecated, use `id` instead
                unitNumber: "2-101",
                area: 1887,
                areaDisplay: "1,877 Sq. Ft.",
                price: 2315, // nullable
                priceDisplay: "$2,315", // nullable
                availableOn: "2018-09-14", // nullable
                availableOnDisplay: "Available Now", // nullable
                floor: {
                    id: "7961",
                    filterLabel: "Floor 1",
                    filterShortLabel: "1"
                },
                floorPlan: {
                    id: "25575",
                    name: "A2",
                    bedroomCount: 1,
                    bathroomCount: 1
                }
            },
            {
                id: "374030",
                mapId: "374030", // deprecated, use `id` instead
                unitNumber: "2-101",
                area: 1887,
                areaDisplay: "1,877 Sq. Ft.",
                price: 2315, // nullable
                priceDisplay: "$2,315", // nullable
                availableOn: "2018-09-14", // nullable
                availableOnDisplay: "Available Now", // nullable
                floor: {
                    id: "7961",
                    filterLabel: "Floor 1",
                    filterShortLabel: "1"
                },
                floorPlan: {
                    id: "25575",
                    name: "A2",
                    bedroomCount: 1,
                    bathroomCount: 1
                }
            }
        ]
    }
}
embed.on('metrics.unitList.change', function (event) {
  console.log(event);
});

metrics.filters.impression

Fired when the filters first render.

{
    "name": "metrics.filters.impression",
    "data": {
        "filters": [
            {
                "label": "Bedrooms",
                "name": "Bedrooms",
                "listSort": 2,
                "previousSelectedOptions": [
                    {
                        "label": "Any"
                    }
                ],
                "selectedOptions": [
                    {
                        "label": "Any"
                    }
                ]
            },
            {
                "label": "Bathrooms",
                "name": "Bathrooms",
                "listSort": 3,
                "previousSelectedOptions": [
                    {
                        "label": "Any"
                    }
                ],
                "selectedOptions": [
                    {
                        "label": "Any"
                    }
                ]
            },
            {
                "label": "Floor Plan",
                "name": "Floor Plan",
                "listSort": 4,
                "previousSelectedOptions": [
                    {
                        "label": "Any"
                    }
                ],
                "selectedOptions": [
                    {
                        "label": "Any"
                    }
                ]
            },
            {
                "label": "Unit Price",
                "name": "Unit Price",
                "listSort": 5,
                "previousSelectedOptions": [
                    {
                        "label": "Any"
                    }
                ],
                "selectedOptions": [
                    {
                        "label": "Any"
                    }
                ]
            },
            {
                "label": "Move In Date",
                "name": "Unit Move In",
                "listSort": 6,
                "previousSelectedOptions": [
                    {
                        "label": "Any"
                    }
                ],
                "selectedOptions": [
                    {
                        "label": "Any"
                    }
                ]
            },
            {
                "label": "Unit Area",
                "name": "Unit Area",
                "listSort": 7,
                "previousSelectedOptions": [
                    {
                        "label": "Any"
                    }
                ],
                "selectedOptions": [
                    {
                        "label": "Any"
                    }
                ]
            }
        ]
    }
}
embed.on('metrics.filters.impression', function(event) {
  console.log(event);
});

metrics.filters.change

Fired when the selected filter options change.

{
    "name": "metrics.filters.change",
    "data": {
        "filters": [
            {
                "label": "Bedrooms",
                "name": "Bedrooms",
                "listSort": 2,
                "previousSelectedOptions": [
                    {
                        "label": "Studio"
                    }
                ],
                "selectedOptions": [
                    {
                        "label": "Studio"
                    }
                ]
            },
            {
                "label": "Bathrooms",
                "name": "Bathrooms",
                "listSort": 3,
                "previousSelectedOptions": [
                    {
                        "label": "Any"
                    }
                ],
                "selectedOptions": [
                    {
                        "label": "Any"
                    }
                ]
            },
            {
                "label": "Floor Plan",
                "name": "Floor Plan",
                "listSort": 4,
                "previousSelectedOptions": [
                    {
                        "label": "Any"
                    }
                ],
                "selectedOptions": [
                    {
                        "label": "1 Bed 1 Bath"
                    }
                ]
            },
            {
                "label": "Unit Price",
                "name": "Unit Price",
                "listSort": 5,
                "previousSelectedOptions": [
                    {
                        "label": "Any"
                    }
                ],
                "selectedOptions": [
                    {
                        "label": "Any"
                    }
                ]
            },
            {
                "label": "Move In Date",
                "name": "Unit Move In",
                "listSort": 6,
                "previousSelectedOptions": [
                    {
                        "label": "Any"
                    }
                ],
                "selectedOptions": [
                    {
                        "label": "Any"
                    }
                ]
            },
            {
                "label": "Unit Area",
                "name": "Unit Area",
                "listSort": 7,
                "previousSelectedOptions": [
                    {
                        "label": "Any"
                    }
                ],
                "selectedOptions": [
                    {
                        "label": "Any"
                    }
                ]
            }
        ]
    }
}
embed.on('metrics.filters.change', function(event) {
  console.log(event);
});

metrics.unitList.unit.click

Fired when a user selects a unit from the unit list.

{
    name: "metrics.unitList.unit.click",
    data: {
        unit: {
            id: "374030",
            mapId: "374030", // deprecated, use `id` instead
            unitNumber: "2-101",
            area: 1887,
            areaDisplay: "1,877 Sq. Ft.",
            price: 2315, // nullable
            priceDisplay: "$2,315", // nullable
            availableOn: "2018-09-14", // nullable
            availableOnDisplay: "Available Now", // nullable
            floor: {
                id: "7961",
                filterLabel: "Floor 1",
                filterShortLabel: "1"
            },
            floorPlan: {
                id: "25575",
                name: "A2",
                bedroomCount: 1,
                bathroomCount: 1
            }
        }
    }
}
embed.on('metrics.unitList.unit.click', function (event) {
  console.log(event);
});

metrics.unitMap.unit.click

Fired when a user selects a unit from the unit map.

{
    name: "metrics.unitMap.unit.click",
    data: {
        unit: {
            id: "374030",
            mapId: "374030", // deprecated, use `id` instead
            unitNumber: "2-101",
            area: 1887,
            areaDisplay: "1,877 Sq. Ft.",
            price: 2315, // nullable
            priceDisplay: "$2,315", // nullable
            availableOn: "2018-09-14", // nullable
            availableOnDisplay: "Available Now", // nullable
            floor: {
                id: "7961",
                filterLabel: "Floor 1",
                filterShortLabel: "1"
            },
            floorPlan: {
                id: "25575",
                name: "A2",
                bedroomCount: 1,
                bathroomCount: 1
            }
        }
    }
}
embed.on('metrics.unitMap.unit.click', function (event) {
  console.log(event);
});

metrics.unitDetails.outbound.click

Fired when a user selects an outbound link call-to-action within the unit details modal.

{
    name: "metrics.unitDetails.outbound.click",
    data: {
        unit: {
            id: "374030",
            mapId: "374030", // deprecated, use `id` instead
            unitNumber: "2-101",
            area: 1887,
            areaDisplay: "1,877 Sq. Ft.",
            price: 2315, // nullable
            priceDisplay: "$2,315", // nullable
            availableOn: "2018-09-14", // nullable
            availableOnDisplay: "Available Now", // nullable
            floor: {
                id: "7961",
                filterLabel: "Floor 1",
                filterShortLabel: "1"
            },
            floorPlan: {
                id: "25575",
                name: "A2",
                bedroomCount: 1,
                bathroomCount: 1
            }
        },
        label: "Contact us", // nullable
        destinationUrl: "https://livemarisol.com/contact" // nullable
    }
}
embed.on('metrics.unitDetails.outbound.click', function (event) {
  console.log(event);
});

metrics.unitDetails.apply.click

Fired when a user selects the apply call-to-action within the unit details modal.

{
    name: "metrics.unitDetails.apply.click",
    data: {
        unit: {
            id: "374030",
            mapId: "374030", // deprecated, use `id` instead
            unitNumber: "2-101",
            area: 1887,
            areaDisplay: "1,877 Sq. Ft.",
            price: 2315, // nullable
            priceDisplay: "$2,315", // nullable
            availableOn: "2018-09-14", // nullable
            availableOnDisplay: "Available Now", // nullable
            floor: {
                id: "7961",
                filterLabel: "Floor 1",
                filterShortLabel: "1"
            },
            floorPlan: {
                id: "25575",
                name: "A2",
                bedroomCount: 1,
                bathroomCount: 1
            }
        },
        leaseTerm: 1, // nullable
        moveInDate: "2019-04-09",
        applyUrl: "https://livemarisol.com/apply/?SearchUrl=https%3A%2F%2Flivemarisol.com%2Fapply%2F&MoveInDate=2019-04-09&UnitId=278"
    }
}
embed.on('metrics.unitDetails.apply.click', function (event) {
  console.log(event);
});

metrics.geolocation.enable

Fired when a user selects to enable their geolocation on the SightMap.

{
	name: 'metrics.geolocation.enable',
	data: {
    location_found: true
  }
}
embed.on('metrics.geolocation.enable', function (event) {
  console.log(event);
});