Action: Go to node ID URL on clicking Tour Node hotspot

Q&A about the latest versions
Post Reply
ElainaS
Posts: 1
Joined: Fri Oct 28, 2022 6:35 pm

Hello,

I am trying to find a way to have a tour's url changed to included the current node's custom node ID, (or even just its default internal node ID) for tracking page views and user engagement time on individual nodes in Google Analytics 4 via google tag manager.

I have direct node access enabled and that works fine, but as I will be giving this tour to my client to host themselves, I can't manually type in an absolute url path for every single tour node hotspot (using "go to URL" action instead of go to next tour node) as I don't know that will be, and could potentially change at some point, breaking the tour.


I have seen and tried the code in the post that suggested using an action on node change with the following code:

Code: Select all

javascript: history.replaceState({}, player.userdata.title, location.href.replace(location.hash,"") + '#' + player.getCurrentNode());
This is working Ok in analytics in that it shows the node ID of tour nodes that are viewed, but the data for views per user and user engagement do not seem accurate are there is still a majority of views showing just the /index.html page.

Rather than mess around with immediately reloading the page each time a new tour node is click (which I think is being discounted by analytics because of the short interval between events) I would rather like to cleanly set my tour nodes to go directly to the correct tour node using direct node access.

I followed this tutorial as I think it is the closest thing I have found to what I am looking for: https://tonyredhead.com/pano2vr-little- ... is-is-home

In his example he uses the following action to access his home node:

Source: = Mouse Click
Action: = Go to URL
URL: = index.html#home
Target: = _self

This would be perfect except it isn't working for me. I have an action set up to "go to the the url": index.html#node3 (once I have this working I will use placeholders to implement this action across all the nodes)
When I click on the tour node, the URL changes from

http://localhost:49899/IVtepygf~1kiv6av/index.html
to
http://localhost:49899/IVtepygf~1kiv6av ... s=36762390

I don't know what the ?ts=36762390 part of the url means, and it the tour does not change to the specified node.

So my question is what am I doing wrong in trying to get this to work, if I should be approaching it a different way, or if what I am trying to do is even possible?

Thanks for your time and help,
Elaina
User avatar
Hopki
Gnome
Posts: 13004
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Hi Elaina,
The extra parameters on the end of the URL are for the cache buster.
This can be turned off in the HTML Templates Settings.
Select Web Output, HTML tab (1), and select Edit Template button (2).
The Template properties window will show (3)

Screenshot 2022-12-13 at 12.29.07.png
Screenshot 2022-12-13 at 12.29.07.png (90.79 KiB) Viewed 405 times

Deselet Cache buster.
Regards,
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/
Post Reply