Page 1 of 1

Google Analytics

Posted: Wed Oct 03, 2018 3:53 pm
by bogsdolox
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

Re: Google Analytics

Posted: Wed Oct 03, 2018 4:29 pm
by Hopki
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

Re: Google Analytics

Posted: Fri Mar 15, 2019 8:19 pm
by MSusman
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!

Re: Google Analytics

Posted: Fri Dec 13, 2019 3:21 pm
by multimaps360.19
Hello to all,
same here ... we want to use Google Tracking Manager for tracking events inside a Pano2vr-Tour ... I get the clicks registered, but there is no information tracked like Click URL, Click Text, Click Target, ...
The code from above seems not working anymore ... has anyone a working solution to track analytics events?
Regards,
Alex

Re: Google Analytics

Posted: Tue Mar 10, 2020 4:09 pm
by Marco360
Same for me: really new but clients ask for more insights as 3DVista offers. Any help would be great.

Thanks

Maybe a topic for a next awesome tutorial :)

Re: Google Analytics

Posted: Mon May 04, 2020 9:58 pm
by Spine3d
it is possible to tracking event by using the new gtag() in google analytic

follow the step to insert the base page tracking code in html template. viewtopic.php?t=11242. the new google tracking script is call gtag()

This is my example. insert the script in hotspot "GO TO URL". --->URL textbox

javascript:

function googleAnalytic() {

var noteTile=pano.getNodeTitle();

gtag('event', 'Click_360HotSpots', { 'event_category' : 'pano_tours', 'event_label' : noteTile});

};

googleAnalytic();

you can replace 'Click_360HotSpots', 'pano_tours'and 'noteTile'. do any definition you want. see this link. https://developers.google.com/analytics ... gjs/events

finally, checking your real time analytic event tracking, you should spot the event has been insert in your event tracking tab. wait next day. the record should show up in the behavior section.

Thank you.

Re: Google Analytics

Posted: Thu Aug 06, 2020 10:49 pm
by Marco360
just to add up threads:

things are going on here:
viewtopic.php?f=22&t=14661&p=62773&hili ... ics#p62773

Use the GA-Component from GGnome and adjust the event-tracker as you need ;)

Re: Google Analytics

Posted: Wed Nov 04, 2020 3:12 pm
by etegration
Since this thread still pops up more than any other when searching for google analytics in pano2vr, Come to viewtopic.php?f=22&t=14661

Re: Google Analytics

Posted: Thu Jun 15, 2023 5:56 am
by digitalphotos
Hi, will there be a solution for GA4?

Re: Google Analytics

Posted: Mon Jun 19, 2023 12:05 pm
by Marco360
digitalphotos wrote: Thu Jun 15, 2023 5:56 am Hi, will there be a solution for GA4?
what are you looking for? I changed my whole GA config towards GTM (with GA4):
in case tracking is not disabled (by set Cookie or browser(plugin)) I append the GTM to head and body. (yes I know, GDPR .. opt-in; Allowance can also be asked via consent management but need to be put in the .ggt file - so did I do it.)

My events are tracked as I push actions like "Node_Change", "language_change" or "URL_click" to dataLayer including interesting variables like: source node, targets...
that's all.

To be honst, I'm a little jealous of 3DVistas Analytics with heat map on the equirectangular.

Re: Google Analytics

Posted: Mon Jun 19, 2023 12:30 pm
by Hopki
Hi,
Not seen what 3D Vista does but Google also shows a heat map.
Or do you mean something else?

Screenshot 2023-06-19 at 11.29.44.png
Screenshot 2023-06-19 at 11.29.44.png (37.02 KiB) Viewed 2564 times

Regards,