Google Analytics

Q&A about the latest versions
Post Reply
bogsdolox
Posts: 11
Joined: Mon Sep 08, 2014 4:58 pm

Google Analytics

Post by bogsdolox » Wed Oct 03, 2018 3:53 pm

Hi, I have looked at this question previously and now another customer is asking for some form of tracking of behaviour when a visitor is viewing a tour.

I can add tags (although my usage is limited) but what I would like to be able to do is to track what a person is looking at and their flow through the tour. So, a few queries,
1. How can I use tags/events etc in analytics to track node views?
2. How can I track node views and flows?

Thanks

User avatar
Hopki
Gnome
Posts: 9003
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Re: Google Analytics

Post by Hopki » Wed Oct 03, 2018 4:29 pm

Hi,
This was covered a while ago.
You can use Google Tracking to track events, well you could when we tested it.

You head over to Google Tracking and create an account to track events.

In Pano2VR you use a Go To URL action that makes a JavaScript call to send the event to Google.
You could track 500 events per tour.

Example:
In Pano2VR skin and for a hotspot template:
Mouse Click, Open Next Panorama, URL: $(hu), Target: $(ht)
Images Ready, Go To URL, URL: javascript:_gaq.push(['_trackEvent', '$(ud)', '$(ut)']); Target: (leave blank)

So in the above when the next node loaded it would push a tracking event using information in the user data. Here I'm using $(ud) for teh name of the tour and $(ut) for the name of each node.
You then need to add your tracking account code in the header of the HTML page, it would like similar to this:

<script type="text/javascript">

 var _gaq = _gaq || [];
 _gaq.push(['_setAccount', 'UA-XXXXXX-X']);
 _gaq.push(['_trackPageview']);

 (function() {
   var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
   ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
   var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
 })();

</script>


Of course any button can have a GoTo URL action and push the information, a zoom in button for example:
Mouse Click, Go To URL, URL: javascript:_gaq.push(['_trackEvent', '$(ud)', 'zoom in']); Target: (leave blank)

As said this was all done a long time ago now but Im sure with a little research you can get it working.
Regards,
Hopki

MSusman
Posts: 40
Joined: Mon Jul 21, 2014 9:38 pm
Location: Houston, Texas
Contact:

Re: Google Analytics

Post by MSusman » Fri Mar 15, 2019 8:19 pm

I have increasing requests from clients asking for more detailed Analytics at the node level. I have read through the forum posts on this topic but have not been able to get P2VR to track any event beyond the initial index.html page load. I freely admit javascript and coding in general is not my forte. Is anyone successfully tracking nodes and various other analytics events? I will happily pay for consulting. Please let me know. Thanks!
Pano2VR6beta
System: Windows 10, i7, 32megs, GTX670
https://houston360photo.com

Post Reply

Who is online

Users browsing this forum: No registered users and 27 guests