Monday, January 25, 2010

Google Analytics within JavaFX web applications

Google Analytics is a tool that can be used to analyze traffic on a website and give you insights into how visitors are using your website. JavaFX is a software platform for creating and delivering rich internet applications that can run within a web browser on a variety of devices connected to the internet. Google Analytics for JavaFX (gaforjavafx) is a software module that enables you to send tracking information from your JavaFX applications that run in a web browser to your google analytics account.

With gaforjavafx you can send tracking information for such things as events and pageviews. Pageview tracking can be used to monitor activity inside your JavaFX application related to user navigation. With it you can analyze which pages in your application your visitors use most often and from which pages they exit your application. You can use this information to decide if you would like to modify the user experience of your JavaFX application so that a user can fully experience what the application has to offer.

Event tracking can be used for tracking activity inside your JavaFX web application not related to navigation. With it you can track user interaction with JavaFX UI controls such as Button, CheckBox and others.

Google Analytics for FlashJX (gaforjavafx) offers tremendous tracking and analysis capabilities for your JavaFX application running in a web browser. Using pageview tracking to analyze user navigation can help you understand the strengths and weaknesses of your interface design. Using event tracking can help you better understand which features of your web application are the ones that get used most often.

For inquiries about this software module and how you can obtain a free 30 day trial email us at gaforjavafx@gmail.com .

Wednesday, January 20, 2010

Google Analytics For JavaFX Code Sample




Click on the image to see an enlarged view of the source code.

This is a simple JavaFX web application consisting of a single button. When the user presses the button, an event is sent to the users google analytics account.

Here is the link to the JavaFX application running in a web browser.

http://members.shaw.ca/acoady/gaforjavafx.html


Provided below is a screen capture of the Event Tracking Labels page of a Google Analytics account that shows the "JavaFX Button Pressed" events being counted.



With Google Analytics for JavaFX it is easy to send event information from within JavaFX applications in a browser to your Google Analytics account.

For further information about the gaforjavafx software package or for information about our free 30 day trial email us at gaforjavafx@gmail.com .

Adding Google Analytics Tracking to JavaFX

This is how you can send events to google analytics from your JavaFX web application using gaforjavafx software. This simple example shows that when a button is pressed in JavaFX an event is sent to your google analytics account.

/* * Main.fx
*
* Created on 19-Jan-2010, 7:35:18 AM
*/
package gaforfx;

import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.scene.control.Button;

import gaforjavafx.*;

var tracker: GATracker = new GATracker();
var accountID = "UA-12345678-9";

Stage {
title: "Application title"
width: 250
height: 80
scene: Scene {
content: [
Button {
text: "gaForJavaFX"
action: function() {
tracker.trackEvent(accountID, "JavaFX", "gaForJavaFX", "JavaFX Button Pressed")
}
}
]
}
}


We created a variable called tracker which is an instance of GATracker from the gaforjavafx package. We then created an accountID variable which contains the string for users assigned google analytics account ID. Finally, in the button's action function we call the trackEvent method of the tracker object passing it values for the accountID, and three strings for the category, action and label respectively. Here is the description of the parameters that can be passed in the trackEvent method.

accountID

Your google analytics account id.

category

The name you supply for the group of objects you want to track.

action

A string that is uniquely paired with each category, and commonly used to define the type of user interaction for the web object.

label (optional)

An optional string to provide additional dimensions to the event data.

value (optional)

An integer that you can use to provide numerical data about the user event.


If you would like to know more about adding Google Analytics tracking to your JavaFX web application using gaforjavafx then contact us at gaforjavafx@gmail.com .

Tuesday, January 19, 2010

gaforjavafx

If you need to track events from your JavaFX web application with google analytics then we have come up with a way of accomplishing it. For example, you can track button presses in a JavaFX web application with google analytics. The web site listed below is a JavaFX application with a single button. When the user presses the button, then it gets tracked in my google analytics account.

http://members.shaw.ca/acoady/gaforjavafx.html

For inquiries about tracking JavaFX with Google Analyics email us at gaforjavafx@gmail.com .