Tracking your users with Ajax, PHP and MySQL

  • 11 favourites



6,393 visits, 19,319 views


This tutorial hasn't been translated.


Setting up Ajax with Construct

This... is the easy part. Well, sorta.

In your construct project, insert a new object and select the Ajax object.

On one of your event sheets, like in the System On start of layout, add a new action and select Ajax Post to URL. If you want to know if the Ajax post went ok, add a tag, otherwise, it's not needed. In the URL text box, enter the url to the tracking.php script you uploaded. It should look like this: ""

Next, in the Data box, enter this: ""PV="&URLEncode(projectversion) & "&N="&URLEncode(projectname)"

This builds a string of data to be sent to the .php file. It includes the project version (PV) and the name of your project (N). The URLEncode makes sure it can be sent across the web properly.

And finally, in the Method box, put in: "POST:

And, hopefully, you're finished.


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