Forum Discussion
Using GTM / GA inside of MS Teams Tab App
We currently use Google Tag Manager / Google Analytics inside of our application for analytic tracking. We have this setup inside of a Microsoft Teams Tab App currently inside the store. For some reason, Google Tag Manager is not sending events from chromium based browsers, or the client on Mac OS X / Windows 11. We know that they are setup correctly as we are getting events from Firefox browsers, as well as from our application in a browser, outside of an iFrame.
It is assumed that something with these browsers iframes are blocking GTM from setting cookies, resulting in not sending the events. We are wondering if there's a way around this from the MS Teams perspective, or if this is actively / scheduled to be worked on.
We are also reaching out to Google Tag Manager directly in case there's something to be resolved there, however want both sides aware, and this looks as if it's an iframe / MS Teams issue.
Thanks!
1 Reply
- Prasad_Das-MSFT
Microsoft
That might be because of the SameSite cookie policy that Chrome defaults to Lax, meaning the cookies won't be sent unless the user can see the URL which excludes iframes. Ensure that you adhere to the following pre-requisites: https://learn.microsoft.com/en-us/microsoftteams/platform/tabs/how-to/tab-requirements
Please also refer: https://www.simoahava.com/analytics/cookieflags-field-google-analytics/
Thanks,
Prasad Das
------------------------------------------------------------------------------------------
If the response is helpful, please click "**Mark as Best Response**" and like it. You can share your feedback via Microsoft Teams Developer Feedback link.