When creating a network-level plugin, the is_multisite function becomes very useful to determine whether or not a site is configured as a multisite. In the recipe, we used it to register callbacks to be called when building different menus (the regular single site administration menu and the network management menu). We also used the is_multisite function when registering the actual menu item and to determine where users should be redirected after saving options.
The other useful functions in these modifications are get_site_option and update_site_option. When called in a multisite configuration, these functions will retrieve network-level options from the database. Alternatively, when running on a regular single site, they will default to access site-level options. By using these functions in our updated code, we make all the interactions with site options compatible with single and multisite installations.
The last element of this recipe relates to how we activated this plugin at the network level. This means that it will be active in all sites created in the network. More specifically, in the case of our plugin, this means that all the sites will output Google Analyics code in their header, with the associated account being specified once on the network configuration.