If you are a beginner Twine user and want a little extra help, here is a step-by-step of what you need to do to install TW-Analytics on your story.
For WINDOWS:
-
This requires NodeJS go to this address and install it: https://nodejs.org/en/
-
Wait for Node.js to finish installing. You will probably need to reboot your PC.
-
Open the win command prompt (either search for "cmd" in the start menu or click WIN KEY + R and type "cmd" (without the quotations), press enter)
-
The command prompt will open. Type npm i "-g tw-analytics" (without the quotations) and press enter.
-
Now it's time to make your Google Analytics account. Go to https://analytics.google.com/ and make one. When you're done, take not of your analytics ID
-
Now it's time to patch your story. We recommend making a new copy of it just in case. Let's say it's called "Story_copy.html"
-
Go to the folder where Story_copy.html is located. Press ALT + D. You will go to the nav bar. Just type "cmd" and hit enter.
-
The command prompt is now open, targeting the specific folder. To patch the file, just write "twga --id=GA-11111-1 -i Story_copy.html";
Replace GA-11111-1 with your Google Analytics ID and Story_copy.html with your file name.