Re: [phpOpenTracker-User] transaction / lead tracking
Daniel Kehoe <[email protected]> Thu, 18 Mar 2004 23:02:45 -0800
| Newsgroups | gmane.comp.web.phpopentracker.general |
|---|---|
| Message-ID | <[email protected]> |
On Mar 18, 2004, at 9:31 PM, Adrian Lanning wrote:
> Was wondering if anyone had done any tracking of transactions, sales,
> leads, etc
Yes, I've implemented "conversion" tracking, for sales, inquiries, or
signing up for announcements. It's helping my client measure the
effectiveness of pay-per-click advertising (actually, demonstrating my
client's ppc program is a waste of money :-)). I'm using reports which
show "conversions by source" (aggregate sales broken out by search
engines/search phrases or referrer) and "conversions in the last 24
hours" which shows a list of referrer/search engine/search phrase and
clickpath resulting in a sale.
i decided not to use the `pot_add_data` table. Instead, I added a new
table to the database:
CREATE TABLE `pot_conversions` (
`accesslog_id` int(11) NOT NULL default '0',
`client_id` int(10) unsigned NOT NULL default '0',
`sale` decimal(6,2) unsigned NOT NULL default '0.00',
`inquiry` tinyint(1) unsigned NOT NULL default '0',
`signup` tinyint(1) unsigned NOT NULL default '0',
`email` varchar(255) NOT NULL default '',
`zip` varchar(255) NOT NULL default '',
`country` varchar(32) NOT NULL default '',
`name` varchar(255) NOT NULL default '',
KEY `accesslog_id` (`accesslog_id`)
) TYPE=MyISAM DELAY_KEY_WRITE=1;
I wrote an API plugin for reporting:
class phpOpenTracker_API_conversions extends phpOpenTracker_API_Plugin
with three API calls:
'num_conversions',
'conversions',
'conversions_by_source',
I wrote a LoggingEngine plugin:
class phpOpenTracker_LoggingEngine_Plugin_conversions extends
phpOpenTracker_LoggingEngine_Plugin
implementing the pre() method.
I ran into a problem here and had to hack the phpOpenTracker distro,
specifically the Container class, because I needed access to a full
array of my conversion data in the LoggingEngine plugin. This was a few
weeks ago so I don't recall the issue in detail but it seems the data I
needed was discarded before I could log it unless I hacked the
Container. This is unfortunate because it will make
upgrades/maintenance painful.
I'm tracking sales on a site that is not a PHP site (it uses a
JSP/servlet shopping cart) so I hacked a javascript web bug that
collects the data on the site and passes it to my phpOpenTracker
server. I'd already made changes to the site to accommodate the Google
AdWords conversion tracking so it wasn't difficult to collect some of
the shopping cart session variables from a "thank you for your order"
page. Of course I needed to set up an https connection for my
phpOpenTracker server so the web bug wouldn't trigger a message "this
page contains unsecure elements."
That's about it. It took two day's work but phpOpenTracker is clean and
easy to extend so it wasn't difficult.
I'm happy to share my code if you'd like to see it. Really it would be
nice to clean it up and contribute it to the project. But that would
require making changes to the Container class or finding another way to
resolve that issue.
--
Daniel
[email protected]
http://www.fortuityconsulting.com/
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click