You are not logged in.


Wednesday, April 22nd 2020, 9:46am

Implement Google Analytics in Krpano-Tour

Okay so here's the whole situation:

For our client we developed a virtual tour, the client now wanted to track every single hotspot in the tour, we're doing this via onClick-event-tracking.
The whole tour is tracked via Google Analytics. The "basic" tracking functions in GA are working perfectly fine, we can see how many users there are, from where they're coming etc etc... but the event-tracking doesn't work! :(

My theory is that the GA-JS-code snipet in the < head > of the HTML-file only tracks directly whats in the HTML and not what's going on in the XML file, which is linked with HTML (I hope you understand what I'm saying?).

So now the actual question(s):
- Why isn't the event tracking working (at all)?
- Do we need a bit more of code so the GA-code-snipet also tracks what's happening in the XML-file, or
- Do we have to copy the GA-code also into the XML-file? If yes, how? We tried copying the GA-code directly into the start of the XML but nothing worked after that, so we deleted it again.

I've already looked pretty much everywhere but how it is so often... no one really had a case just like we do here... So I'm really hoping that someone with much more experience than I have can help me here :(



Posts: 86

Location: South Korea

Occupation: South Korea

  • Send private message


Friday, April 24th 2020, 6:36am

Basic GA setting is only supply page tracking.
Even more other trackings, you should call GA library programatically.

You may want to add custom GA events like the below, please check out.…lyticsjs/events