Add JavaScript-Code for adding webstatistic

I want to add website statistic to my vaadin application.

They asked me to add the following javascript to my webpage.

Where can i add the java script?

The simplest would be to add a label with the xhtml content to your application.

Something like:

Label lblStats= new Label();
lblStats.setContentMode(Label.CONTENT_XHTML);  (Or Label.CONTENT.RAW)
lblStats.setValue(...all your statistic code....)

But I doubt it will give them the stats they wish.
The stats will probably only be counted once for each user of the application, not for “every page”/request

André