Page 2 of 3

Re: Google Analytics Component

Posted: Sun Jul 05, 2020 5:37 am
by Carlos Chegado
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

Re: Google Analytics Component

Posted: Tue Jul 07, 2020 8:29 pm
by Hopki
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,

Re: Google Analytics Component

Posted: Wed Jul 08, 2020 1:20 am
by Carlos Chegado
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

Re: Google Analytics Component

Posted: Wed Jul 08, 2020 6:41 am
by Carlos Chegado
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

Re: Google Analytics Component

Posted: Wed Jul 08, 2020 12:41 pm
by Hopki
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,

Re: Google Analytics Component

Posted: Wed Jul 08, 2020 1:47 pm
by Carlos Chegado
Brilliant, that's exactly it, no idea why that didn't cross my mind ;-)

Cheers

Re: Google Analytics Component

Posted: Fri Jul 17, 2020 9:42 pm
by KRitchie
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

Re: Google Analytics Component

Posted: Mon Jul 20, 2020 8:38 pm
by Hopki
Hi Kevin,
You can use a container and use the Hotspot Proxy ID.
The container will have the mouse click action.
Regards,

Re: Google Analytics Component

Posted: Wed Jul 22, 2020 8:10 pm
by KRitchie
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

Re: Google Analytics Component

Posted: Thu Aug 06, 2020 10:39 pm
by Marco360
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 ;)

Re: Google Analytics Component

Posted: Fri Sep 18, 2020 9:41 pm
by khaag
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

Re: Google Analytics Component

Posted: Thu Oct 29, 2020 10:04 am
by rené
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.

Re: Google Analytics Component

Posted: Thu Oct 29, 2020 10:20 am
by Marco360
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.

Re: Google Analytics Component

Posted: Sun Nov 22, 2020 8:48 am
by soulbrother
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?

Re: Google Analytics Component

Posted: Sun Nov 22, 2020 9:16 am
by Marco360
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?