Skip to content

Commit d76aff1

Browse files
committed
Add pathOverwriter to playground
1 parent 1ff4434 commit d76aff1

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

playground/events.html

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,8 +238,13 @@ <h2>Automated events</h2>
238238
</script>
239239

240240
<script>
241+
function pathOverwriter(data) {
242+
console.info("pathOverwriter", data);
243+
return "/overwritter-by-pathOverwriter" + data.path;
244+
}
245+
241246
function appendMetadata(data) {
242-
console.info({ data });
247+
console.info("appendMetadata", data);
243248
if (data.type === "pageview")
244249
return {
245250
page_id: 123,
@@ -256,6 +261,7 @@ <h2>Automated events</h2>
256261
<script
257262
async
258263
data-allow-params="project"
264+
data-path-overwriter="pathOverwriter"
259265
data-metadata-collector="appendMetadata"
260266
data-hostname="playground.simpleanalytics.com"
261267
data-ignore-metrics="referrer,utm,country,session,timeonpage,scrolled,useragent,screensize,viewportsize,language"

0 commit comments

Comments
 (0)