mzuccaroli / angular-google-tag-manager

A service library for integrate google tag manager in your angular project
https://itnext.io/how-to-add-google-tag-manager-to-an-angular-application-fc68624386e2
MIT License
136 stars 78 forks source link

Youtube video keep emitting gtm.video after navigating away #187

Closed mattiLeBlanc closed 1 year ago

mattiLeBlanc commented 1 year ago

Hi

I understand you don't support Google Tagmanager, but do you happen to know why I am seeing gtm.video events emitted to datalayer after leaving my youtube video player page? I am using an Angular 15 project and the component gets destroyed. Only when I pause the video and than navigate away it seems to stop emitting. But it requires a delay after pause and navigation. Really weird. I am going to try adding GTM manually and see if that makes any difference which it shouldn't.

mzuccaroli commented 1 year ago

i think it depends on the component you are using for youtube, the library only recive all avents and push them to the data layer nothing more

mattiLeBlanc commented 1 year ago

I have tried bare GTM implementation and bare youtube iframe implementation and the issue persists. Very strange issue.

mzuccaroli commented 1 year ago

yes, i think it really depends on how youtybe handle playback events, closing the issue because is not related to the library code