Hi there,
You need some extra quotation marks. I think you're trying to use this method:
But, you're specifying the date range as a single string, so it's using this method instead:
As you can see, the supported values for that method are things like "TODAY", "YESTERDAY", "LAST_7_DAYS", etc.
Try this instead:
var stats = campaign.getStatsFor("20130101", "20141231");
I think we could probably do a better job of explaining the issue, so I'll look into improving the error message.
Cheers,
Alex