1
votes

I have a couple of systems (google adwords, tradedoubler) that I have to track sale conversions for. The problem is, I want to send the conversion notification not as a pixel code where the user sees it, but in the IPN (Instant Payment Notification) background check. I tried to do something like this:

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_BINARYTRANSFER,1);

curl_exec($ch);

where $url would be the src attribute for the img tag. Unfortunately, the conversion is not logged. Anyone have any experience with this?

I'm not sure if I've made myself clear so feel free to ask questions.

1
Have you tried changing the user agent string? - Ja͢ck
I thought that the back-end which I am querying might be checking headers or user-agent, but haven't really tried this. - donk

1 Answers

0
votes

Here's a library that can take care of server-side tracking:

http://code.google.com/p/php-ga/

However, this doesn't do conversion tracking. This is because conversions are measured using cookies that are set on the user's machine and passed along when they request the pixel. The server-side doesn't have access to those cookies, because it's in a different domain.

It's possible to hack together some JavaScript code that collects the Adwords cookies and passes those down to your server, but you have to really really want this :)

Alternatively, investigate in using a different set of PayPal API's, such as Direct Payment or Payflow.