homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

Is there a cookie script to open a browser window or send an email?

 6:55 pm on Nov 6, 2012 (gmt 0)

I have an advertiser who's getting 400 to 600 clicks a day from his ad on my site, but says he isn't getting any sales. I'd like to be able to know if any of the people who click on his ad go through his checkout.

I'm thinking that the best and simplest way would be to set a cookie on my site, and then have his thank-you page either open a 5x5 pixel browser window on my domain or send an email to me if the cookie is present.

Right now I have his ad opening a 5x5 pixel browser window that stays open for 12 seconds after the person clicks. I use this to track clicks. I'm thinking that this little page would be the place to set the cookie.

Is there a script that would do something like this that you're aware of, or do you know of somewhere I can find similar script?

Thanks for any replies.



 10:13 pm on Nov 6, 2012 (gmt 0)

I'm missing something. Why can't the javascript go straight from the click event to a function that sets the cookie? What's the extra window for? Last time I tracked clicks, I used innerHTML and a 1x1 pix dot-- but that was on a site that happened to have blank space, so the user wouldn't see a change.

Will it be the advertiser's cookie or yours? This may be the most important question, because a lot of browsers default to accepting cookies only from the site they're currently on. No third-party cookies.


 3:12 am on Nov 7, 2012 (gmt 0)

If he's running Google Analytics or similar, you should be able to set it to show the number of people who originate at your site and end at the thanks page


 10:57 am on Nov 7, 2012 (gmt 0)

If I understand correct: you have an ad on your site that sends people to another site, and you want to know if they buy anything there? You suspect he is holding back the sales so he don't have to pay you your commision?

Not much you can do if this is the case - you cannot inject a script into other peoples sites. Neither read their cookies.

Get another advertiser if the conversions are to low for the market segment.


 11:13 am on Nov 7, 2012 (gmt 0)

if you can figure out how to get his thank you page to request something from your server on the same domain as the cookie and if you can recognize that request then you could rewrite that request to a script that does whatever you need.
that script could update a tracking database, send an email, whatever.


 12:13 pm on Nov 7, 2012 (gmt 0)

I'm thinking that the best and simplest way would be to ... have his thank-you page either open a 5x5 pixel browser window on my domain or send an email to me if the cookie is present.

This bit implies that the OP is on speaking terms with the advertiser, and the advertiser is amenable to helping supply information. Otherwise he wouldn't be talking about having the advertiser's site do anything.

I don't see that it has to be anything more complicated than putting an administrative gif from your site on the other guy's page. Once the request hits your logs, it should be trivial to find or make a script that fishes it out. You don't even need cookies; with a bit of scripting or equivalent, you can pick up any information that's available to the Thank You page and pack it into the gif itself. As in:

GET /images/dot_CA_753.gif
= someone from California bought $753 worth of widgets.
GET /images/dot_MN_12.gif
= someone in Minnesota may be cheap, but every bit helps.
GET /images/dot1.gif
= someone has figured out how to do their online shopping with scripting turned off, but they can't hide entirely.

I'm just making this up based on stuff I've done in the past. You're either on good terms with your advertiser or you're calling his bluff. Either way you get the information at a cost of just a few bytes back and forth.


 5:34 am on Nov 17, 2012 (gmt 0)

lucy24, that solution is so simple I feel like an idiot for not thinking of it.

I think the guy is honest, but I also think he's put his faith in some analytics programs that don't give the full numbers. For example, the 5x5 pixel window on my site that opens when someone clicks his ad updates a field in the database by an increment of one. I started tracking this back on February 15th. The database shows 106,579. Databases, to the best of my knowledge, are either right or wrong. 1 doesn't equal 1.25 or .8.

I also follow that 5x5 pixel page in my SmarterStats program, which shows 106,855 clicks since 2/15. Also, Google Analytics shows 107,458. So there's a difference of a few hundred out of 100,000+.

His stats show more like 60,000 to 70,000 clicks to his site. His stats also show few or in some months no sales from these clicks.

When he told me he'd had no conversions this month, I told him to check November 6th, as I'd made a small purchase from his site, having clicked on his ad using a computer belonging to someone else not on my network. At first he couldn't find it.

He's indicating that he either doesn't think the ads are working, or he wants to pay less. He's paying the equivalent of 3.5 to 5.5 cents per click right now. I can't discount it any further. I need to show him that he's getting conversions. If he's not, then I have to find an advertiser who will get conversions.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved