You are not logged in.

1

Tuesday, May 21st 2013, 9:34pm

JavaScript Not Being Executed from Krpano - Google Analytics

Hello,

I'm trying to track various Krpano events via Google Analytics. I created an action to call a JavaScript wrapper function...

Source code

1
2
3
	<action name="googleanalytics">
		js( if(googleAnalytics != '' && googleAnalytics.Enabled == true) { googleAnalytics.Track(%1, %2, %3); } );
	</action>


...this does not work. I also tried calling Google Analytics directly...

Source code

1
2
3
4
	<action name="googleanalytics">
		trace("%0: category=", %1, ", property=", %2, ", label=", %3);
		js( _gaq.push(['_trackEvent', 'click', 'nav', 'up', , true]); );
	</action>


... this does not work either.

In both cases the JavaScript is not being executed. Does anyone know why or has anyone integrated Krpano with Google Analytics?

Thanks in advance,

Keno

2

Friday, May 24th 2013, 7:20pm

Hi,

try putting all Javascript code into a Javascript function in the html/js files and then just call that function from krpano.

Best regards,
Klaus

3

Friday, June 14th 2013, 5:25pm

Thanks that worked.