Adding IP Recording to Web Campaign Clicktracking
WARNING
This information is provided with no warranty of any kind-- USE AT YOUR OWN RISK. It is provided here
IP-TO-ID
IP-to-ID is the latest trend in capturing leads. So many anonymous visitors walk by your website, articles, and other marketing pieces. Every time they do, they leave an IP address. You can use this to identify who they are, but only if you have it. This article shows you how to gather IP address information into sugar, easily, and effectively so that the data is captured and easily accessible through the GUI with few modifications.

SugarCRM/CE Non-Email Campaign Tracking URL Data
If you've used SugarCRM/CE for campaigns, specifically non-email campaigns (such as banner add, or google ad tracking) you don't receive any information except that you got a click. It would be nice to know whom.
Google, for example, won't give you the IP or any analytic data on the clicker for privacy reasons (We were told this by a Google Adwords Account Exec, Jason). Other than knowing whether you're getting traffic, it doesn't help a whole lot.
We thought it would be handy to also record the IP address of the clicker in the SugarCRM campaign log. You can then use the IP address with any number of analytical data providers to determine possible who or what.
SugarCRM/CE Forums/Feature Request
Complete details were posted to the SugarCRM Forums here (but this may change as they change their forum):
Make backups of your files and database first.
Let's hope this feature becomes a part of SugarCRM.
It is posted here in case it is unreachable on their forum:
Add IP Address in Campaign Web Tracking URLs
It is easy enough to set up a campaign with tracking URLs so that is not discussed here. However, the only thing that get's logged to the campaign_log table is that an event occurred and the date and time. You don't get any information about the user.
That is unfortunate. It leaves you with nothing to work with.
With one simple line you can add the link clicker's IP address.
This works in SugarCRM 6.2.4
- Go to the file:[document root]/sugarcrm/modules/Campaigns/utils.php
- Open the file and go to line 177 and add the following AFTER that line:
Now you will get the user's IP address and might be able to tie that into an analytics system to identify who/what/when.Code:$data['more_information']="'" . $_SERVER['REMOTE_ADDR'] . " [" . $_SERVER['REMOTE_HOST'] . "]" . "'";
Caveats:
If you have reverse dns turned off on your webserver for performance the REMOTE_HOST part will be blank. This can be solved by a call to gethostbyaddr() but that can cause serious delays in your CRM with DNS timeouts. If you would like this capability implemented so that you may do IP-TO-ID mapping in such a way that won't cause delays in the CRM please contact me via email to dbeecher at tekops dot com.
Making it Run Faster
A little more work needs to be done.
In order to compensate for potential timeouts on reverse-DNS lookups this has to be done in a slightly better way. Contact our Sales team ( This e-mail address is being protected from spambots. You need JavaScript enabled to view it / 702-933-6275) if you would like this done. We can do it for a fixed price of $125.00.
--Engineering





