Should work if you remove the quotes, i.e.
flowFunction: "beforeLandingPageFlow" to flowFunction: beforeLandingPageFlow
flowFunction: "beforeLandingPageFlow"
flowFunction: beforeLandingPageFlow
That way you're passing a reference to the function itself, rather than its name as a string.