Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Question about connecting Google's web analytics API and QlikView

Hey all,

I am working on web analytics here at QlikTech and am wondering if anyone else has tried to hook Google Analytic's API into QlikView. Google's analytics is certainly a great value but I am really interested to see how much more powerful the data can be when tied with QlikView.

anyway, if you have any thoughts please let me know, send me a PM or add below.

Thanks and look forward to exploring this

Jonathan Moody
Global Online Lead Gen
QlikTech International

74 Replies
marcel_olmo
Partner Ambassador
Partner Ambassador

Hello Mr. Akin,

sorry if I'm disturbing. I'm trying to make your script work. But I cannot make it work.

Please could you tell me what am I doing wrong?

I think you only have to change the following variables : gUserName, gPassword and gProfileId1 for your own values.

gUserName : xxx@gmail.com

gPassword : (your gmail password)

gProfileId1 : the last number after "scid" when you logged in into your google analytics account.

When I make a reload, the result files visits1.csv and visits1.1.csv are empty.

What am I doing wrong?

Thanks in advance.

Not applicable
Author

please see according your dimension and metric value will on google analytic .

Regards

Ashish Srivastava

marcel_olmo
Partner Ambassador
Partner Ambassador

Thank you Ashish for your quick answer. But I'm pretty sure the metrics are the same as google wants, because they are the default ones.

The original file is on "share qlikview" folders, you can find it in the next link :

http://community.qlik.com/media/p/90513.aspx

This is all my script. Please could anybody tell me what I'm doing wrong ??

Thanks in advance.


// Google Analytic settings
SET gUserName='xxx@gmail.com';
SET gPassword='xxxx'; (account password)
SET gProfileId='xxxxxxxx'; (number after 'scid' when you're logged in your google analytics account)

// Date period
SET gDateStart='2009-08-02';
SET gDateEnd='2010-08-02';

// Dimensions & Metrics Reference
// See http://code.google.com/apis/analytics/docs/gdata/gdataReferenceDimensionsMetrics.html for details.
SET gDimensions='ga:date,ga:country';
SET gMetrics='ga:visits,ga:pageviews,ga:newVisits';

// Fetch data from Google Analytics into visits.csv
/*
-u Login name for your Google Account (required)
-p Password for your Google Account (required)
-f Your Google Analytics profile ID (the number used in your Google Analytics code snippet) (required)
-o File to write the output CSV (standard output by defaults
-d Dimensions to be displayed in your report (default: ga:date)
-m Metrics to be displayed in your report (default: ga:visits,ga:visitors,ga:pageviews)
-h Print a help screen
-n Do not print the header row
-s Fetch data starting at day (YYYY-MM-DD) (default: a week ago = 2009-09-23)
-e Fetch data up to day (YYYY-MM-DD) (default: today = 2009-09-30)
*/

EXECUTE java -jar GoogleAnalyticsClient-20090930.jar -u $(gUserName) -p $(gPassword) -f $(gProfileId) -d $(gDimensions) -m $(gMetrics) -s $(gDateStart) -e $(gDateEnd) -o visits.csv;
Load data from visits.csv
Directory;
LOAD ga:date,
ga:country,
ga:visits,
ga:pageviews,
ga:newVisits
FROM
visits.csv
(txt, codepage is 1252, embedded labels, delimiter is ',', msq);

Not applicable
Author

Did you try the latest version of the Google Analytics java application?

*The profile ID should be located in your profile settings. In your GA main page, you'll see the list of web profiles. On each web profiles, you'll see an edit/delete link on the right right. Click on edit and it will bring you to the Profile Settings screen. There, you'll see the profile id.

Not applicable
Author

ya khim os right please download the latest version of the google Analytics java application.

I see Your code this right.

Instead of two dimension please take only one dimension at a time please remove country in your dimension list .

Regards

Ashish

marcel_olmo
Partner Ambassador
Partner Ambassador

Ok. I'm just trying one dimension now.

Do you mean that I have an older version of the ".jar" file that makes the whole stuff work?

Do you think that probably this is the problem?

I'm trying to find a new one but I cannot find it.

Thanks anyway. I keep on trying to find out.

If anybody know where can I find it or whatever, let me know.

Thanks in advance

.

Not applicable
Author

Here:

http://support.gooddata.com/entries/65253-google-analytics-export-tool

You need to modify the script after replacing the jar with with the new version.

marcel_olmo
Partner Ambassador
Partner Ambassador

Thanks for the quick reply Khim.

I'm suppose only to change the jar file?

I've just done it, and it's still not working. 😞 . I don't know what else to do.

Just let me confirm the 3 first parameters :

gUserName = mynameaccount@gmail.com

gPassword = password of my account

gProfileId = Once I logged in my google analytics profile, and I choose one of the webs that I've got. It's the number after "scid=". Is it correct???

Thank you very much in advance

Not applicable
Author

I attached a screen shot of where you can get the profile ID. I explained the steps of how to access this page in my previous post.

marcel_olmo
Partner Ambassador
Partner Ambassador

Thank you very much!!!

It was it!! I didn't put it right the number.

Thanks a million.