Closed tomopy03 closed 2 years ago
Hi @tomopy03,
thanks a lot for your questions. You are totally correct. The assertion is not necessary. It is merely meant as a safeguard. Most users probably don't want to specify URL's that don't end in either of those and if the do it means no events are tracked.
If you want to define a URL that doesn't end in either of those, you could initialize the MatomoTracker
using init(siteId:queue:dispatcher:)
. Would that solve your problem?
@brototyp
Thank you so much! My problem is solved.
This validation is inconvenient if you want to specify URLs other than matomo.php and piwik.php. This validation does not exist in the SDK for Android, and is probably unnecessary.
https://github.com/matomo-org/matomo-sdk-ios/blob/cea4a1cfcb05d49c5745801e05fff1cfed7a14e3/MatomoTracker/MatomoTracker.swift#L118-L120