Hi @AlexBorgo ,
Store ecma script in your project specific filter. There is no fix rule but try to keep under workflow folder as
/apps/<your-project>/workflow/scripts
You have to make sure this script should has property "jcr:mixinTypes" and it's one of the value should be "mix:title". You can have other values to.
Add a filter in META-INF/filter.xml as per your code.
Make sure you don't over write this location by Repository Initialization (repoinit) config. Generally, code location not overwritten by repo init config. But as you are using aem cloud, just make sure you don't over write this.