Skip to content

Commit 222f818

Browse files
committed
use plural resource name for file-download and outbound-link-click events
1 parent d33ab7a commit 222f818

File tree

6 files changed

+11
-11
lines changed

6 files changed

+11
-11
lines changed

pkg/handlers/events_file_download.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import (
1717
type PostEventsFileDownload fiber.Handler
1818

1919
// ProvidePostEventsFileDownload is a wire provider for POST
20-
// /api/v1/events/file-download handler.
20+
// /api/v1/events/file-downloads handler.
2121
func ProvidePostEventsFileDownload(
2222
eventStore eventstore.Service,
2323
saltManagerService saltmanager.Service,

pkg/handlers/events_outbound_link.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import (
1717
type PostEventsOutboundLink fiber.Handler
1818

1919
// ProvidePostEventsOutboundLink is a wire provider for POST
20-
// /api/v1/events/outbound-link handler.
20+
// /api/v1/events/outbound-links handler.
2121
func ProvidePostEventsOutboundLink(
2222
eventStore eventstore.Service,
2323
saltManagerService saltmanager.Service,

pkg/handlers/noscript_outbound_link.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import (
1717
type GetNoscriptEventsOutboundLink fiber.Handler
1818

1919
// ProvideGetNoscriptEventsOutboundLink is a wire provider for
20-
// GET /api/v1/noscript/events/outbound-link handler.
20+
// GET /api/v1/noscript/events/outbound-links handler.
2121
func ProvideGetNoscriptEventsOutboundLink(
2222
eventStore eventstore.Service,
2323
sessionStorage sessionstorage.Service,

pkg/wired/fiber.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,10 @@ func ProvideFiber(
4949
app.Post("/api/v1/events/custom/:name", fiber.Handler(postCustomEventHandler))
5050
app.Get("/api/v1/noscript/events/custom/:name", fiber.Handler(getNoscriptCustomEventHandler))
5151

52-
app.Post("/api/v1/events/outbound-link", fiber.Handler(postOutboundLinkEventHandler))
53-
app.Get("/api/v1/noscript/events/outbound-link", fiber.Handler(getNoscriptOutboundLinkEventHandler))
52+
app.Post("/api/v1/events/outbound-links", fiber.Handler(postOutboundLinkEventHandler))
53+
app.Get("/api/v1/noscript/events/outbound-links", fiber.Handler(getNoscriptOutboundLinkEventHandler))
5454

55-
app.Post("/api/v1/events/file-download", fiber.Handler(postFileDownloadEventHandler))
55+
app.Post("/api/v1/events/file-downloads", fiber.Handler(postFileDownloadEventHandler))
5656

5757
return app
5858
}

tests/bun/const.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ export const PRISME_PAGEVIEWS_URL = PRISME_API_URL + '/events/pageviews'
66
export const PRISME_NOSCRIPT_PAGEVIEWS_URL = PRISME_API_URL + '/noscript/events/pageviews'
77
export const PRISME_CUSTOM_EVENTS_URL = PRISME_API_URL + '/events/custom'
88
export const PRISME_NOSCRIPT_CUSTOM_EVENTS_URL = PRISME_API_URL + '/noscript/events/custom'
9-
export const PRISME_OUTBOUND_LINK_EVENTS_URL = PRISME_API_URL + '/events/outbound-link'
10-
export const PRISME_NOSCRIPT_OUTBOUND_LINK_EVENTS_URL = PRISME_API_URL + '/noscript/events/outbound-link'
11-
export const PRISME_FILE_DOWNLOAD_EVENTS_URL = PRISME_API_URL + '/events/file-download'
9+
export const PRISME_OUTBOUND_LINK_EVENTS_URL = PRISME_API_URL + '/events/outbound-links'
10+
export const PRISME_NOSCRIPT_OUTBOUND_LINK_EVENTS_URL = PRISME_API_URL + '/noscript/events/outbound-links'
11+
export const PRISME_FILE_DOWNLOAD_EVENTS_URL = PRISME_API_URL + '/events/file-downloads'
1212

1313
export const PRISME_METRICS_URL = PRISME_ADMIN_URL + '/metrics'
1414

tracker/web_analytics.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,12 +147,12 @@
147147
}
148148

149149
// Send event.
150-
sendClickEvent("/outbound-link", url).finally(followLink)
150+
sendClickEvent("/outbound-links", url).finally(followLink)
151151
}
152152

153153
// File downloads.
154154
if (trackFileDownloads && anchor.getAttribute("download") !== null) {
155-
return sendClickEvent("/file-download", url)
155+
return sendClickEvent("/file-downloads", url)
156156
}
157157
}
158158

0 commit comments

Comments
 (0)