Google Analytics and virtual tours
Is there any way to send Google Analytics virtual tour's events like hotspots or other element click?
See "Anatomy of Event Tracking" on this page. Their first example shows how to record user interaction with a video Play link on your page.
https://developers.google.com/analytics ... ackerGuide
Perhaps the "video Play link" could be your hotspot url action instead, or something like that...
https://developers.google.com/analytics ... ackerGuide
Perhaps the "video Play link" could be your hotspot url action instead, or something like that...
Hi!
Direct node access and link type - index.html#node2 (like as bookmark)
this link event tracking or not?
Direct node access and link type - index.html#node2 (like as bookmark)
this link event tracking or not?
Gumir J | VR Panoramic Photographer | mobile: +77055717171 | skype: gumirj
website: gumirj.com | google.com/+gumirj | facebook.com/gumirj | twitter.com/gumirj
website: gumirj.com | google.com/+gumirj | facebook.com/gumirj | twitter.com/gumirj
I think direct node access won't help because the url doesn't change itself by clicking hotspots inside tour.
- Hopki
- Gnome
- Posts: 13028
- Joined: Thu Jan 10, 2008 3:16 pm
- Location: Layer de la Haye, Essex UK
- Contact:
Hi,
Yes there is, use Google tracking.
Also have a look at:
Website: http://www.google.com/analytics/
Event Tracking Website:
https://developers.google.com/analytics ... ackerGuide
You can track 500 items per person per visit.
Use a Go To URL action then use: Go To URL => URL: javascript:_gaq.push(['_trackEvent', 'MyCat', 'my action']);
an example of a Pan Left button:
Mouse Click => Pan Left => Speed: 0.5
Mouse Click => Go To URL => URL: javascript:_gaq.push(['_trackEvent', '$ud', 'Pan Left']); => Target (leave blank)
The above will show how many times a person has clicked the pan left button, the $ud is used so you know which tour it is that is being viewed.
Regards,
Hopki
Yes there is, use Google tracking.
Also have a look at:
Website: http://www.google.com/analytics/
Event Tracking Website:
https://developers.google.com/analytics ... ackerGuide
You can track 500 items per person per visit.
Use a Go To URL action then use: Go To URL => URL: javascript:_gaq.push(['_trackEvent', 'MyCat', 'my action']);
an example of a Pan Left button:
Mouse Click => Pan Left => Speed: 0.5
Mouse Click => Go To URL => URL: javascript:_gaq.push(['_trackEvent', '$ud', 'Pan Left']); => Target (leave blank)
The above will show how many times a person has clicked the pan left button, the $ud is used so you know which tour it is that is being viewed.
Regards,
Hopki
Garden Gnome Support
If you send an e-mail to support please send a link to the forum post for reference.
support@ggnome.com
https://ggnome.com/wiki/documentation/
If you send an e-mail to support please send a link to the forum post for reference.
support@ggnome.com
https://ggnome.com/wiki/documentation/
Thanks a lot, Martin.
I tried that action Mouse Click => Go To URL => URL: javascript:_gaq.push(['_trackEvent', '$ud', 'Pan Left']); => Target (leave blank) but browser loads a blank page.
I tried that action Mouse Click => Go To URL => URL: javascript:_gaq.push(['_trackEvent', '$ud', 'Pan Left']); => Target (leave blank) but browser loads a blank page.
Does someone know working way to call the javascript from pano? Now the browser opens blank page.
- Hopki
- Gnome
- Posts: 13028
- Joined: Thu Jan 10, 2008 3:16 pm
- Location: Layer de la Haye, Essex UK
- Contact:
Hi Jare,
Your page code should look like this, in the head of your page:
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'your google account code goes here']);
_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>
In the user data of each Panorama add The Title of each node and in the description add the panorama group name e.g. House one.
To track nodes, add the following to the Hotspot Template - Loaded => Go To URL => javascript:_gaq.push(['_trackEvent', '$ud', '$ut']); Target: (leave blank)
To track a button click in the skin, Example a Pan Left button - Mouse Click => Go To URL => URL: javascript:_gaq.push(['_trackEvent', '$ud', 'Pan Left']); => Target: (leave blank)
Hope this helps.
Hopki
Your page code should look like this, in the head of your page:
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'your google account code goes here']);
_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>
In the user data of each Panorama add The Title of each node and in the description add the panorama group name e.g. House one.
To track nodes, add the following to the Hotspot Template - Loaded => Go To URL => javascript:_gaq.push(['_trackEvent', '$ud', '$ut']); Target: (leave blank)
To track a button click in the skin, Example a Pan Left button - Mouse Click => Go To URL => URL: javascript:_gaq.push(['_trackEvent', '$ud', 'Pan Left']); => Target: (leave blank)
Hope this helps.
Hopki
Garden Gnome Support
If you send an e-mail to support please send a link to the forum post for reference.
support@ggnome.com
https://ggnome.com/wiki/documentation/
If you send an e-mail to support please send a link to the forum post for reference.
support@ggnome.com
https://ggnome.com/wiki/documentation/
Just a little update: a blank page with one 0 (zero) digit opens only in Firefox and IE.jare wrote:Now the browser opens blank page.
In Opera, Google Chrome and Safari the javascript works without problems.
Can someone try to reproduce and report your results in various browsers here, please?
Test panorama here, just click the white rectangle.
Thanks!
This is what I see in FF and IE:
- Attachments
-
- Untitled-1.jpg (77.38 KiB) Viewed 10329 times
Hi Hopki!
It will be very great if you add a public example (project files) on a subject. It will be interesting to all
thnx for great work
It will be very great if you add a public example (project files) on a subject. It will be interesting to all
thnx for great work
Gumir J | VR Panoramic Photographer | mobile: +77055717171 | skype: gumirj
website: gumirj.com | google.com/+gumirj | facebook.com/gumirj | twitter.com/gumirj
website: gumirj.com | google.com/+gumirj | facebook.com/gumirj | twitter.com/gumirj
One more strange thing - HTML5 output and normal.ggt template works fine with my script. But if a fullscreen checkbox is checked, the browser does not display anything but this report "This content requires HTML5/CSS3, WebGL, or Adobe Flash Player Version 9 or higher." Tested in Safari, Chrome and Firefox.
+1It will be very great if you add a public example (project files) on a subject. It will be interesting to all
Wish I had more time, here are a couple of quick observations. Maybe they help?
1. Try this:
instead of this:
because $ud is a variable. Putting quotes around a variable makes it literal.
2. Try this:
instead of this:
because your web site is in a sub-domain (http://3dpano.pindora.com/public/ga/1.html) and "document.location.protocol" seems to behave differently in different browsers.
REFERENCES:
A. First time Google Analytics users see this: https://developers.google.com/analytics ... ncTracking
B. Advanced Google Analytics users see this: https://developers.google.com/analytics ... ngOverview
1. Try this:
Code: Select all
javascript:_gaq.push(['_trackEvent', $ud, 'Pan Left']);
Code: Select all
javascript:_gaq.push(['_trackEvent', '$ud', 'Pan Left']);
2. Try this:
Code: Select all
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://') + '.google-analytics.com/ga.js';
Code: Select all
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
REFERENCES:
A. First time Google Analytics users see this: https://developers.google.com/analytics ... ncTracking
B. Advanced Google Analytics users see this: https://developers.google.com/analytics ... ngOverview
It seems the problem is resolved, I tried the same code again in HTML5+flash fallback panorama, then everything works.
Now I'll try to apply the Event Tracking to a real tour.
Thanks to all!
Now I'll try to apply the Event Tracking to a real tour.
Thanks to all!
Again bad news, again the same blank page in FF and IE.
Hopki, Thomas, haven't you a working example?
Hopki, Thomas, haven't you a working example?
All the same even without variablesbecause $ud is a variable. Putting quotes around a variable makes it literal.
All the same in main domainbecause your web site is in a sub-domain
I have now looked into this, and I guess the problem is how google uses the async queue. You can work around this by adding a Javascript function that sends the data to the GA queue, and you call that function within Flash.
I used the following code where I added a gaTrackEvent function:
and in the skin I call
You can see this working at: http://gardengnomesoftware.com/test/ga/ and you can download the whole project here.
I used the following code where I added a gaTrackEvent function:
Code: Select all
<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);
})();
function gaTrackEvent(a,b,c) {
_gaq.push(['_trackEvent', a, b, c]);
}
</script>
Code: Select all
javascript:gaTrackEvent( 'Test', 'Click', 'Text1');
- Attachments
-
- Screen shot 2013-09-06 at 12.36.14 .png (35.53 KiB) Viewed 10262 times
MfG, Thomas