Game Development Reference
In-Depth Information
Save it somewhere on your computer and then open up your actual game project in
GameMaker.
Right-click on the extensions listing in the resource tree and choose Import Extension
from the drop-down list. Then, navigate to and load the analytics extension. This should
add the Google Analytics extension that is ready for use.
Now, the only thing we need to do is initialize the extension. Open up your main control
object and on a new line, add the GoogleAnalytics_Init function. For the first ar-
gument, paste the app ID from the Google Analytics website. The second argument is to
ask if this is a dry run. A dry run is a run of the game that does not send any events even if
told to do so. Set this to 0 to allow events to run.
That's all we actually need to do to have stats show on the Google Analytics website, as
location data and general stats are all automatic from this point on.
Search WWH ::




Custom Search