Yandex.Metrika and Vaadin

Hello!

There is a free service Yandex.Metrika (similar to Google Analytics), which sends you an e-mail whenever the web page is not available.

To use it, I need to place a div with a script inside the body tag.

How can I do this in a Vaadin application?

Thanks in advance

Dmitri

Hi,

Should be really easy to embed it as a new client side component. You could take a look at Google Analytics add-on
sources
to see how you can achieve your goals with JSNI.

A simpler alternative might be to override AbstractApplicationServlet.writeAjaxPageHtmlVaadinScripts(…) or .writeAjaxPageHtmlMainDiv() and add the script there after calling the corresponding super method.

Is there a similar way in vaadin 7?

See
this tutorial
.