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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

tGoogleAnalyticsInput help required.

Hi,
I want to fetch Google Analytics (GA) data. For this, my friend added my google email as a user to his website GA. Now i can view his GA reports through my id. So this part is done.
I want to discuss three fields of tGoogleAnalyticsInput,
1.Application Name: Although it is not required but what should i enter here?
2.Service Account Email: i have given my google email address here as it has already been added as mentioned above.
3.Key File (*.p12): This is what confuses me. I've generated a p12 key file by turning my Analytics API to ON and following the required process.
My question is related to the 3rd field. Should i use p12 file that i generated or should i ask my friend to provide me his p12 key file?
any idea? Thanks in advance.
regards,
abdul.
Labels (2)
45 Replies
Anonymous
Not applicable
Author

It depends what you mean with meta data. I usually use another framework (job instance framework based on the components:
https://exchange.talend.com/#marketplaceproductoverview:gallery=marketplace%252F1&pi=marketplace%252...
 to register all jobs (not only the Google Analytics stuff) to track to procedure and steer the jobs, it is used for the same use case as the AMC but does the job more related to DWH needs.
If you mean meta data from Google Analytics it self, than you could use tGoogleAnalyticsManagement component to get the most of it. 
Anonymous
Not applicable
Author

jlolling,
That helped.  But now I am getting a 403 error.
WARN:Got error:403 Forbidden
{
  "code" : 403,
  "errors" : ,
  "message" : "User does not have sufficient permissions for this profile."
}
Anonymous
Not applicable
Author

Simply add the service account email address to the list of the users for the related views (formally known as profiles).
Anonymous
Not applicable
Author

jlolling,
That worked.
Thanks.
Anonymous
Not applicable
Author

jlolling,
I am following your example "Scenario 1 - Using flat and normalized output in a test job".  I am getting two errors:
1) The method convertToDatatype (String, String, String, String)
2)  Syntax error on token "en",, expected
Thanks in advance.
Anonymous
Not applicable
Author

I cannot understand how this can happened because the only java code which can fail this way is the code in the talend job.
You shows me a method inside the library and actually this cannot fail because it is already complied.
Could you please send me a screenshot of the job and the configuration please. It would also interesting which other Google related components you run in the same job (also in parent jobs). 
I can tell you it must be a configuration problem because this component works in huge projects without any problems for a long time.
If you have problems with the forum here (sometimes people are unable to send screenshots) you can contact me directly.
jan.lolling@gmail.com
I am always interested in trouble situations like this to improve my work or have ideas to avoid such situations.
: Did you have added quotas around the locale like this way: "en". Sorry the component expect here the en without quotas.
I should take care of it and remove them automatically if there are such quotas. 
_AnonymousUser
Specialist III
Specialist III

Simply add the service account email address to the list of the users for the related views (formally known as profiles).

hi, 
i have the same problem but i added the service account in user management and the problem exist yet.
Any idea?
thanks, Cynthia
Anonymous
Not applicable
Author

Hi piruvariCynthia
This should work. What kind of problems do you get?
You also have to enable the Analytics API for this service account.
Anonymous
Not applicable
Author

Hi Jan,
I need your help, I am getting a Null Pointer Exception in the method GoogleAnalyticsInput.containsSampledData. 
I tried the same query on google api explorer and I get proper result. Attaching few snapshots - any help,support,pointers, etc.. will be greatly appreciated.
 
Regards,
Boyai
Anonymous
Not applicable
Author

Opps... the snapshots has gone missing.

Starting job GoogleAnalytics at 11:27 08/09/2016.
connecting to socket on port 3494
connected
DEBUG:add dimension: {name=ga:visitCount}
DEBUG:add metric: {expression=ga:sessions}
Exception in component tGoogleAnalyticsInput_1
java.lang.NullPointerException
at de.jlo.talendcomp.google.analytics.v4.GoogleAnalyticsInput.containsSampledData(GoogleAnalyticsInput.java:655)
at local_project.googleanalytics_0_1.GoogleAnalytics.tGoogleAnalyticsInput_1Process(GoogleAnalytics.java:578)
at local_project.googleanalytics_0_1.GoogleAnalytics.runJobInTOS(GoogleAnalytics.java:864)
at local_project.googleanalytics_0_1.GoogleAnalytics.main(GoogleAnalytics.java:721)
disconnected
Job GoogleAnalytics ended at 11:27 08/09/2016.

API Explorer
POST {YOUR_API_KEY}
{
"reportRequests": ,
"viewId": "ga:871246",
"metrics": ,
"dimensions":
}
]
}