Skip to main content
Skip table of contents

Is Viewtracker - Analytics for Confluence compatible with Scroll Viewport?

Yes! Viewtracker is fully compatible with Scroll Viewport since Viewtracker version 5.5.1 and Scroll Viewport version 2.12.1. See Scroll Viewport Tracking

  • Please note that we are compatible with the Default Viewport templates. Extra modifications might be needed for new templates.

What if Viewtracker doesn't track?

First of all, make sure if you are using a default template or a customized template in Viewport. If you are using a customized layout and the tracking doesn't work, please make sure that you have the following statement in your HTML head:

CODE
## Includes web panels from location 'k15t.scroll-viewport.viewcontent'
$webPanels

Full HTML head:

CODE
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>$page.title - $space.name</title>
  
  	## Includes web panels from location 'k15t.scroll-viewport.viewcontent'
	$webPanels

    $include.template("/include/include-htmlhead.vm")

  ## The following jQuery script was provided by K15t as a workaround to solve the problem where links within an Include page do not work
  ## when viewing the page containing the incluide, in a Viewport. See https://k15t.jira.com/browse/VPRT-954
  ## This workaround only seems to work when you create the link using an Anchor macro.
  
    <script>
    $( document ).ready(function() {
        $('[data-macro-name="anchor"]').each((i,item)=>{
        var link = item.id.match(/-(\w*)$/)[1] 
        var anchor = $('a[href$="'+link+'"]') 
        anchor.attr('href', '#'+link) 
        item.id = link 
        })
    });
  </script>


</head>

URL Tracking in Scroll Viewport

The tracking of URLs for the URL Report may require an extra code snippet to ensure their functionality. This snippet must be inserted on the file named page.vm, immediately before the closing </body> tag.

You can find the code and an example screenshot below:

CODE
<meta id="confluence-context-path" name="confluence-context-path" content="">
<meta name="ajs-context-path" content="">
$webPanels.renderPanel("ch.bitvoodoo.confluence.plugins.viewtracker:viewtracker-k15t-viewport-autotrack-web-panel") 
image-20240626-121118.png

Screenshot demonstrating the insertion of the code snippet.


I need further support

If the options above do not solve this situation or tracking still does not work, please feel free to contact our support desk below:

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.