Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ [amp-analytics] Add Custom Browser Event Tracker #35193

Merged
merged 37 commits into from
Aug 3, 2021

Conversation

kalemuw
Copy link
Contributor

@kalemuw kalemuw commented Jul 12, 2021

This PR add a new feature to track a customizable set of triggers that are not currently supported by amp-analytics.
Comes in reponse to #17878

Currently several events are defined to be tracked by the amp analytics component. However, as noted in the thread there are still several events that are not supported by amp-analytcis. This project begins the process of adding custom browser events and supports future needs for analytics data on events.

The changes are currently added as an experiment in the PR.

Changes:

  • In events.js
    - Add the custom browser event tracker for events blur and change
  • In test-custom-browser-events.js
    - Add test for CBE tracker.
    - Note: skipped over debounce to avoid waiting
  • In amp-cbe.amp.html
    - Test page with two input fields and two dropdown menu.
    - Tracks on-blur and on-change events on both elements.

Reviewer: @dmanek @alanorozco

extensions/amp-analytics/0.1/events.js Outdated Show resolved Hide resolved
extensions/amp-analytics/amp-analytics.md Outdated Show resolved Hide resolved
extensions/amp-analytics/amp-analytics.md Outdated Show resolved Hide resolved
@dmanek
Copy link
Contributor

dmanek commented Jul 12, 2021

Revert and re-sync package-lock.json. It's causing the large diff in the PR.

@kalemuw kalemuw marked this pull request as draft July 13, 2021 14:18
@lgtm-com
Copy link

lgtm-com bot commented Jul 13, 2021

This pull request introduces 1 alert when merging d0f9b9c into 5e3ae41 - view on LGTM.com

new alerts:

  • 1 for Unreachable statement

@kalemuw kalemuw marked this pull request as ready for review July 16, 2021 14:25
extensions/amp-analytics/0.1/events.js Outdated Show resolved Hide resolved
extensions/amp-analytics/0.1/events.js Show resolved Hide resolved
extensions/amp-analytics/0.1/events.js Outdated Show resolved Hide resolved
extensions/amp-analytics/0.1/events.js Outdated Show resolved Hide resolved
@dmanek dmanek requested review from alanorozco and removed request for rileyajones July 16, 2021 16:32
@kalemuw kalemuw requested a review from alanorozco July 29, 2021 21:32
extensions/amp-analytics/0.1/events.js Outdated Show resolved Hide resolved
extensions/amp-analytics/0.1/events.js Outdated Show resolved Hide resolved
extensions/amp-analytics/0.1/events.js Outdated Show resolved Hide resolved
extensions/amp-analytics/0.1/events.js Outdated Show resolved Hide resolved
extensions/amp-analytics/0.1/events.js Outdated Show resolved Hide resolved
@kalemuw kalemuw requested a review from alanorozco July 30, 2021 20:26
extensions/amp-analytics/0.1/events.js Outdated Show resolved Hide resolved
extensions/amp-analytics/0.1/events.js Outdated Show resolved Hide resolved
extensions/amp-analytics/0.1/events.js Outdated Show resolved Hide resolved
extensions/amp-analytics/0.1/events.js Outdated Show resolved Hide resolved
extensions/amp-analytics/0.1/events.js Outdated Show resolved Hide resolved
@kalemuw kalemuw requested a review from alanorozco August 2, 2021 20:33
extensions/amp-analytics/0.1/events.js Outdated Show resolved Hide resolved
tools/experiments/experiments-config.js Show resolved Hide resolved
Co-authored-by: Alan Orozco <alanorozco@users.noreply.github.com>
extensions/amp-analytics/0.1/events.js Outdated Show resolved Hide resolved
@dmanek dmanek merged commit 6a20f4c into ampproject:main Aug 3, 2021
westonruter added a commit to westonruter/amphtml that referenced this pull request Aug 3, 2021
…tok-validation

* 'main' of github.com:ampproject/amphtml: (72 commits)
  build: run amp lint --fix to address import order of jixie (ampproject#35513)
  ✨ [amp-analytics] Add Custom Browser Event Tracker (ampproject#35193)
  babel: teach amp mode transformer about #core/mode (ampproject#35477)
  🚮 Remove experiment `amp-consent-granular-consent` (ampproject#35508)
  ♻️ Enable auto-sorting+grouping within src/ and 3p/ (ampproject#35454)
  🐛  [amp-render] fix root-element stripping from amp-render with amp-bind (ampproject#35449)
  ✅ [Story interactive] Add Example Story for Detailed Results Component (ampproject#35450)
  🐛 Fix error on bento example (ampproject#35490)
  🐛 amp-story-grid-layer: Fix AMP invalidation error in documentation (ampproject#35503)
  🐛 Fix code formatting (ampproject#35499)
  ✅ buildDom: add tests for amp-fit-text and amp-layout (ampproject#35494)
  ♻️ Remove unused imports (ampproject#35435)
  ✨ amp-connatix-player: iframe domain based on a property (ampproject#35179)
  Updated document with use cases of remote config (ampproject#35496)
  AMP.goBack: update documentation (ampproject#29290)
  🏗 Allow the bundle-size job to run even if the builds were skipped (ampproject#35492)
  build-system: improve terser/esbuild integration (ampproject#35466)
  🧪 [Story performance] Disable animations on first page to 50% (ampproject#35476)
  📖 [Amp story] [Page attachments] Amp.dev Docs for New Page Attachment Features ampproject#34883 (ampproject#35338)
  🚀 [Story interactive] Rewrite Image URL to Cached URL for Image Quizzes and Polls (ampproject#35375)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants