• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Adding Script to Index file

Explorer ,
Apr 22, 2021 Apr 22, 2021

Copy link to clipboard

Copied

I'll try to explain this as best I can. I am working with Robohelp 2019 and am wondering if there is a way to add a script tag in the index.html document of the manual within the source files so it is there every time the manual is published.  It is easy to go into the Outputs folder and add the script to the head there, I'm wondering if there is a way to add it to the source files so that the script doesn't need to be added every time a new version is published. I hope that makes sense. We are wanting to track the traffic on our manuals and this script will help us do that. 

Thanks

TOPICS
Scripting

Views

319

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Explorer , Apr 30, 2021 Apr 30, 2021

Adding the script to the default topic seems to be giving us the data we're looking for.

 

Votes

Translate

Translate
Community Expert ,
Apr 22, 2021 Apr 22, 2021

Copy link to clipboard

Copied

Add it to the Master Page in the project & apply to topics.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 22, 2021 Apr 22, 2021

Copy link to clipboard

Copied

So, I only want the script to be in the code of the index.html file and not other topics in the manual. Is there a way to do that? 

Thanks

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 22, 2021 Apr 22, 2021

Copy link to clipboard

Copied

Oops, I should add that when I say 'head' of the file I'm meaning the <head> section of the html code.

 

Thanks

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 22, 2021 Apr 22, 2021

Copy link to clipboard

Copied

I'm not clear how a script in the index file will help as typically tracking scripts are added to all the topics so that you get information on which pages are visited.

 

However, if your script somehow has that covered, the index file opens the project with the default topic. Why not add it to that as you would just it once and then it would be there every time you generate.

________________________________________________________
See www.grainge.org for free Authoring and RoboHelp Information

Help others by clicking Correct Answer if the question is answered. Found the answer elsewhere? Share it here. "Upvote" is for useful posts.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 23, 2021 Apr 23, 2021

Copy link to clipboard

Copied

We are simply wanting to track how often our users are accessing the manuals themselves and not needing to track activity on the individual topic pages.  Peter, I did think about adding it to the default topic since that is the one that opens the whole manual. I'm not an expert on scripting so I wasn't sure if the index would read as a frameset or if the tracking script would log the page in the topic window (if that makes sense).  I'll start with the default topic and check how the tracking goes.  Thanks for the suggestions.

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 25, 2021 Apr 25, 2021

Copy link to clipboard

Copied

If you're using New UI and Frameless output, I suspect you will only get statistics when people open that specific page. My reasoning is that Frameless doesn't use frames or iframes, so the code will only be accessed when someone opens "http://mysite.com/path/index.htm" (and gets redirected to "My default topic"), or specifically navigates to "My default topic" using the toc, or search or a link. For Frameless output I think you would need to add the code to the master page to ensure you record people who don't visit the index.htm page or default topic (e.g. use a saved bookmark to "http://mysite.com/path/SomeTopic.htm" )

 

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 30, 2021 Apr 30, 2021

Copy link to clipboard

Copied

LATEST

Adding the script to the default topic seems to be giving us the data we're looking for.

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
RoboHelp Documentation
Download Adobe RoboHelp