Skip to content
This repository has been archived by the owner on Apr 25, 2024. It is now read-only.

Attribution event clicks are triple counted #1231

Closed
1 task
aldenstpage opened this issue Sep 29, 2020 · 2 comments · Fixed by #1232
Closed
1 task

Attribution event clicks are triple counted #1231

aldenstpage opened this issue Sep 29, 2020 · 2 comments · Fixed by #1232
Labels
💻 aspect: code Concerns the software code in the repository 🛠 goal: fix Bug fix 🟨 priority: medium Not blocking but should be fixed soon 🚦 status: awaiting triage Has not been triaged & therefore, not ready for work

Comments

@aldenstpage
Copy link
Contributor

aldenstpage commented Sep 29, 2020

Description

When a user clicks the "copy attribution" button, we register an event with our analytics API to help us figure out which works are embedded most frequently. It seems like the frontend registers this event 3 times when it ought to only be registered once.

Reproduction

  1. Open network debugging tab in your browser tools
  2. Navigate to the image detail page for any image
  3. Click "copy" button in the attribution panel
  4. See that 3 requests to the attribution event endpoint have been made

Expectation

The event should only be registered once (ideally clicking the copy button multiple times in the same session wouldn't trigger registration again)

Screenshots

Screenshot from 2020-09-29 10-43-39

Screenshot from 2020-09-29 10-43-56

Environment

  • Browser: Firefox 78.3.0esr (I suspect all browsers are affected)

Resolution

  • I would be interested in resolving this bug.
@aldenstpage aldenstpage added 🟨 priority: medium Not blocking but should be fixed soon 🚦 status: awaiting triage Has not been triaged & therefore, not ready for work 🛠 goal: fix Bug fix 💻 aspect: code Concerns the software code in the repository labels Sep 29, 2020
@cc-open-source-bot cc-open-source-bot added this to Pending Review in Backlog Sep 29, 2020
@aldenstpage
Copy link
Contributor Author

Additionally, it would be helpful if you could confirm that the event is always triple counted, as this will help us account for errors in our usage statistics.

@zackkrida
Copy link
Contributor

@aldenstpage The event is consistently tripled. The buttons have all incorrectly have the same id in html, and the copySuccess event which triggers the request to our analytics server fires once for each copy button on the page. Which, currently and historically, has been 3.

@kgodey kgodey removed this from Pending Review in Backlog Oct 1, 2020
@kgodey kgodey added this to Ready for Development in Active Sprint via automation Oct 1, 2020
@kgodey kgodey moved this from Ready for Development to Done in Active Sprint Oct 1, 2020
@TimidRobot TimidRobot removed this from Done in Active Sprint Jan 12, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
💻 aspect: code Concerns the software code in the repository 🛠 goal: fix Bug fix 🟨 priority: medium Not blocking but should be fixed soon 🚦 status: awaiting triage Has not been triaged & therefore, not ready for work
Development

Successfully merging a pull request may close this issue.

2 participants