From d07b817a43725445bc707d37198b4a3b0ce51004 Mon Sep 17 00:00:00 2001 From: Ethan Gardner Date: Tue, 3 Dec 2024 16:57:21 -0500 Subject: [PATCH] Add Long Animation Frame (LoAF) attribution data (#8) * begin working on loaf attribution format * update tests for loaf attribution * add more props to loaf attribution * fix linting issue * code formatting * begin working on loaf attribution format * update tests for loaf attribution * add more props to loaf attribution * fix linting issue * code formatting * begin working on loaf attribution format * update tests for loaf attribution * add more props to loaf attribution * fix linting issue * code formatting * remove prepare script. install was hanging * correct typing issues * unflatten project directories and move tests. * add test for send to analytics * write send to analytics tests with gas4 spy * avoid aftereach in test. * add loaf attribution data --- demo/index.html | 31 +- package-lock.json | 4474 +++++++++++++---- package.json | 2 - .../format}/format-event-data.test.ts | 2 +- src/{ => format}/format-event-data.ts | 6 +- .../format-long-animation-frame-data.test.ts | 619 +++ .../format-long-animation-frame-data.ts | 133 + .../index.test.ts | 2 +- src/index.ts | 2 +- src/track/send-to-analytics.test.ts | 133 + src/{ => track}/send-to-analytics.ts | 10 +- vitest.config.ts | 2 +- 12 files changed, 4486 insertions(+), 930 deletions(-) rename {test/unit => src/format}/format-event-data.test.ts (99%) rename src/{ => format}/format-event-data.ts (94%) create mode 100644 src/format/format-long-animation-frame-data.test.ts create mode 100644 src/format/format-long-animation-frame-data.ts rename test/unit/dap-performance-addon.test.ts => src/index.test.ts (82%) create mode 100644 src/track/send-to-analytics.test.ts rename src/{ => track}/send-to-analytics.ts (79%) diff --git a/demo/index.html b/demo/index.html index b7cc06a..399d0c5 100644 --- a/demo/index.html +++ b/demo/index.html @@ -23,6 +23,30 @@ below. --> +
@@ -33,7 +57,10 @@

Demo page

-
+

+ +

+
shift down considerably after the image is loaded.

-