Integrate google tag manager with Bubble

Hey everyone,
I’m trying to setup Google tag manager with my Bubble to reduce page load times. I have some javascript in my app. I want to combine them and integrate into my app. The issue is where do I add the javascript code in google tag manager and when to trigger it and how do I add that to my Bubble app i.e. through API or some plugin.

I have tested a plugin which allows custom events but I’m not sure how to use it correctly. Any help would be appreciated :slight_smile: