diff --git a/src/App.tsx b/src/App.tsx
index e4cb73a..6b6f5c8 100644
--- a/src/App.tsx
+++ b/src/App.tsx
@@ -220,7 +220,15 @@ function App() {
if (response.length > 0) {
const location = response.pop();
- html = `${feature?.properties?.Name}`;
+
+ ReactGA.event({
+ category: "Link",
+ action: "click",
+ label: `${location!.title.rendered}`,
+ });
+
+ console.log(location!.title.rendered);
+ html = `${feature?.properties?.Name}`;
} else {
html = `${feature?.properties?.Name}`
}
@@ -230,6 +238,7 @@ function App() {
};
const onSearchResultClick = (result: GeoJsonProperties) => {
+ // console.log(result);
mapRef.current!.flyTo({
center: [
result!.properties.Longitude,
diff --git a/src/services/LocationService.ts b/src/services/LocationService.ts
index 026f6f6..8abadc4 100644
--- a/src/services/LocationService.ts
+++ b/src/services/LocationService.ts
@@ -5,6 +5,7 @@ export interface LocationResult {
slug: string;
status: string;
link: string;
+ title: {rendered: string};
}
export function SearchForLocation(location_name: string) {