You are not logged in.

Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

Shanti

Intermediate

  • "Shanti" started this thread

Posts: 301

Location: Puerto Vallarta

Occupation: Web Developer

  • Send private message

1

Wednesday, May 13th 2009, 7:55pm

Google Analytics plugin!

Here its a very basic/simple google analytics plugin, everything is explained in the readmeanalytics.txt included in the zip file

unfortunately, the source is around 350kb (for some strange reason) so I cannot upload it to the forum, if you need it, let me know I will upload it to another place

Enjoy *cool*

EDIT (02/02/2011) : Source Code uploaded to fileserve.

File name: analytics4krpano.zip File size: 328.90 KB
Shanti has attached the following file:

This post has been edited 3 times, last edit by "Shanti" (Feb 2nd 2011, 7:03pm)


nelk

Intermediate

Posts: 358

Location: Paris

  • Send private message

2

Wednesday, May 13th 2009, 8:22pm

Great !

I'll give it a try.

Well, I'm interested in the source. I'd like to implement a parsing function to automatically set the tracker in regards of the image loaded :-)
VideoStitch, a video stitching engine / blog sur les visites virtuelles ( french ).

Shanti

Intermediate

  • "Shanti" started this thread

Posts: 301

Location: Puerto Vallarta

Occupation: Web Developer

  • Send private message

3

Wednesday, May 13th 2009, 8:23pm

I don't understand, isn't that the idea of the Prefix?

nelk

Intermediate

Posts: 358

Location: Paris

  • Send private message

4

Wednesday, May 13th 2009, 8:23pm

BTW, why is it so heavy ?

Because of the analytics tracker class ?
VideoStitch, a video stitching engine / blog sur les visites virtuelles ( french ).

Shanti

Intermediate

  • "Shanti" started this thread

Posts: 301

Location: Puerto Vallarta

Occupation: Web Developer

  • Send private message

nelk

Intermediate

Posts: 358

Location: Paris

  • Send private message

6

Wednesday, May 13th 2009, 8:33pm

ok :-/

For the prefix, you need to put "/pano/" or just "pano" if you want to have /pano/ in analytics ?
VideoStitch, a video stitching engine / blog sur les visites virtuelles ( french ).

nelk

Intermediate

Posts: 358

Location: Paris

  • Send private message

7

Wednesday, May 13th 2009, 8:37pm

I don't understand, isn't that the idea of the Prefix?


No it's completely different : the prefix is here to filter in analytics.

Parse the <image> inside the xml and track analytics on every change will avoid to set the tracker for every loadpano action. With this function, the plugin will be totally independent.
VideoStitch, a video stitching engine / blog sur les visites virtuelles ( french ).

nelk

Intermediate

Posts: 358

Location: Paris

  • Send private message

8

Wednesday, May 13th 2009, 8:51pm

It doesn't seem to track the first pano loaded .. even with

Source code

1
wait(load);


:-(
VideoStitch, a video stitching engine / blog sur les visites virtuelles ( french ).

Shanti

Intermediate

  • "Shanti" started this thread

Posts: 301

Location: Puerto Vallarta

Occupation: Web Developer

  • Send private message

9

Wednesday, May 13th 2009, 8:56pm

you need to put /pano/

http://rapidshare.com/files/232586059/analytics4krpano.zip

here is the source ;-)

if you make big changes please share it with the forum *smile*

nelk

Intermediate

Posts: 358

Location: Paris

  • Send private message

10

Wednesday, May 13th 2009, 9:05pm

Of course ! :-)

But as I'm going to holidays tomorrow evening, this may be not even 10 days ! ;-)
VideoStitch, a video stitching engine / blog sur les visites virtuelles ( french ).

Shanti

Intermediate

  • "Shanti" started this thread

Posts: 301

Location: Puerto Vallarta

Occupation: Web Developer

  • Send private message

11

Wednesday, May 13th 2009, 11:54pm

It doesn't seem to track the first pano loaded .. even with

Source code

1
wait(load);


