Sie sind nicht angemeldet.

1

Freitag, 14. August 2015, 10:41

Anyone made a new HTML5 Google Analytics Plugin?

Hi,

Just thought I'd check to see if anyone has made a new HTML5 Google Analytics Plugin? I see the original one is for sale but I don't want to waste endless time trying to troubleshoot with no support from owner.

Please get in touch if you have one for sale ;-)


Thanks,

Andrew

Zephyr

Profi

Beiträge: 1 003

Wohnort: Netherlands

Beruf: Web developer

  • Nachricht senden

2

Freitag, 14. August 2015, 21:53

What is it you need exactly? Isn't it something you can do easily with a bit of javascript?

In your html:

Quellcode

1
2
3
4
5
6
7
8
9
<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','//www.google-analytics.com/analytics.js','ga');

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


In your xml:

Quellcode

1
2
3
<events onxmlcomplete=" js(ga('send','pageview', get(xml.scene) );" />

<hotspot onclick="js(ga('send','event', 'popup', 'open'));" />


If you need swfadress like deeplinking, look at the new 1.19 pre version. It has a example if you generate a virtual tour

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
	<action name="skin_deeplinking_update_url">
		if(skin_settings.deeplinking AND (!webvr OR webvr.isenabled === false),
			copy(adr, browser.location);
			indexoftxt(qi, get(adr), '?');
			if(qi GT 0, subtxt(adr, adr, 0, get(qi)));
			copy(si, scene[get(xml.scene)].index);
			copy(h, view.hlookat);
			copy(v, view.vlookat);
			copy(f, view.fov);
			copy(d, view.distortion);
			copy(a, view.architectural);
			clamp(d, 0.0, 1.0);
			clamp(a, 0.0, 1.0);
			set(pp, calc(f LT 10 ? 6 : 2));
			roundval(h, get(pp));
			roundval(v, get(pp));
			roundval(f, get(pp));
			roundval(d, 2);
			roundval(a, 1);
			set(adr, calc(adr + '?startscene=' + si + '&amp;startactions=lookat('+h+','+v+','+f+','+d+','+a+');'));
			js( history.replaceState(null, document.title, get(adr)); );
		  );
	</action>


You need ExternalInterface present (so online without javascript blocking)

Ähnliche Themen