Tracking your users with Ajax, PHP and MySQL

  • 11 favourites

Index

Stats

5,103 visits, 14,827 views

Translations

This tutorial hasn't been translated.

Tools

What this tutorial is

A quick, simple and dirty way of tracking the users of your project with one simple event in Construct. It assumes you have access to a MySQL database (most hosts provide those now), phpMyAdmin or some other interface to MySQL as well as a web server where you can ftp and run .php files.

If you don't have your own web hosting I strongly recommend you get one. Hosts like GoDaddy provide everything you need for (currently) less than $10.00 US per month.

What this tutorial is not:

Instructions on how to use MySQL, phpMyAdmin or any other MySQL interfaces or how to write scripts in PHP. For the purposes of this tutorial, it's assumed you'll be using phpMyAdmin.

What you'll need:

Your own web host with access to a MySQL interface like phpMyAdmin.

A way to FTP files up to your web host.

A web host running PHP 5.0.0 or higher.

C2 (of course)

If you haven't already created a MySQL database with your host's control panel, you'll need to do so. Make sure that it's set to allow outside access. Some hosts default to only allowing the database to be accessed from your domain. It may warn you this is a security risk but it's not like you're keeping national secrets. Also, make note of the username and password you created, you'll need those.

The rest will be handled by this tutorial.

What you should end up with:

A searchable MySQL database that tracks usage of your game/app and provides you with data like: what version they're using, their IP Address (handy for knowing what country your users are from), the date and time they started your game/app (useful for tracking daily, weekly, monthly usage), and more.

  • 0 Comments

  • Order by
Want to leave a comment? Login or Register an account!