Add google analytics to the HTML documentation

Description

Optaplanner uses a version of pressgang that allows to add the google analytics snippet in the HTML generated. That would be super handy, let's just look at Optaplanner's trick.

if you have some quick pointers for us, ship them in

PS: they have the script nicely degrading when no internet is present and all that jazz.

Environment

None

Activity

Show:
Geoffrey De Smet
May 27, 2015, 6:20 AM

Also check your GA settings if they filter the view on only the domain name hibernate.org for example (but that wasn't the case for me, it just worked).

Emmanuel Bernard
May 27, 2015, 6:52 AM

Yes I tested online as you told me the file:// deactivates the script. The test is at http://docs.jboss.org/hibernate/ogm/secret-test/html_single/

There seem to be several things going on.
When I look at http://docs.jboss.org/optaplanner/release/6.2.0.Final/optaplanner-docs/html_single/index.html your script version is different (that's not non tag manager version)

On http://docs.jboss.org/hibernate/ogm/secret-test/html_single/ I don't see a abine.stub.Google Analytics script in the headers like in Optaplanner's case. Also there are a lot of other tracking scripts which are inserted by the docs.jboss.org Apache I suppose.

I am attaching the index.html that I generate that does not have the additional scripts.

Emmanuel Bernard
May 27, 2015, 7:01 AM

hum, actually, now it works. Go figure!
Thanks Geoffrey for all your help!

Geoffrey De Smet
May 27, 2015, 7:07 AM

You're welcome Once we release 6.3.0.Beta1, we 'll also be using the newer (GTM) version of the script for docs. On our website (optaplanner.org), we already use the GTM version.

Emmanuel Bernard
May 27, 2015, 7:27 AM

BTW, the xslt adds all the other tracking scripts. I tried on an other host and that's not apache injecting them.

Assignee

Emmanuel Bernard

Reporter

Emmanuel Bernard

Labels

None

Feedback Requested

None

Feedback Requested By

None

backPortable

None

Suitable for new contributors

None

backportDecision

None

backportReEvaluate

None

Components

Fix versions

Priority

Major
Configure