Closed danrye closed 8 years ago
I've been working on this a little more, it seems related to the fact that init is being called before the angular app had had a chance to completely load. If you have some tips for getting this script working for angular apps I'd be happy to submit a pull request with a section added to the readme.
Yep, you got it. This script is designed to run after your YouTube videos are in the DOM. You can invoke onYouTubeIframeAPIReady inside of a directive in order to re-bind to new videos in the DOM, but beware that there's currently a known issue where the script will break when bound on the same video twice.
I'm definitely interested in suggestions, as this is a persistent problem. Short of polling for new YouTube videos and keeping a cache/count of bound videos, I'm coming up short on ideas.
I've got angulartics working. I can't get LunaMetrics working, I've followed the instructions using the .json file to configure GTM. My guess is that there is something that needs changed with the triggers.