It seems like that would work. I can't imagine why it wouldn't. There should be no difference between manually adding it and adding it from the cms.
If you had a page where you had tried and it didn't work I could debug it. I do notice that the code chunk in the cms has code in it that is supposed to be replaced and isn't in the manually added code. Make sure the chunks are exactly the same and the results should be as well.