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

Adding Analytics to confluence space

Guy Ben Moshe June 30, 2021

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

0 votes
Answer accepted
David at David Simpson Apps
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
June 30, 2021

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. 

Guy Ben Moshe July 1, 2021

Thanks for you support @David at 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
AUG Leaders

Atlassian Community Events