Copy link to clipboard
Copied
Has anyone been able to successfully run google analytics and tag manager in the frameless output to catch search terms and internal (not embedded) videos?
I have been using the html5 output with no issues but trying to migrate to frameless is a bit frustrating.
I have the search terms defined correctly in the analytics setup (I can see them when i use my workaround aka refreshing). For the video, I am using tag manager to run an html5 video listener for any page with a video, which then loads the video metrics to send back to analytics if it detects <video> tags (basically - hey, is there any video here? Yes, okay, load the video capturing event in case they hit play.).
The behavior I am viewing in debug mode is that clicking on a TOC item does not register a new page in the tag assistant - so it doesn't record anything interaction on the page.
When i execute a search and then click on a result, the page loads with the search term appended to the end of the url. Now, this should trigger a new page view as the result is a new topic. And with the appended search term, google should generate a view_search_result event as well. But, Google does not see it, nor records the search term, until I manually refresh the page and then records the view_search_term event. This is an out of the box feature too.
This is the same behavior when I am trying to capture video events. The listener nor the video event are triggered until after I refresh the page manually (the google debug and assistant tool do not even register it as a new page).
In looking at the TOC for the frameless, I see that it's tied to the topicpage.js event upon click where as the html5 version was a regular link without any js. I am leaning towards this javascript as being the root cause of my pain.
Once again the search terms and tag manager codes work fine when you:
Its just accessing a topic via the toc does it fail to register a new event other than page_view.
I have also tried moving the scripts around to call them from different places with no improvement. I also tested this same code with a html5 build and it captured everything correctly - so the code works.
Figured it out. Adding this here if anyone in the future runs into this issue as well.
The issue is that frameless does not actually load the new page file when you click on a toc link - it instead loads specific divs and alters the url address in the browser. So, when you click on a toc link or execute a search, it never actually loads the new page which triggers the google analytics tracking code unless you refresh the page. You can view this in google anayltics 4 by turning on the history
...Copy link to clipboard
Copied
As I mentioned in the other thread, I suspect you're going to have to consult with the RH folks on this one - see https://helpx.adobe.com/contact/enterprise-support.other.html#robohelp for your Adobe Support options. I'd recommend using the tcssup@adobe.com e-mail address as it reaches a team dedicated to Technical Communication Suite products including RoboHelp.
Please report back with whatever you find to help others.
Copy link to clipboard
Copied
Figured it out. Adding this here if anyone in the future runs into this issue as well.
The issue is that frameless does not actually load the new page file when you click on a toc link - it instead loads specific divs and alters the url address in the browser. So, when you click on a toc link or execute a search, it never actually loads the new page which triggers the google analytics tracking code unless you refresh the page. You can view this in google anayltics 4 by turning on the history option (designed to track single page sites) and using the debug tool. You can also view the bahavior in chrome's developer tools. All search terms and subsequent toc clicks will be logged as history changes and not new pages. In the developer tool - say you are on welcome.htm and click on about_us.htm. While the browser url will say xxx/about_us.htm, you can see that welcome.htm is still listed in the developer tools as the source. If you click refresh, the about_us.htm will appear as the source in the developer toolbar.
This means search terms will not be recorded out of the box by google anayltics nor will page interactions capturing scripts built in tag manager.
If you need to record search terms:
Update
If you are using an HTML5 listener setup to record html5 video plays that you are hosting (not embedded), change the trigger to fire the listener for the following custom event: gtm.historyChange-v2. This will fire the listener to check for video content upon that specific history change. Doing the tranditional trigger, History, does not fire the tags correctly and will not capture video plays.
Copy link to clipboard
Copied
Thanks for posting this. It may come in useful for me in the near future.
Copy link to clipboard
Copied
I contacted Adobe about this. This is the reply.
"Reloading of the entire page was removed to reduce the time to switch between topics and also to remove the flickering on page load, so enabling them will reintroduce these issues. Even if it is based on user’s settings, it will not be an ideal user experience.
To solve this hooks need to be provided for various events, which will let user know when new topic is loaded, or search has been triggered and authors can add their analytics logic into these hooks. However, it is not on the immediate roadmap."
________________________________________________________
My site www.grainge.org includes many free Authoring and RoboHelp resources that may be of help.
Copy link to clipboard
Copied
It seems like you're facing issues with Google Analytics and Tag Manager in the frameless output, particularly with capturing search terms and video events. The problem might be related to the JavaScript handling page events. Consider checking the topicpage.js script, as it appears to be impacting the registration of new events.
Ensure that the JavaScript is appropriately configured to trigger events when navigating through the Table of Contents (TOC) in frameless mode. Also, verify if there are any differences in the way events are handled compared to the HTML5 version.
In summary, review and adjust the JavaScript handling in the frameless output to ensure proper event registration when accessing topics through the TOC. Verify that your scripts are correctly placed and executed to capture events without the need for manual page refresh.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now