Can anyone offer any advice on creating a way to track sales from leads, much like how it is handled by google adwords?

I use Adwords, but also have other links I would like to track from some banner ads, email newsletters, and general directory listings.
I also have some offline stuff that I could use a special url for if I had a way to track from entry point to sale.

Any thoughts? I have no experience with cookie creation but I thought that would be one way to go, or perhaps use an online service, if there is such a place that can provide this service.

I currently use Hitbox to monitor the site, but it is not a tool to really track conversion / sales from multiple sources, especially when the sales cycle is a few days to a few months.

thanks for any thoughts or suggestions.

timezone

Dani AI

Generated

For : a practical, reliable way to track conversions across AdWords, banners, email and offline promos is to combine link tagging, a persistent visitor ID (cookie), and a server-side event store that links visits to later conversions. Tag every campaign link (utm_ or your own params), capture that first-touch on landing, persist a generated visitor_id in a long-lived cookie, and record both first-touch and subsequent touches in a small tracking table. When an order or lead is submitted, attach that visitor_id to the conversion record so you can attribute back to the entry channel even if the sale happens days or months later.

Suggested implementation flow:

  • Tag all marketing links with campaign parameters.
  • On landing: if no cookie exists, generate a UUID visitor_id, set a persistent cookie (e.g., 90–365 days), and insert a first-touch row: visitor_id, first_source, first_campaign, landing_url, first_ts.
  • On each subsequent visit update last-touch fields and/or append a visit row so you retain a history for multi-touch analysis.
  • On conversion (checkout or lead form) write a conversion row that references visitor_id and captures order_id, value, conversion_ts.
  • For offline channels use unique vanity URLs, promo codes, or call-tracking numbers that hit a logging/redirect endpoint which sets the cookie and then redirects to the public landing page.

Example minimal landing handler (PHP):

<?php
// if campaign params present, set persistent visitor id and note first-touch
if (isset($_GET['utm_source'])) {
  $vid = $_COOKIE['vid'] ?? bin2hex(random_bytes(16));
  setcookie('vid', $vid, time()+60*60*24*365, '/');
  // INSERT INTO tracking (visitor_id, first_source, landing_page, first_ts) VALUES (...)
}
?>

Cautions: cookies can be cleared and don’t solve cross-device tracking, so when a lead provides an email or phone capture that identifier (hash it) and match back to historical visitor_id rows. Store raw events so you can run first-, last-, or multi-touch attribution later. Also comply with privacy and cookie-consent laws before setting non-essential persistent cookies. As reminded, keep discussion in one thread; this post summarizes a practical path you can build on or hand off to a developer.

Recommended Answers

All 2 Replies

No one has any thoughts on this? Someone must have some advice.

Thread is also listed here:

[thread]30972[/thread]

To keep this site organized, we ask that you please only post your question one time in one place. This way, everyone can see and respond to all of the replies and follow just one single thread.

Thanks!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.