Placing multiple pixels - can this be done with a simple html reference?

Status
Not open for further replies.

Sonny Forelli

Well-known member
May 8, 2008
2,330
89
48
Liberty City
Take the situation where you need a prosper pixel placed along with another network pixel.

Instead of having the CPA network place 2 pixels is it possible to simply have them place something like:

<img height="1" width="1" border="0" style="display: none;" src="https://myprosper202domain.com/pixel.html"/>

and then within this pixel.html file paste both my normal prosper pixel and the network pixel inside

<html>
<body>
prosper pixel pasted here
network pixel pasted here
</body>
</html>

I've tested this and it doesn't seem to be working- is this because I'm an idiot and an image tag can't reference a .html file? Anyway to make this work easily?

Thanks
 


Yeah, that's not going to work because when the browser requests your page it's expecting an image (binary) not html.

It is easy to do what you're doing however. Just have them place your prosper pixel and then have your prosper pixel redirect to the network pixel as the last thing it does.

I forget how I did it, but I have it setup where it pulls the campaign of the conversion and then can fire any other pixels I want based on the campaign. I could look, but I'm heading out the door now.
 
Yeah, that's not going to work because when the browser requests your page it's expecting an image (binary) not html.

It is easy to do what you're doing however. Just have them place your prosper pixel and then have your prosper pixel redirect to the network pixel as the last thing it does.

I forget how I did it, but I have it setup where it pulls the campaign of the conversion and then can fire any other pixels I want based on the campaign. I could look, but I'm heading out the door now.

Is this something that you wrote or a script/modification that was discussed/published.

This is exactly what I need.
 
More of a hack really. You have to go into your p202 database to get the id of the offer you want this to work for. This is what the end of my prosper202 pixel looks like. I would post the whole thing, but I don't know what other crap I've shoved in there and I don't want to confuse anyone.

As always, backup your shit before you change it!

Code:
if ($mysql['click_id']) {

        //ok now update and fire the pixel tracking
        $click_sql = "UPDATE 202_clicks SET click_lead='1', click_filtered='0'  WHERE click_id='".$mysql['click_id']."' ";
        delay_sql($click_sql);

        $click_sql = "UPDATE 202_clicks_spy SET click_lead='1', click_filtered='0' WHERE click_id='".$mysql['click_id']."' ";
        delay_sql($click_sql);

//THIS IS WHERE THE ADDITIONAL CODE STARTS

        $sql = 'SELECT aff_campaign_id FROM 202_clicks WHERE click_id=' . $mysql['click_id'];
        $result = mysql_query($sql);
        if($result && mysql_num_rows($result)) {
                $obj = mysql_fetch_object($result);
                $campaign_id = $obj->aff_campaign_id;

                //Now let's check with the campaigns that we've placed pixels for.
                $campaign_hash = array();

                //MyOffer1 with database id 23
                $campaign_hash[23] = "https://thirdpartypixel.com/img.jpg";

                //MyOffer2 with database id 61
                $campaign_hash[61] = "https://otherthirdpartypixel.com/img.jpg";

                if(!empty($campaign_hash[$campaign_id])) {
                        header('Location: ' . $campaign_hash[$campaign_id]);
                }

        }

}
 
a) have network place js script as your pixel
b) write a little js script to
i) fire img pixels (u can use doc.write)
ii) load 3rd party js pixels in iframe's
 
use .htaccess rewrite and make that image pixel fire a php script ... from there you can update as many records as you want (across many domains) and then just return a single pixel to the network.

... unless I misunderstood the question
 
Status
Not open for further replies.