Can we gather analytics (via Google) on Confluence usage by pasting the javascript below into the page template header for any pages we want to track.
Can I do this within Confluence?
<script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-35048994-1']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); </script>
Community moderators have prevented the ability to post new answers.
Yes, you can perform it within Confluence. Please, refer to the following path:
Browse > Confluence Admin > 'Look and Feel' - Custom HTML > Edit
Through this page, insert your javascript where you want. In this case, at 'end of the HEAD'.
Kind Regards
Interesting.. i will try this way.
Thanks, Srinivas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Does this need to have the AJS.toInit included before the function in the JavaScript to make it work in Confluence?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Does this work on a space level?
I am only interested in tracking the one space not all.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can apply it universally in Confluence, then within Analytics you can set up a view that shows only the analytics for a particular space by providing the URL.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks all!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@federico This is for Confluence Server only, where you can add custom JavaScript.
For Confluence Cloud, this is not possible, so you'll need to use an add-on such as:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I just downloaded your product, working fine so far! Thanks, David.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
There's some additional tips here:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Also you can check this plugin:
This plugin displays reports for an external Confluence website, or a particular space...please check if this plugin suits for you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes. I already tried that. This requires a license though :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi! I want to do this only for one space. I go to Browse>Space Admin>Look and Feel>Themes>Configure theme>Messages>Header and enter the script there using the {html} macro (we're on conf 3.5).
However, Conf removes the leading bracket from <script>, and removes the closing tag </script> altogether. I even tried making a custom macro {html-script}, but the result is the same. Adding the script to an individual page works ok.
Please help!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Go to:
It works pretty well, I'm sure ;)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
All,
We have enabled google analytics and I would like to get metrics (page views and duration etc) on a specific confluence page and email to a particular user group.
Note: I'm not looking for a paid solution. The videos out there are old or specific to paid solution.
Thanks in advance
Udhay
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
And Udhay asked in a separate question...
https://answers.atlassian.com/questions/299080/how-to-enable-page-statistics-on-google-analytics-for-a-specific-page
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Srinivas, Please tick the right answer if it worked for you. Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Community moderators have prevented the ability to post new answers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.