Feature/4795 feature tracking matomo

This commit is contained in:
JanNiklas Grabowski
2023-06-21 06:24:46 +00:00
committed by Frank Rotermund
parent 013047191e
commit 27723fa953
7 changed files with 155 additions and 34 deletions
+11
View File
@@ -195,6 +195,17 @@ import MatomoTracker
}
}
}
func trackEventWithDimension(category: String, action: String, dimension: String, value: NSNumber?, name: String?) {
if fastRunning {
// bwi: Analytics use custom config
if let dimensionIndex = analyticsConfig.selectedSendMessageDimensionIndex() {
matomo?.setDimension(dimension, forIndex: dimensionIndex)
matomo?.track(eventWithCategory: category, action: action, name: name, number: value, url:nil) // name optional unwrap?
matomo?.remove(dimensionAtIndex: dimensionIndex)
}
}
}
}
extension BWIAnalytics : MXAnalyticsDelegate {