matomo-org / matomo-sdk-ios

Matomo iOS, tvOS and macOS SDK: a Matomo tracker written in Swift
MIT License
388 stars 164 forks source link

iOS SDK does not track view. #410

Closed jinjin-lee closed 1 year ago

jinjin-lee commented 2 years ago

Hello I am a ios developer and would like to integrate matomo sdk in my project. But sdk tracked view just once at first and is not working any more. I am trying to find solution but i cannot find issue. Could you help me for this issue?

Thanks

devzhr commented 2 years ago

try to extend UIViewController

extension UIViewController {
    override func viewDidAppear(_ animated: Bool) {
        super.viewDidAppear(animated)
        matomoTracker.track(view: [self.title])
    }
}
brototyp commented 2 years ago

Hey, thanks for the report. How did you initialize the matomoTracker?