change measurement id construction to JS parser friendly ids