Google Analytics Component

User avatar
Carlos Chegado
Posts: 45
Joined: Wed Feb 14, 2007 7:11 pm

Sun Jul 05, 2020 5:37 am

Hi Martin,

I'm loving the Google Analytics Component, it's fantastic, Cheers.

Have you guys considered building a Facebook Pixel Component in the same way?

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

Tue Jul 07, 2020 8:29 pm

Hi Carlos,
How are you doing?
Was planning to come out your way this year, but Covid put pay to that, maybe in the next couple of years we will try again.
I have added a feature request for the Facebook Pixel component.
Regards,
Hopki
Garden Gnome Software 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/
User avatar
Carlos Chegado
Posts: 45
Joined: Wed Feb 14, 2007 7:11 pm

Wed Jul 08, 2020 1:20 am

Hi Martin,

We're all doing fine here in Queensland, although folks in Melbourne just went back into lock-down, seems the second wave is real even here in Australia.

The Hopki's are more than welcome to come visit us, if and when you find yourselves in my neck of woods. The Gold Coast is a prime holiday destination here in Australia, I like to call this city the "Algarve Down Under".

It looks as the International Borders of Australia might be closed for many months to come though, it has an history of being a prison at large for the Brits and I guess we're back at it nowadays ;-)

I'll be looking forward to the Facebook Pixel component.

Cheers
User avatar
Carlos Chegado
Posts: 45
Joined: Wed Feb 14, 2007 7:11 pm

Wed Jul 08, 2020 6:41 am

Hi Martin,

I don't mean to abuse your goodwill, but may I add a feature request to the Google Analytics Component?

The Google Analytics component works very well, actually too well, it even records stats when I'm editing the virtual tours on my computer.

In my opinion, Google Analytics is only useful to measure traffic to a VT when it is live on the web, I don't need to know how many times I've hit the preview button in Pano2VR or used the local Pano2VR server while editing a VT.

The Pano2VR Integrated Web Server should ignore the Google Analytics code when we're just testing and developing our VTs.

I do a fair bit of JAMstack work and HUGO likewise also has an integrated web server so we can test the code locally, but it's GA Component will ignore the local traffic served by it's own server.

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

Wed Jul 08, 2020 12:41 pm

Hi Carlos,
The GA code is set in the skin configuration, if you remove it from the skin then you will set a "Please set your code text box" in the output, at this point it is disabled.

Or...
You can add an action filter to the click action, something like:
Host = xxxx.com

Then it will only trigger when uploaded to your hosting, note you do not add "https or www.
Action filters use Logic block triggers: https://ggnome.com/doc/skin-logic-triggers/

For host see: https://ggnome.com/doc/skin-logic-triggers/#host
This way the component will only trigger when uploaded.

In the same way, you could set don't trigger if using Local Host, this way if it gets uploaded to any website it will work but not when being edited in Pano2VR.
Regards,
Hopki
Garden Gnome Software 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/
User avatar
Carlos Chegado
Posts: 45
Joined: Wed Feb 14, 2007 7:11 pm

Wed Jul 08, 2020 1:47 pm

Brilliant, that's exactly it, no idea why that didn't cross my mind ;-)

Cheers
User avatar
KRitchie
Posts: 46
Joined: Tue Apr 21, 2020 10:59 am
Location: Philadelphia, PA

Fri Jul 17, 2020 9:42 pm

Is there a way to have it tracked if a pinned video or polygon hotspot is played?

Also, is there any way to tell how long a user is on an event after it has been triggered?

Thanks

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

Mon Jul 20, 2020 8:38 pm

Hi Kevin,
You can use a container and use the Hotspot Proxy ID.
The container will have the mouse click action.
Regards,
Hopki
Garden Gnome Software 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/
User avatar
KRitchie
Posts: 46
Joined: Tue Apr 21, 2020 10:59 am
Location: Philadelphia, PA

Wed Jul 22, 2020 8:10 pm

Thanks Hopki, I have used containers with Proxy ID before for opening iframes from a polygon hotspot - so I should be able to figure this out,

- Kevin
Marco360
Posts: 11
Joined: Wed Feb 19, 2020 1:02 pm

