You can add your Google Analytics code to the 'index.html' template file that the Juicebox Plugin for Lightroom uses to generate the gallery's 'index.html' file. (You can do this before or after the plugin has been installed.)
Location of file to modify before installation:
Extract the 'juicebox_pro_1.5.1.zip' file and you'll find the 'index.html' template file in this location:
juicebox_pro_1.5.1\adobe-lightroom-plugin\juicebox_pro.lrwebengine\index.html
Location of file to modify after installation:
Mac: Users/Username/Library/Application Support/Adobe/Lightroom/Web Galleries/juicebox_pro.lrwebengine\index.html
Windows: C:\Users\Username\AppData\Roaming\Adobe\Lightroom\Web Galleries\juicebox_pro.lrwebengine\index.html
Just open the plugin's 'index.html' file in a plain text editor and add your Google Analytics code to it as you would for a regular gallery's 'index.html' file.
There is some Lightoom-specific code in the file (mostly at the top) but you'll see the regular HTML <head> and <body> tags which should let you know where to add your Google Analytics code.
Then, each time you generate a new gallery with the plugin, your Google Analytics code will automatically be in place.
I hope this helps.