Overview#
In Omeka S, there is a module called Google Analytics for enabling Google Analytics.
https://github.com/Libnamic/Omeka-S-GoogleAnalytics/
When enabling this module, there were cases where the following error message was displayed.
Undefined index: additional_snippet in (...) /modules/GoogleAnalytics/Module.php on line 316

The following issue had also been raised regarding this.
https://github.com/Libnamic/Omeka-S-GoogleAnalytics/issues/9
I will share the method for addressing this issue.
Fix Method#
Make the following changes.
https://github.com/Libnamic/Omeka-S-GoogleAnalytics/pull/10/commits/0123ce557d0f38834c5c37fa1ac9c986c87cbc90
Specifically, the changes are as follows.
Before#
After#
Summary#
I am not entirely confident that the above changes are completely correct, but I have also submitted a pull request.
https://github.com/Libnamic/Omeka-S-GoogleAnalytics/pull/10
I hope this serves as a useful reference.