[ANALYTICS-250] Amchart render wrong format for time data Created: 28/Oct/20  Updated: 17/Mar/21  Resolved: 09/Mar/21

Status: Closed
Project: Analytics
Component/s: None
Affects Version/s: None
Fix Version/s: 1.2

Type: Improvement Priority: Neutral
Reporter: Oanh Thai Hoang Assignee: Antonín Juran
Resolution: Fixed Votes: 0
Labels: VN-Testing
Remaining Estimate: 0d
Time Spent: 3d 7.3h
Original Estimate: Not Specified

Attachments: PNG File choose-matomo-dimension.png     PNG File data-transform-from-amcharts-connector.png     PNG File matomo-data-supplier.png     PNG File real-matomo-chart.png    
Template:
Acceptance criteria:
Empty
Task DoD:
[X]* Doc/release notes changes? Comment present?
[X]* Downstream builds green?
[X]* Solution information and context easily available?
[X]* Tests
[X]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Date of First Response:
Epic Link: UI/UX Dash improvements
Sprint: Add-Ons 58, Add-Ons 59
Story Points: 5

 Description   

Step to reproduce:

  • Add custom widget chart with matomo supplier    
  • Choose "Media Players" dimension and "Avg. time spent" metric
  • See preview field show "408" time spend instead of origin data "00:04:08" . see  

 

Expectation: Maybe format time data like real matomo widget . See   



 Comments   
Comment by Antonín Juran [ 15/Mar/21 ]

For jlegendre: This PR introduced possibility for converting time metrics to seconds for data suppliers configured with info.magnolia.analytics.matomo.datasource.MatomoDataSupplierWithTransformer class.

Matomo returns time metrics in some cases in format like 2 days 12:34:56.789  (it means 2 days, 12 hours, 34 minutes, 56.789 seconds), part for days and decimal part for seconds can miss if they're zero(s). Matomo metrics for a such conversion can be configured in matomo/config.yaml using property metricsForTimeToSecondsConversion. By default there are configured metrics listed bellow:

metricsForTimeToSecondsConversion:
- avg_time_on_site_new
- avg_time_on_site_returning
- sum_total_time_watched}}
- avg_time_on_site
- avg_page_load_time
- avg_form_time_hesitation
- avg_form_time_spent
- avg_form_time_to_first_submission
- avg_form_time_to_conversion
- avg_time_network
- avg_time_server
- avg_time_transfer
- avg_time_dom_processing
- avg_time_dom_completion
- avg_time_on_load
- avg_time_watched
- avg_time_to_play

Generated at Sun Feb 11 23:17:02 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.