Name |
Date |
Size |
#Lines |
LOC |
||
---|---|---|---|---|---|---|
.. | Today | - | ||||
conf/ | H | 04-Nov-2020 | - | 22 | 18 | |
lang/en/ | H | 04-Nov-2020 | - | 53 | 31 | |
test/ | H | 04-Nov-2020 | - | 70 | 59 | |
CHANGELOG.md | H A D | 03-Nov-2020 | 1.7 KiB | 51 | 31 | |
LICENSE | H A D | 03-Nov-2020 | 17.7 KiB | 340 | 281 | |
README.md | H A D | 03-Nov-2020 | 3.3 KiB | 61 | 34 | |
action.php | H A D | 03-Nov-2020 | 3.5 KiB | 132 | 90 | |
admin.php | H A D | 03-Nov-2020 | 681 | 35 | 18 | |
admin.svg | H A D | 03-Nov-2020 | 1.1 KiB | 9 | 8 | |
plugin.info.txt | H A D | 03-Nov-2020 | 298 | 8 | 7 | |
script.js | H A D | 03-Nov-2020 | 3.1 KiB | 90 | 56 |
README.md
1# Google Analytics for DokuWiki 2 3## License 4 5* **Author**: [Terence J. Grant](mailto:tjgrant@tatewake.com) 6* **License**: [GNU GPL v2](http://opensource.org/licenses/GPL-2.0) 7* **Latest Release**: v1.1.0 on Nov 3rd, 2020 8* **Changes**: See [CHANGELOG.md](CHANGELOG.md) for full details. 9* **Donate**: [Donations](http://tjgrant.com/wiki/donate) and [Sponsorships](https://github.com/sponsors/tatewake) are appreciated! 10 11## About 12 13This tool allows you to set a code for use with [Google Analytics](https://en.wikipedia.org/wiki/Google_Analytics), which allows you to track your visitors. 14 15This plugin generates JavaScript code that is automatically included into your site via the `lib/exe/js.php` file. (Which you can inspect via your browser's "developer tools.") 16 17Set the options for this plugin via the **Configuration Settings** menu from the DokuWiki admin menu. (It will be near the bottom of the page.) 18 19You may use one of two tracking options: 20 21 * **Basic** "Google Analytics ID" (also known as "[analytics.js](https://developers.google.com/analytics/devguides/collection/analyticsjs)") using a **UA-XXXXXX-XX** code 22 * **Newer** "Global Site Tag ID" (also known as "[gtag.js](https://developers.google.com/analytics/devguides/collection/gtagjs)") using a **G-XXXXXXXXXX** code 23 24If you set a "Global Site Tag ID", then this method will be used and any "Google Analytics ID" / **UA-XXXXXXX-XX** specific settings will be ignored. 25 26## Advanced Usage 27 28To use the advanced "tagging" features of `analytics.js` or `gtag.js`, you will need to be able to embed JavaScript within your DokuWiki pages. You can accomplish this in one of three ways: 29 30 * [Enabling embedded HTML](https://www.dokuwiki.org/wiki:syntax#embedding_html_and_php) in your local DokuWiki instance (Look for `htmlok` in Configuration Settings) 31 * Allow embedded JavaScript via a plugin like the [InlineJS Plugin](https://www.dokuwiki.org/plugin:inlinejs) 32 * Edit your site's template to add "tagging" directly 33 34Allowing embedded HTML / JavaScript will give you the most flexibility for per-page tagging, but it can open your site to [Cross-site Scripting](https://en.wikipedia.org/wiki/Cross-site_scripting) attacks if you're not careful. If you lock down who can edit your wiki pages and trust your users, you should be fine though. 35 36If you edit your template (the third option), make sure to make notes of what you change, as "upgrading" your template will revert any changes you've made. 37 38## Install / Upgrade 39 40Search and install the plugin using the [Extension Manager](https://www.dokuwiki.org/plugin:extension). Refer to [Plugins](https://www.dokuwiki.org/plugins) on how to install plugins manually. 41 42## Setup 43 44All further documentation for this plugin can be found at: 45 46 * [https://www.dokuwiki.org/plugin:googleanalytics](https://www.dokuwiki.org/plugin:googleanalytics) 47 48## Contributing 49 50The official repository for this plugin is available on GitHub: 51 52* [https://github.com/tatewake/dokuwiki-plugin-googleanalytics](https://github.com/tatewake/dokuwiki-plugin-googleanalytics) 53 54The plugin thrives from community contributions. If you're able to provide useful code changes or bug fixes, they will likely be accepted to future versions of the plugin. 55 56If you find my work helpful and would like to give back, [consider joining me as a GitHub sponsor](https://github.com/sponsors/tatewake). 57 58Thanks! 59 60--Terence 61