Sorry but I need to access the Window class… not the Layout.
Is there a way to get Window from Layout?
This is the Vaadin sample code to use this plugin.
Window mainWindow = new Window(
"GoogleanAlyticsWidget Sample Application");
// A meaningless Label just to add some content
Label label = new Label("Hello Vaadin user");
mainWindow.addComponent(label);
// Create a tracker for vaadin.com domain.
GoogleAnalyticsTracker tracker = new GoogleAnalyticsTracker("UA-658457-8",
"vaadin.com");
// Add only one tracker per window.
mainWindow.addComponent(tracker);
// Track the page view
tracker.trackPageview("/samplecode/googleanalytics");
// Assign main window
setMainWindow(mainWindow);