Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nmoinvaz/nsis-ga
Google Analytics for NSIS
https://github.com/nmoinvaz/nsis-ga
Last synced: 21 days ago
JSON representation
Google Analytics for NSIS
- Host: GitHub
- URL: https://github.com/nmoinvaz/nsis-ga
- Owner: nmoinvaz
- Created: 2012-10-21T21:50:03.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2013-05-15T07:16:24.000Z (over 11 years ago)
- Last Synced: 2024-05-02T01:05:32.108Z (6 months ago)
- Size: 148 KB
- Stars: 11
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Google Analytics for NSIS
This script will allow you to add google analytics event tracking into your NSIS installer. It is useful for tracking installer based events such as the number of successful installs that occured, or the number of offers accepted, or the number of users who clicked the donate button.
Specify the include at the top of your nsh script:
```
!include "ga.nsh"
```To track an event use the following
```
!insertmacro GoogleAnalytics "YOUR_ACCOUNT_ID" "Category" "Action" "Label" "Value"
```Example events to track:
```
Function .onInit
!insertmacro GoogleAnalytics "YOUR_ACCOUNT_ID" "Install" "Started" "" ""
FunctionEnd
Function .onInstFailed
!insertmacro GoogleAnalytics "YOUR_ACCOUNT_ID" "Install" "Failed" "" ""
FunctionEnd
Function .onInstSuccess
!insertmacro GoogleAnalytics "YOUR_ACCOUNT_ID" "Install" "Success" "" ""
FunctionEnd
Function .onGUIEnd
!insertmacro GoogleAnalytics "YOUR_ACCOUNT_ID" "Install" "Ended" "" ""
FunctionEndFunction un.onInit
!insertmacro GoogleAnalytics "YOUR_ACCOUNT_ID" "Uninstall" "Started" "" ""
FunctionEnd
Function un.onUninstFailed
!insertmacro GoogleAnalytics "YOUR_ACCOUNT_ID" "Uninstall" "Failed" "" ""
FunctionEnd
Function un.onUninstSuccess
!insertmacro GoogleAnalytics "YOUR_ACCOUNT_ID" "Uninstall" "Success" "" ""
FunctionEnd
Function un.onGUIEnd
!insertmacro GoogleAnalytics "YOUR_ACCOUNT_ID" "Uninstall" "Ended" "" ""
FunctionEnd
```
This script requires the use of [logiclib](http://nsis.sourceforge.net/LogicLib) script and [inetc](http://nsis.sourceforge.net/Inetc_plug-in) plugin. Tested only with the non-Unicode version of NSIS.