Image-stitching and virtual tour solutions My account Updates
It is currently Tue Sep 23, 2014 9:25 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Sat Aug 24, 2013 10:11 pm 
Offline
Member
User avatar

Joined: Mon Jun 06, 2011 6:06 am
Posts: 135
Location: AUSTIN, TX USA
Just getting started with GA. I've read all the documentation on Krpano plugin & forum posts, and did a search and read everything here as well.

Curious if anyone using ptp1.8 got the krpano plug-in to work.

_________________
Howdy from Deep in the Heart of Texas!


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 28, 2013 3:20 am 
Offline
Member

Joined: Mon May 13, 2013 5:12 am
Posts: 25
Location: Australia
Hi,

I have had some success in using the Analytics plugin.

The analytics.xml file contains the list of the panoramas, hotspots and menu items that you want to track. This adds a fair amount of post-build editing to each tour. I am in the process of developing a python script that automates the construction of the 'analytics.xml' file.

The 'pano' function adds each panorama as a new page in the 'pages' section in GA, while the 'events' adds it to the 'events' section. I decided to primarily use the 'events', rather than the 'pano' function, as I wanted to see which hotspots users were clicking on, rather than which panos they ended up on (and I could infer the result anyway, by noting the link details in the data field).

The event data takes parameters as 'Category, Action, Label'.

The code below is the approach I've taken to integrate with PTP 1.8 file structure.

Code:
   
<krpano>
<plugin name="ga"
        url="plugins/analytics.swf"        | analytics source file
        alturl="plugins/analytics.js"    | analytics source file
       
        keep="true"
        preload="true"
        debug="true"

        account="{account details}"        |GA tracking id
        prefix="/virtualtour"    |the page ‘path’ name that the panos will be filed under in GA
>

|| add in individual panos
    <pano name="startpano"        |name (I can't remember if this field is actually used or not)
        xmlurl="test.xml"            |target of xml file
        pageurl="/startpano/"    |the page ‘path’ name that the pano is filed under in GA
    />

|| each item to be tracked will need to be added individually
    <event name="hotspot0"                   | name (again, not sure if this is used. It might need to be the same name as the target.)
        xmlurl="test0.xml"                         | target xml file
        target="hotspot[spot0].onclick"    | target element action in the xml file
        data="Hotspot,pano link,spot0 - Hall 1"         | Passed to ‘TrackEvent’ function. Parameters are: Category, Action, Label, Value, nonInteraction(bool)
    /> 

|| UI buttons can also be added   
    <event name="leftclick"
        global="true"        | not specific to the current pano
        target="plugin[left].onclick"
        data="UI,Button click,Left button"
    />


</plugin>

<!-- Actions -->
<action name="activatepano">
if (%1 != null, if (get(action[mainloadpano].content) !== null, if (%2 == xml, mainloadpano(%HTMLPATH%/%1), mainloadpano(%1)), if (%2 == xml, loadpano(%HTMLPATH%/%1,null,MERGE,BLEND(1)), loadscene(%1,null,MERGE,BLEND(1))); wait(blend); ));
</action>
<action name="add_scenes_to_analytics">
for (set(i,0), i LT scene.count, inc(i), if (get(scene[get(i)].url), copy(data[a.url].content, scene[get(i)].url), copy(data[a.url].content, scene[get(i)].name)); plugin[ga].addPano(get(scene[get(i)].name), get(scene[get(i)].name), true, get(data[a.url].content)); );
</action>
</krpano>

Anyway, hope this helps give you a start.

Cheers,
Michael


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 30, 2013 7:07 pm 
Offline
Member

Joined: Thu Apr 18, 2013 10:56 pm
Posts: 55
Location: OC, California
i just put the google analytics script on the html page instead...

_________________
Richard Hart
Commercial and portrait photographer OC California
http://www.richhartphoto.com


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 03, 2013 4:48 pm 
Offline
Member
User avatar

Joined: Mon Jun 06, 2011 6:06 am
Posts: 135
Location: AUSTIN, TX USA
udrh,

Excellent! Thank you. Got it working and excited about learning more about how people in the wild explore my tours.

_________________
Howdy from Deep in the Heart of Texas!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group