SWOOP for SharePoint will detect if a page, or file, has been opened independent of where it was done. A page or file could be opened on any browser or within Teams (e.g. Viva Connections) or on a mobile app (e.g. ioS SharePoint app).
The Device Activity report will tell if a SharePoint page, or file, was opened on desktop, mobile or tablet device. We can tell if Teams was used, but only if it's via the desktop app. If they use Teams in a browser, then it will be recorded as a browser and not Teams.
Some page or file views page may not be recorded, so the number of views and visitors may not match SharePoint. For example, network restrictions (IP blocking, firewalls etc.) or browser add-ons (like ad blockers) could mean that traffic is not recorded.