Thu Aug 06, 2020 10:39 pm

You can also put the ACTION (Note Change => go to URL => Javascript...." into the other hotspot templates. If you do NOT you the hotspot proxy you can specify the event (like "open link" or "run video") depending on what was clicked. ;)

btw: I case you are working with consent cookies (due to GDPR) and opt-in/-out you might need the action javascript like this

Code: Select all

javascript:try {
gtag('event', 'Node Change', {
'event_category': player.getVariableValue('UA_category'),
'event_label': player.userdata.title });
} catch (err) { console.log ('no-consent');
}
so you will not stop if the gtag is not loaded ;)
khaag
Posts: 1
Joined: Fri Sep 18, 2020 6:47 pm

Fri Sep 18, 2020 9:41 pm

Hi

I'm trying to add a action to an Hotspot URL...$

Code: Select all

javascript:gtag('event', 'URL Hotspot "$(hs)" clicked (iframe)', {
  'event_category': player.getVariableValue('UA_category'),
  'event_label': player.userdata.customnodeid
});
My plan is to add the Title of the Hotspot to the Event... $(hs) but this didn't work. Does anyone have an idea how to accomplish this?

Kind regards
Kevin
rené
Posts: 4
Joined: Mon Apr 13, 2020 4:19 pm

Thu Oct 29, 2020 10:04 am

khaag wrote:
Fri Sep 18, 2020 9:41 pm
Hi

I'm trying to add a action to an Hotspot URL...$

Code: Select all

javascript:gtag('event', 'URL Hotspot "$(hs)" clicked (iframe)', {
  'event_category': player.getVariableValue('UA_category'),
  'event_label': player.userdata.customnodeid
});
My plan is to add the Title of the Hotspot to the Event... $(hs) but this didn't work. Does anyone have an idea how to accomplish this?

Kind regards
Kevin
I am really interested in that, how is it possible to track the hotspot title $(hs) in the event? Im switching from google to matomo, but the sting ist more or less equal.
Marco360
Posts: 11
Joined: Wed Feb 19, 2020 1:02 pm

Thu Oct 29, 2020 10:20 am

I guess it's due to the fact that you try to access data not from player.
All information are from player.SOMEFUNCTION. but $hs is a pano2VR internal variable which is not available in the player.
didn't find some documentation functions player provides to access data.


rené wrote:
Thu Oct 29, 2020 10:04 am
khaag wrote:
Fri Sep 18, 2020 9:41 pm
Hi

I'm trying to add a action to an Hotspot URL...$

Code: Select all

javascript:gtag('event', 'URL Hotspot "$(hs)" clicked (iframe)', {
  'event_category': player.getVariableValue('UA_category'),
  'event_label': player.userdata.customnodeid
});
My plan is to add the Title of the Hotspot to the Event... $(hs) but this didn't work. Does anyone have an idea how to accomplish this?

Kind regards
Kevin
I am really interested in that, how is it possible to track the hotspot title $(hs) in the event? Im switching from google to matomo, but the sting ist more or less equal.
User avatar
soulbrother
Posts: 433
Joined: Tue Apr 08, 2008 7:01 pm
Location: München
Contact:

Sun Nov 22, 2020 8:48 am

Hi,
what can be the reasons, why my realtime events do not showup in analytics.

I did all steps as Hopki explained in the tutorial video, and set the code for some buttons.

So, what could be reasons for not working with my local tour, that is "played" with the internal server of p2vr.

Any ideas or hints?
Marco360
Posts: 11
Joined: Wed Feb 19, 2020 1:02 pm

Sun Nov 22, 2020 9:16 am

Does you browser fire to GA? You might have a look into the Network Traffic in the Developer View of your Browser and look for „collect“ as this is the info Google gets sent. If there is nothing your code might not work (can’t access the gtag function). You‘ll should also find an error in console log as the function can’t be called.



soulbrother wrote:
Sun Nov 22, 2020 8:48 am
Hi,
what can be the reasons, why my realtime events do not showup in analytics.

I did all steps as Hopki explained in the tutorial video, and set the code for some buttons.

So, what could be reasons for not working with my local tour, that is "played" with the internal server of p2vr.

Any ideas or hints?
Post Reply