phpemailtracker

PHP email click tracker tool


I am doing a PHP tool to track my email campaigns (only for my customers, not for spamming).

The logic is the following:

  1. Number of sent emails.
  2. Number of people who open the email.
  3. Number of people who clicks on the link inside the email.
  4. Final conversion number.

The thing is: I know how to count the sent and opened emails. But not how to track the number of customers that click the link inside the email and if that customer do conversion or not. Any idea?

Btw: I can share the repo to develop the tool together if you're interested :)

Thank you folks!


Solution

  • Typically, with emails like these, the visual link is quite short "Read more" for example. The actual link itself will be stuffed with GET parameters such as "?campaign=ABCDEF123&emailtype=control&segmentid=23". You would make use of $_GET to pull out these values and store those in whatever medium you prefer. The same principle applies for your conversions by embedding values into the form submission ($_POST) or link clicking ($_GET).