:-(


Klaus, is there some event we can check to make sure a plugin is completely loaded before we call functions from it?

something like wait(pluginloaded[plugin]) ?

nelk

Intermediate

Posts: 358

Location: Paris

  • Send private message

12

Thursday, May 14th 2009, 10:02am

I try this but it doesn't change anything :

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
if (stage)
{
	// run standalone
	// no automatic scaling
	stage.scaleMode = StageScaleMode.NO_SCALE;
	// align on top left corner
	stage.align     = StageAlign.TOP_LEFT;
	startup_plugin(null);
}
else
{
	// run as plugin in krpano
	this.addEventListener(Event.ADDED_TO_STAGE, startup_plugin);
}	
	
function startup_plugin(event:Event):void
{
	krpano.set("events.trackthis", TrackThisPano);
}
VideoStitch, a video stitching engine / blog sur les visites virtuelles ( french ).

nelk

Intermediate

Posts: 358

Location: Paris

  • Send private message

13

Thursday, May 14th 2009, 10:05am

Also, Klaus, is there a event when a new pano is loaded (or when <image ... > change) ?
VideoStitch, a video stitching engine / blog sur les visites virtuelles ( french ).

Shanti

Intermediate

  • "Shanti" started this thread

Posts: 301

Location: Puerto Vallarta

Occupation: Web Developer

  • Send private message

14

Thursday, May 14th 2009, 7:21pm

I try this but it doesn't change anything :

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
if (stage)
{
	// run standalone
	// no automatic scaling
	stage.scaleMode = StageScaleMode.NO_SCALE;
	// align on top left corner
	stage.align     = StageAlign.TOP_LEFT;
	startup_plugin(null);
}
else
{
	// run as plugin in krpano
	this.addEventListener(Event.ADDED_TO_STAGE, startup_plugin);
}	
	
function startup_plugin(event:Event):void
{
	krpano.set("events.trackthis", TrackThisPano);
}


thats becasue that code only checks if the plugin is running inside krpano or not.

I found the "onloaded" event for the plugins.... so maybe changing the onload from <krpano> to the onloaded from the plugin to load the first pano would probably work.

will have to check it later as I have little time right now *sad*

bulp

Intermediate

Posts: 388

Location: Malaysia

  • Send private message

15

Friday, May 15th 2009, 5:17am

thank you Shanti... will try this later,...

cheers

Shanti

Intermediate

  • "Shanti" started this thread

Posts: 301

Location: Puerto Vallarta

Occupation: Web Developer

  • Send private message

16

Sunday, May 24th 2009, 12:00am

anyone using this plugin?

Just wante to ask to see if I should update it, or just leave it as it is :)

I just found out that the similar plugin for FPP is 10 euros! which I think its a steal... since this was a 5 minute code and it does the same thing...

anyways, just wanted to know I should update it more.


Shanti

Graydon

Professional

Posts: 614

Location: Texas

Occupation: Industrial gas turbine services.

  • Send private message

17

Sunday, May 24th 2009, 4:25am

It's a long tail thing... people still just trying to make things look pretty... tracking info will be needed later... *thumbup*

Shanti

Intermediate

  • "Shanti" started this thread

Posts: 301

Location: Puerto Vallarta

Occupation: Web Developer

  • Send private message

18

Sunday, May 24th 2009, 4:42am

Graydon; I think you are right, I will wait more :)

Zephyr

Professional

Posts: 969

Location: Netherlands

Occupation: Web developer

  • Send private message

19

Sunday, May 24th 2009, 9:06pm

Yeah, the other day I made something like this. Only I had some trouble tracing some stuff. Because I want to trace stuff like if fullscreen is pressed, or if certain navigation elements are used and which people prefer. Those are events. But I alsoo want to trace which panorama is visited the most, and for how long etc. And thats more a pageview. And I don't know how to distiguish those things from eachother. I ended putting certain different "folder" extensions infront of it. /events/fullscreen pressed /pano/location1.xml

How would you solve this?
3d childrens game using krpano Game
Minify your xml with my krpano XML Compressor
Krpano XML Parsing Error Checklist
Available for hire (krpano xml, javascript, actionscript, flash, php and ipad plugins).

Shanti

Intermediate

  • "Shanti" started this thread

Posts: 301

Location: Puerto Vallarta

Occupation: Web Developer

  • Send private message

20

Sunday, May 24th 2009, 10:07pm

zephyr, thats a very good question... and I don't really know the answer, your solution seems to work for what you need, but what about goals? in GA you can define goals, but you would have to create one for each pano I guess :(