If you are familiar with Javascript and want to have full control of functionalities across a venue and its LivePages, you should consider building a custom venue.

Google Tag Manager

Google Tag Manager (GTM) is a powerful free tag management tool. It is traditionally used by marketers to embed analytics tracking code.  However, GTM has a tag called Custom HTML. With the Custom HTML tag, you can embed CSS and sandboxed javascript codes as well. 

To get started, simply enable the GTM integration in GEVME and key in your GTM Container ID: 

You can then write custom Javascript codes within custom tags on GTM. Here is an example:

GTM has the concept of triggers that allows you to specify where and when the custom tag(s) should be triggered.

Source: https://docs.gevme.com/advanced-customizations/custom-javascript