Beiträge von masten

    Hi,

    I'm trying to get this working (I got from another thread) just to track scene views in my virtual tours. It will only track the html page though (shows up as .../tour.htm in GA) and not the scene views. Anyone got any ideas what I'm doing wrong? Or is there a better way of doing it?

    Thanks

    M

    -------------------------------------------------------------------------
    IN HTML
    <script>
    (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
    (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
    m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
    })(window,document,'script','//http://www.google-analytics.com/analytics.js','ga');

    ga('create', 'UA-XXXXXXX-1', 'auto');
    ga('send', 'pageview');
    </script>

    IN XML
    <events onxmlcomplete=" js(ga('send','pageview', get(xml.scene) );" />
    -------------------------------------------------------------------------------------------------------------------------

    I've just read an old thread about this which was very confusing, but I think it might be the automatic scene registering doesn't work with the latest KRPano so you have to do it manually in each scene in the tour.

    Does anyone know the code you have to add to each scene to get it to register in GA?

    Thanks

    M

    Hi.

    I've just upated to the latest KRPano and there is a problem with the Google Analytics plug-in here https://krpano.com/plugins/userplugins/googleanalytics/ , and the update link is down.

    It now only detects the first scene of the
    tours. I've changed nothing except bringing the KRPano .js and .swf
    files up to date

    It looks like it's not supported anymore. I have the 2013 version I think. Does anybody have a later version, or can point me to another way of tracking. All I want to do is track scene views. There must be a solution, I mean how do people track their tours these days?

    Many thanks

    M

    Hi Scott,

    Ok thanks for that and all your help, I really appreciate it. I couldn't get that to work though as really tbh, I'm out of my depth with it. So I've decided to scrap the Flash tours, as you initially suggested - should've taken your advice!

    Got them all working apart from one thing - the Google Analytics plug-in now only detects the first scene of the tours. I've changed nothing except bringing the KRPano .js and .swf files up to date, so would I need an updated Google Analytics plugin js file for this to work with those? I have the one from 2013

    Problem is on here https://krpano.com/plugins/userplugins/googleanalytics/ , the update link is down http://jaydee.ru/kp/updates/

    Do you have a copy of that file if that's not available anymore - or would I need to use another plugin?

    Here's the code I have. Was working and detecting all scenes before KRPano updates.

    Many thanks. M

    Hi.

    Ok yeah, updated to 2.3 (couldn't find 2.2) and it detects flash, but the tours don't load. I think because the syntax is different but I couldn't find anything that explains it properly. The references are all too technical for me to understand what's going on.

    Do you know what the new syntax'd be for this

    <div id="flashcontent"> </div>
    <script type="text/javascript">
    var so = new SWFObject("tour.swf", "tour", "100%", "100%", "8");
    so.addParam("allowFullScreen","true");
    so.addParam("scale", "noscale");
    so.addVariable("xml_file","tour.xml");
    so.addParam("allowScriptAccess","sameDomain");
    so.addParam ("bgcolor", "#000000");
    so.write("flashcontent");
    </script>

    Thanks again

    M

    I've also just tried this i.e detect IOS & Android to redirect and run the KRPANO tours if it finds

    <script language="javascript" type="text/javascript">

    if( /Android|webOS|iPhone|iPad|iPod|Opera Mini/i.test(navigator.userAgent) )
    {
    location.href='ios/tour.html';}
    }

    </script>

    But doesn't work on my phone which clearly has Android in the User Agent

    Nothing seems to work

    Thanks

    M

    Hi

    Ok thanks. Yeah tried

    <script type="text/javascript" src="swfobject.js"></script>
    <script type="text/javascript">
    if (swfobject.hasFlashPlayerVersion("9")) {
    alert("WE GOT FLASH!!");
    } else {
    alert("Ah...no flash");
    }
    </script>


    and there's no alert messages, but the swfobject must be loading as the FPP tours run fine if you take out the if, else statements from this:

    <script type="text/javascript">
    if (swfobject.hasFlashPlayerVersion("9")) {
    var so = new SWFObject("tour.swf", "tour", "100%", "100%", "8");
    so.addParam("allowFullScreen","true");
    so.addParam("scale", "noscale");
    so.addVariable("xml_file","tour.xml");
    so.addParam("allowScriptAccess","sameDomain");
    so.addParam ("bgcolor", "#000000");
    so.write("flashcontent");
    } else {
    location.href='ios/tour.html';
    }
    </script>

    So I don't know? It seems to be the detector statement not working. Could it be SWF Object Version. I have 1.5.

    I've PM'ed you some links

    Thanks much Scott

    M

    Hi Scott

    Ok thanks, still can't get it to work though. With the code below it now doesn't load the fpp tour on desktop either. Just a black screen in Firefox on desktop, and Android. I'm not a coder so it's probably some small syntax I can't see. What have I got wrong?

    Thanks :) M

    Hi Scott

    Great, many thanks. Big help! Updated and got the krpano tours running on Android. Think I'm gonna stick with the flash tours for desktops for a bit longer and use the detect code you gave me if it doesnt find Flash. I dont have the time currently to redo the functionality for the krpano ones and analytics says 30% of viewers are still using desktop so worth it for now.

    Only problem now is can't get it to detect flash (using the code below) Works on desktop (with flash). On Android (Samsung Galaxy j5) just get a black screen like its not seeing the else statement and redirecting to the ios tour (ios/tour.html)

    Any ideas?

    Many Thanks :)

    Hi

    I have had a bunch of virtual tours running for a while now but havent looked at them for a few years but need to sort them out as I am now getting problems. I have them set up like at the bottom so if it detects IOS it will run a completely different version of the tour. If it doesn't it runs the Flash Panorama Player of the tour.

    This used to work fine when Android ran Flash properly but now it doesn't on a lot of devices, so would the easiest way be to add a user String so if it detects Android it will run the Krpano version
    This will leave it running the FPP version just on desktops which is fine I think - or should I abandon that and just have the KRPano versions running for everything, though I do have a lot of functionality in the fpp tours that still provide a lot of value on desktops so I dont want to give that up unless absolutely necessary.

    And what would the detect script be, just to detect generic Android devices.

    Script I use to emded the krpano tours also below

    I've also noticed if I directly run the krpano versions on my Android phone it doesn't work either, like it's still running flash. Is this bit the problem?

    Code
    <script>
    embedpano({swf:"tour.swf", xml:"tour.xml", target:"pano"});
    </script>

    I haven't changed anything since 2015 so I have old versions of tour.js and tour.swf running and have a full license.

    Any advice greatly appreciated.

    Thanks in advance

    --------------------------------------------------------------------------------------------------------


    CODE THAT RUNS FPP TOURS, DETECTS IOS AND SWITCHES TO ANTOHER TOUR IF FINDS IT

    CODE THAT RUNS IOS TOURS

    Just realised I haven't added anything to tour.xml except the plugin include. All I have so far in the startup action is this

    <action name="startup">
    loadscene(get(scene[0].name), null, MERGE);
    buildthumbs();
    openthumbs();
    </action>

    Which is just relevant to the tour, not the analytics tracking. Should there be something else in here to do with the analytics plugin?

    Thanks

    Masten

    Hi there

    Thanks for your reply. I tried that in tour.xml but it said

    add_scenes_to_swfaddress() not recognised

    or something like that in the control panel. I don't have swfaddress running. I don't know what this or how to use it. If you could explain how to use it that'd be great. Do I just get the swfaddress.js file from the demo? then what do I put in the swfaddress.xml file. I've looked at that and it's full of parameters I don't understand.

    I also tried doing it manually using the trackpageviews action but I have no idea how to integrate that as the documentation doesn't really explain how you use it. Is this right? I've just put one of the scenes in. Well actually, it cant be right as it doesn't work. Still not tracking anything except the first pano

    Many thanks

    Masten

    Hi

    I'm trying to get the Google Analytics Plugin to work on my html5 virtual tours made in krpano. Here's what I have in analytics.xml


    Which all works, except it's only tracking the first pano. Locally in control panel it tracks it but online in Analytics it doesn't.

    Could it be I'm using an old version of KR Pano? (1.08.14) I would just upgrade it but then the way the licensing works it look like I have to recreate the panos!

    Just noticed some other people had this exact same problem quite recently - cseel, in particular. Did you ever find a fix for it?

    Many thanks

    Masten

    Just realised mouse over obviously wont work on touch devices. So how do you label thumbs. Can you just have tooltips that are just set to be on all the time, and also how do you code this is as specified in last question.

    Thanks

    Masten

    Hello

    Im redoing my tours to work in IOS and I just want to have a text tooltip come up when the user hovers over a thumb. I understand this is the command

    ; onhover="showtext(this is my tooltip);

    But I don't understand where to put it in the scene code that I have

    The tours were created using 'MAKE VTOUR (NORMAL) droplet.bat

    Thanks

    Masten