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

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

Adding Analytics to confluence space

Hi,

I'm having some issues implementing this guideline:

https://it.cornell.edu/confluence/add-google-analytics-confluence-space

I created page for the Google Analytics code.

I opened the wiki markup and pasted:

{html}

[gtag.js code copied from the Analytics property]

{html}

It all seems wrong though.

Problem #1 (see screenshot): {html} brackets are unrecognized macro (see screenshot). Obviously, the curly brackets are a macro character in Confluence, but why does the guideline state to put it in?

error1.png

Problem #2 (see screenshot): same here, but this time because of the curly brackets in the data layer push script from gtag.js: {dataLayer.push(arguments);}

error2.png

error2.png

1 answer

1 accepted

It looks like the html macro is not enabled on your Confluence. 

This question is tagged with unknown hosting type, so…

if your host name is something like yourcompany.atlassian.net, then you are on Confluence Cloud and the only way to use Google Analytics will be thorough an app on the marketplace:

https://marketplace.atlassian.com/search?query=Google%20analytics%20reports
 

If not, you’re likely on Confluence Server and again you can use an app from the marketplace, or enable the Html macro and continue as is. 

Thanks for you support @David Simpson _David Simpson Apps_ 

I use Confluence Server 7.6.2.

I see three HTML Macros on our system:

  1. HTML Comment
  2. HTML Image
  3. HTML Table

Should I use one of those for HTML code? if not, which one should I use?

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Confluence

🏑 Atlympic Event: Confluence

Hello Community!  Quick disclaimer: We are running a contest on Community (The Atlympics!) from July 23rd - August 8th of 2021. If you are interested in participating in this contest (prizes! ...

197 views 6 8
Read article

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