I'd like to know how I can track page views for each page in a given space. I found the Google Analytics plugin, but this requires adding the code to every single page which is not feasible.
I'd like to be able to see the most and lead viewed pages at a glance. Any thoughts?
You can enable the native Confluence Usage statistics plugin to see the most popular spaces and pages, but this plugin is known to cause performance issues in larger instances and has less functionality for tracking the views of individual pages.
Thanks for your response. I have a few follow-up questions:
1) Is this to be added in the header or footer section of 'Look and Feel?'
2) If the custom HTML does go in the header or footer, will iI receive analytics for each page individually, or is it going to aggregate all the views as one page?
I want to make sure that by adding it to the footer, the Google Analytics will show:
Total Site Views - 45
Page 1 - 10 views
Page 2 - 15 views
Page 3 - 20 views
Total Site Views - 45, but not individual page stats.
Given your reply, it sounds like it will be broken down by page. Thanks again for your help.
I attempted to added the code for Google Analytics to the footer in Confluence, but receive the following error message on the page:
com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'datalayer.push(arguments);' is unknown.
Any idea what could be wrong? The code I am using is:
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-6686090-48"></script>
window.dataLayer = window.dataLayer || ;
gtag('js', new Date());
Hi my Community friends! For those who don't know me, I'm a product marketer on the Confluence Cloud team - nice to meet you! For those of you who do, you know that I've been all up in your Co...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs