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?
If you want to use Google Analytics you could add the code to the Custom HTML section in Confluence Administration. Anything there is run on every Confluence page.
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'd put it in the footer. And it will be as if you had embeded the code on every page. Anything in the custom html section will be run on every page of your site.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Davin,
Will putting it in the footer still provide individual statistics for each page, or just an aggregate of views for all pages?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Not totally sure what you are asking. It is just like embedding the code on any web site in the footer. It will run on each page and report that data to Google Analytics for that page.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
rather than:
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'MYGOOGLEANALYTICSID');
</script>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey Alain,
I've met the same issue, when I was trying to embedded ga code in every confluence pages (actually I m doing same to every pages of JIRA).
Did you find the workaround to solve it?
I appreciate it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Austin,
I did! I installed Google Analytics by resolution GmbH (it's free) and that was it. No need to embed code on every page.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can find it directly from the 'Find new add-ons' section in Confluence.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Alain. there is no free Google Analytics addon by resolution GmbH in "Find new add-on" . And I figured it out, this looks like, for Confluence Cloud website.
Im looking for a similar thing to Confluence server only.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Alain! A third-party app from the Atlassian Marketplace is the best option to track views of every page (e.g. Page View, Viewtracker).
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for you reply, Zak. Both of these, however, only seem to work with Confluence Server, but we are using Confluence Cloud. I'll see if I can find one in the Market Place for Cloud.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.