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

feat: 5638 - 5 dimensions for matomo #5837

Merged
merged 6 commits into from
Nov 12, 2024

Conversation

monsieurtanuki
Copy link
Contributor

@monsieurtanuki monsieurtanuki commented Nov 11, 2024

What

Now we use 5 matomo dimensions for product tracking:

  • 'dimension1': language code
  • 'dimension2': country code
  • 'dimension3': is logged in? 'Y'/'N',
  • 'dimension4': app version
  • 'dimension5': productType

Fixes bug(s)

Impacted files

  • add_basic_details_page.dart: minor refactoring
  • add_new_product_page.dart: using new method trackProductEvent
  • add_other_details_page.dart: minor refactoring
  • analytics_helper.dart: new method trackProductEvent; added 5 dimensions to matomo event track methods
  • attribute_first_row_helper.dart: minor refactoring
  • barcode_product_query.dart: using new method trackProductEvent
  • edit_new_packagings.dart: minor refactoring
  • edit_ocr_page.dart: minor refactoring
  • edit_product_page.dart: minor refactoring
  • new_product_footer.dart: using new method trackProductEvent
  • nutrition_page_loaded.dart: minor refactoring
  • product_field_editor.dart: minor refactoring
  • product_image_gallery_view.dart: minor refactoring
  • product_incomplete_card.dart: using new method trackProductEvent
  • product_questions_widget.dart: using new method trackProductEvent
  • simple_input_page.dart: minor refactoring
  • summary_card.dart: using new method trackProductEvent

Impacted files:
* `add_basic_details_page.dart`: minor refactoring
* `add_new_product_page.dart`: using new method `trackProductEvent`
* `add_other_details_page.dart`: minor refactoring
* `analytics_helper.dart`: new method `trackProductEvent`; added 5 dimensions to matomo event track methods
* `attribute_first_row_helper.dart`: minor refactoring
* `barcode_product_query.dart`: using new method `trackProductEvent`
* `edit_new_packagings.dart`: minor refactoring
* `edit_ocr_page.dart`: minor refactoring
* `edit_product_page.dart`: minor refactoring
* `new_product_footer.dart`: using new method `trackProductEvent`
* `nutrition_page_loaded.dart`: minor refactoring
* `product_field_editor.dart`: minor refactoring
* `product_image_gallery_view.dart`: minor refactoring
* `product_incomplete_card.dart`: using new method `trackProductEvent`
* `product_questions_widget.dart`: using new method `trackProductEvent`
* `simple_input_page.dart`: minor refactoring
* `summary_card.dart`: using new method `trackProductEvent`
@github-actions github-actions bot added 🥫 Product page Product addition The easier it is to add a product and get Nutri-Score, Eco-Score, the happier the users. 📈 Analytics We use Sentry and Matomo, with an opt-in system summary card ✏️ Editing Many products are incomplete and don't have Nutri-Score, Eco-Score…so editing is important for users 🛣️ Road to scores The easier it is to get Nutri-Score, Eco-Score, the happier the users. ✏️ Editing - Nutrition input ✏️ Editing - Basic info input ✏️ Editing - 📦 Packaging input OCR page labels Nov 11, 2024
@codecov-commenter
Copy link

codecov-commenter commented Nov 11, 2024

Codecov Report

Attention: Patch coverage is 2.00000% with 49 lines in your changes missing coverage. Please review.

Project coverage is 6.92%. Comparing base (4d9c7fc) to head (1ecd982).
Report is 469 commits behind head on develop.

Files with missing lines Patch % Lines
...kages/smooth_app/lib/helpers/analytics_helper.dart 3.84% 25 Missing ⚠️
...th_app/lib/pages/product/add_new_product_page.dart 0.00% 4 Missing ⚠️
...mooth_app/lib/pages/product/edit_product_page.dart 0.00% 4 Missing ⚠️
...app/lib/pages/product/product_incomplete_card.dart 0.00% 2 Missing ⚠️
...pp/lib/pages/product/product_questions_widget.dart 0.00% 2 Missing ⚠️
...mooth_app/lib/pages/product/simple_input_page.dart 0.00% 2 Missing ⚠️
...ges/smooth_app/lib/pages/product/summary_card.dart 0.00% 2 Missing ⚠️
...es/smooth_app/lib/query/barcode_product_query.dart 0.00% 2 Missing ⚠️
..._app/lib/pages/product/add_basic_details_page.dart 0.00% 1 Missing ⚠️
..._app/lib/pages/product/add_other_details_page.dart 0.00% 1 Missing ⚠️
... and 4 more
Additional details and impacted files
@@            Coverage Diff             @@
##           develop   #5837      +/-   ##
==========================================
- Coverage     9.54%   6.92%   -2.63%     
==========================================
  Files          325     422      +97     
  Lines        16411   23251    +6840     
==========================================
+ Hits          1567    1610      +43     
- Misses       14844   21641    +6797     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@teolemon teolemon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you manage to see it working in Matomo ?

@monsieurtanuki
Copy link
Contributor Author

monsieurtanuki commented Nov 11, 2024

Did you manage to see it working in Matomo ?

Of course not, I don't use Matomo.
The namings of the dimensions were dictated by Matomo, though.

@teolemon teolemon merged commit bab4fd8 into openfoodfacts:develop Nov 12, 2024
6 checks passed
@teolemon
Copy link
Member

it seems to have worked @monsieurtanuki @g123k
image

@teolemon
Copy link
Member

image

@monsieurtanuki
Copy link
Contributor Author

@teolemon Looks cool!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📈 Analytics We use Sentry and Matomo, with an opt-in system ✏️ Editing - Basic info input ✏️ Editing - Nutrition input ✏️ Editing - 📦 Packaging input ✏️ Editing Many products are incomplete and don't have Nutri-Score, Eco-Score…so editing is important for users OCR page Product addition The easier it is to add a product and get Nutri-Score, Eco-Score, the happier the users. 🥫 Product page 🛣️ Road to scores The easier it is to get Nutri-Score, Eco-Score, the happier the users. summary card
Projects
Status: Done
3 participants