MailPilot Tracking + Lead Capture
=================================

Upload these files into the SAME folder as your existing tracking
(e.g. public_html/track/ on houseplandrawer.co.za):

  open.php          (already have)
  click.php         (already have)
  unsubscribe.php   (already have)
  events.php        (already have)
  subscribe.php     ← NEW
  popup.js          ← NEW

Test subscribe endpoint:
  curl -X POST https://houseplandrawer.co.za/track/subscribe.php \
    -H "Content-Type: application/json" \
    -d '{"email":"test@example.com","name":"Test User","list":"Website Subscribers"}'

Embed on any website (before </body>):
  <script src="https://houseplandrawer.co.za/track/popup.js"
    data-list="Website Subscribers"
    data-headline="Stay in the loop"
    data-sub="Subscribe for news and offers."
    data-button="Subscribe"
    data-delay="3"
    data-once="1"></script>

Or generate the code from MailPilot → Lead Capture.

MailPilot Settings → Tracking Server URL:
  https://houseplandrawer.co.za/track

MailPilot syncs every 60 seconds and creates contacts automatically.
