Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal


  • Give kudos
  • Received
  • Given


  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Scroll Viewport - Page view Statistics/Analytics


I have the "Page View" Plugin installed as well have the "Activity" tracker enabled in my Confluence space (Scroll Version). As such I can view the activity details and page view statistics in my working space (Scroll Version).  

My audience refers to content using Viewport. 

My Query:  Is there a way/plugin that enables me to collect analytics on activities in Viewport? Page Hits/User details etc?







2 answers

1 accepted

4 votes
Answer accepted

Hi Bandy,


"Is there a way/plugin that enables me to collect analytics on activities in Viewport? Page Hits/User details etc?"

Sure this is possible. I assume you are using the "Page View" plugin from EliteSoft?

The plugin is using an Ajax call to track the page view in Confluence.

So what you would have to do, is performing a PUT-Request in your Viewport Theme if a page is visited.

To achieve that you would need to call this URL via an Ajax call.


To get the current page ID you would have to insert the following into your HTML-Head, which needs to be available on every page you want to track.

<meta name="pageId" content="${}">

You can access this information with the following JavaScript (this is using jQuery) and send it over to the tracking plugin:

Paste this code into your document.ready function. If you are using the Scroll Web Help Theme you will find this function inside the: theme.main.js file.

var pageId  = $('meta[name="pageId"]').attr('content');
var baseUrl = $('meta[name="ajs-base-url"]').attr('content');
var url    = baseUrl + "/rest/page-tracking-services/1.0/page-tracking/page-view";

    url: url,
    type: 'PUT',
    data: {'pageId': pageId}


If you don't want to track your own data you could exclude the specific user-group by adding a if statement around (either the script or around the meta tags) which check the current user-group.

<meta tags>

or create a meta tag for the user-group and check it in your JavaScript.

Hope this is solving your problem.

Let me know if it works out for you. Thanks and have a nice day.



Thank you Steffen.

I will try and work on your solution to see if it works for me. Am not much of a tech person so am not sure if I can implement this solution. Will  take some help from my tech guys here and will keep you updated. 




Hi Steffen,

I updated the theme as suggested in your response above. Am not able to see the page hit numbers anywhere. 

Can you please let me know where the page view hit details is getting reflected/stored?




Hi Bandy,

who is your audience? Do they have Confluence accounts or are they anonymous?

We at K15t present our content to anonymous users using Viewport and we use Google Analytics to keep track of views etc. That way we can also ignore all activities by logged in employees, so we don't distort the data.



Hi David, 

My audience for Viewport is anonymous.

Thank you. I will try and explore Google Analytics. 



Hi @David Majninger _K15t_ , 

How can we do the same? How do we insert the GA tracking code in the viewport? The view port seems to ignore the script added to Global Custom HTML.

I am also experiencing a similar problem. ScrollViewport seems to ignore the standard Confluence GA setup with Custom HTML.

We were later able to do this by customizing/adding the code to the theme's page.vm.

Hi @shehzad777 and @Adriane Hunt ,

Scroll Viewport is grabbing the content only from the Confluence page itself. This means, every HTML which isn't in the page content of the Confluence page isn't available in the viewport. The Global Custom HTML is one of those cases.
As Shehzad already figured out - you would need to put the GA code directly into your theme (page.vm).

Scroll Viewport comes now with a new and customizable Help Center Theme which also offers a Google integration out of the box. You just need to enter your Google Tracking ID and won't have to enter a code by yourself.



Like Adriane Hunt likes this

The new Help Center theme supports the GA integration out of the box. Just input your AnalyticsID or Tag Manager ID in the properties and you're good to go. More on that here:

Like Adriane Hunt likes this

Steffen, David,

Thank you both for the helpful information! I implemented the GA code in our WebHelp theme and it's working flawlessly! I also took a look at the new Help Center theme (Nice!) and might implement a version of it in the future. Many thanks!



Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Confluence

What do you think is the most *delightful* Confluence feature? Comment for a prize!

- Create your own custom emoji 🔥 - "Shake for Feedback" on mobile 📱 - An endless supply of GIFs via GIPHY 🤩 Is there anything quite as nice as a pleasant surprise? Comment below with what...

342 views 23 8
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you