-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Labels
Lead: @mekarpelesIssues overseen by Mek (Staff: Program Lead) [managed]Issues overseen by Mek (Staff: Program Lead) [managed]Needs: BreakdownThis big issue needs a checklist or subissues to describe a breakdown of work. [managed]This big issue needs a checklist or subissues to describe a breakdown of work. [managed]Needs: Staff / InternalReviewed a PR but don't have merge powers? Use this.Reviewed a PR but don't have merge powers? Use this.Priority: 2Important, as time permits. [managed]Important, as time permits. [managed]Type: Feature RequestIssue describes a feature or enhancement we'd like to implement. [managed]Issue describes a feature or enhancement we'd like to implement. [managed]
Milestone
Description
Feature Request
Problem / Opportunity
Right now we're forced to down-sample to 1% of of traffic for anonymized analytics.
We're losing out on the ability to measure how often searches are successful.
Drastically decreasing matomo/athena loads for bad bot traffic so we can turn matomo sampling to 100%
Proposal
- First, we will need to update our nginx js rules to flag/label requests we want to exclude.
- We will use this label + known user-agents to avoid loading matomo + athena.js
- We will update matomo rates with @scottbarnes so 100% of traffic is samples.
Breakdown
Related files
Refer to this map of common Endpoints:
- https://github.com/internetarchive/openlibrary/blob/master/openlibrary/plugins/openlibrary/code.py#L1223-L1288
- https://github.com/internetarchive/openlibrary/pull/10840/changes#diff-d239b09d34ba084e956069ed3302fbb496c1fe0a864054c404c1dbb1be60d2d7R22 from PR Feature: add matomo #10840 i.e.
openlibrary/templates/site/head.html
is_bot from https://github.com/internetarchive/openlibrary/blob/master/openlibrary/plugins/openlibrary/code.py#L1321-L1348 is already a web.ctx global
We do something similar, i.e. $if not is_bot(): in
openlibrary/openlibrary/templates/site/alert.html
Lines 1 to 2 in 11caa2a
| $if not is_bot(): | |
| $:render_template('site/donation_banner') |
Metadata
Metadata
Assignees
Labels
Lead: @mekarpelesIssues overseen by Mek (Staff: Program Lead) [managed]Issues overseen by Mek (Staff: Program Lead) [managed]Needs: BreakdownThis big issue needs a checklist or subissues to describe a breakdown of work. [managed]This big issue needs a checklist or subissues to describe a breakdown of work. [managed]Needs: Staff / InternalReviewed a PR but don't have merge powers? Use this.Reviewed a PR but don't have merge powers? Use this.Priority: 2Important, as time permits. [managed]Important, as time permits. [managed]Type: Feature RequestIssue describes a feature or enhancement we'd like to implement. [managed]Issue describes a feature or enhancement we'd like to implement. [managed]