finally a workable JS / async setup to get around pagespeeds warnings