Demo not working as expected

332 views
Skip to first unread message

Josha van Praag

unread,
May 10, 2012, 11:49:25 AM5/10/12
to ga-easy-da...@googlegroups.com
The authentication button is shown, I click on it and every next request gives the following error:

Uncaught TypeError: Cannot read property 'analytics' of undefined (line 220)

Any help is appreciated

Eric Wong

unread,
May 10, 2012, 3:51:04 PM5/10/12
to ga-easy-da...@googlegroups.com
There seems to be a bug where the Google API object (gapi) is not loaded/available when the gadashInit() function is called. It's a bit crude but for now you might be able to workaround this by calling the main function on the document.ready or onLoad event.

mrpatrick

unread,
May 10, 2012, 5:06:51 PM5/10/12
to ga-easy-da...@googlegroups.com


On Thursday, May 10, 2012 3:51:04 PM UTC-4, Eric Wong wrote:
There seems to be a bug where the Google API object (gapi) is not loaded/available when the gadashInit() function is called. It's a bit crude but for now you might be able to workaround this by calling the main function on the document.ready or onLoad event.

I had the same issue - tried Eric's suggestion of doing it onLoad and it worked.  See below for original / modified versions for diff


Thanks,

Pat 

Josha van Praag

unread,
May 11, 2012, 6:27:44 AM5/11/12
to ga-easy-da...@googlegroups.com
Cool. This works indeed. Is there any way to do the authentication on the server-side (php)? Because I want to implement this in a backend environment but my user has no access to the Google Analytics account. Only I have access.

Thanks
Josha
Reply all
Reply to author
Forward
0 new messages