My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
faq  
JAnalytics - FAQ
Phase-Implementation, Phase-Deploy, Featured
Updated Feb 4, 2010 by danharri...@gmail.com

Introduction

Ask a question and we'll try to answer it here.

Frequently Asked Questions

1) When I view the KML demo on Internet Explorer I get this error "An invalid character was found in text content. Error processing source '...'. Why do I see this error?

When KML document is returned without a <?xml version="1.0" encoding="UTF-8"?> at the start of the file. I'm not 100% sure that this will solve that problem, however, by leaving the <?xml version="1.0" encoding="UTF-8"?> out the KML is more easily opened with Google Earth.

2) I want to use the <analytics:kml> JSP tag but I want my users to see a URL ending with the ".kml" extension. Can I do that with JAnalytics?

Yes you can, but you will have to create a mapping for that. Suppose that you are using the 3 line JSP example and it is in a JPS named sitevisitors.jsp. You will need to create a servlet-mapping for your JSP. Remember that a JSP is really just an easy to write servlet. Here's the configuration that you will need in your web.xml.
     <servlet>
        <servlet-name>SiteVisitors</servlet-name>
        <jsp-file>/sitevisitors.jsp</jsp-file>
    </servlet>

    <servlet-mapping>
        <servlet-name>SiteVisitors</servlet-name>
        <url-pattern>/visitors.kml</url-pattern>
    </servlet-mapping>

3) Currently I'm hosting my own 3 line JSP which uses the <analytics:kml> JSP tag. I have created a servlet-mapping to visitors.kml. How do I open that automatically in google maps?

We do that on Ansir's Site Visitors page. All you need to do is create a link like this:
http://maps.google.com/maps?f=q&hl=en&q=http://www.ansir.ca/visitors.kml
Alternately, just go to Google Maps and enter the URL of you KML in the search area.
Comment by Stas....@gmail.com, Mar 12, 2008

Somebody wrtite parser for JAnalytics report?

Comment by Elliot.F...@gmail.com, Mar 21, 2008

I'm working on it as we speak. I'm using SAX to help me do it.

Comment by djover...@gmail.com, Apr 16, 2008

The API is working fine for me but it only returns data for the account's default website. If I have an account with multiple websites, how do I specify which one I want data from?

Comment by gener...@gmail.com, Jul 7, 2008

djoverton - you need to specify a different report id when you call getReport().

Comment by project member devin%li...@gtempaccount.com, Jul 9, 2008

Is there documentation that explains how the DrillDownParams? functionality operates? I am creating a report for TOP_CONTENT_DETAIL and need to pass in a query parameter, for example, &d1=page-name.html.

Thanks!

Comment by JiH...@gmail.com, Nov 5, 2008

I have a community website like : http://www.onewebsite.com , also some people are registered there.

And our site will assign a unique url for each users' account,like :http://www.onewebsite.com/UserA http://www.onewebsite.com/UserB

So is that possible extracting data from google analytics for each User by janalytics ?

Comment by khaled.t...@gmail.com, Nov 11, 2009

Does the library still work?

The code tries to emulate the login form of GA. Why the login method is not like the one specified here: http://code.google.com/apis/analytics/docs/gdata/1.0/gdataAuthentication.html ?

Why JAnalytics parse HTML pages instead of using Google Data protocole wich ich more stable? (http://code.google.com/p/ga-api-java-samples/source/browse/trunk/src/v1/DataFeedExample.java)

Regards. KT


Sign in to add a comment
Powered by Google Project Hosting