Skip to main content
Inspiring
January 2, 2020
Question

RH 2019: Google Analytics + Master Pages

  • January 2, 2020
  • 11 replies
  • 2089 views

I've inserted Google Analytics tracking code into the header/footer of master pages in RH 2017 and older, without issue. Trying to do the same with a brand new project created in RH 2019 and am having trouble.

 

If I insert the following code (I've replaced my tracking id with Xs for this post) in the header of a master page, as directed by Google:

<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=XXXXXXXXX"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());

gtag('config', 'XXXXXXXXX');
</script>

 

RoboHelp identifies the following error:

The attribute  [ async ]  must have a value.

Invalid character  s

 

Additionally, RoboHelp won't let me switch from the master page's code-view to its edit-view. Instead, it pops up a "Parse Error" dialog at the bottom right corner of RH stating:

Line: 6, Column: 15, Message: Invalid character s

 

Finally, while RoboHelp will allow me to save the change, if I attempt to create a new topic using this master page, the Google Analytics script/code is omitted from the header of the NEW topic. Note: I've also tried this with the footer; the behavior/result is the same.

 

Thoughts?

This topic has been closed for replies.

11 replies

Captiv8r
Legend
January 2, 2020

RoboHelp 2019 you said

 

Classic or the new baby?