Clickbank Tip – Turning On Instant Notification

moneyI’ve been focusing a lot more lately on selling Clickbank products because it seems to be the best return on investment (ROI) in my experience. However, it’s slightly annoying that Clickbank doesn’t notify you when you make sales.

If you do a bit of digging around though, you’ll find that you CAN set up a notification system – but only if you want to get your hands a tad dirty.

It took me a few tries to get it right, and I had to splice a bit of code together from a few different websites to come up with what seemed to be the right stuff – so I’m just going to post it for you here along with a step-by-step guide to turning on Clickbank notifications.

(Note: You’ll need access to your server to do this, otherwise you would have to contact your web host to upload the file for you.)

1. Log in to your Clickbank account. That’s kind of a “duh” one, but you never know.

2. Click the “Account Settings” tab and go to “My Site“.

3. At the bottom of the My Site page is an “Advanced Tools” bar with an empty field beside “Secret Key” and “Instant Notification URL“. Click “Edit“.

4. You’ll need to request access to Instant Notification, so click that URL.

5. Read over the terms and agree to them. Submit the form.

6. Enter a Secret Key in the Secret Key field. The secret key can be up to 16 letters or digits and must be ALL CAPS.

7. Copy this code into a plain text file, (I use Notepad) and save it to your desktop as a php file. For example, I saved mine as cb.php so it was easy to remember. Make sure to change your email address in the code to your own before saving it as well as the secret key you came up with in the previous step.

<?php

function cbValid() {

$key='YOUR_SECRET_KEY_HERE';
$ccustname = $_REQUEST['ccustname'];
$ccustemail = $_REQUEST['ccustemail'];
$ccustcc = $_REQUEST['ccustcc'];
$ccuststate = $_REQUEST['ccuststate'];
$ctransreceipt = $_REQUEST['ctransreceipt'];
$cproditem = $_REQUEST['cproditem'];
$ctransaction = $_REQUEST['ctransaction'];
$ctransaffiliate = $_REQUEST['ctransaffiliate'];
$ctranspublisher = $_REQUEST['ctranspublisher'];
$cprodtype = $_REQUEST['cprodtype'];
$cprodtitle = $_REQUEST['cprodtitle'];
$ctranspaymentmethod =
$_REQUEST['ctranspaymentmethod'];
$ctransamount = $_REQUEST['ctransamount'];
$caffitid = $_REQUEST['caffitid'];
$cvendthru = $_REQUEST['cvendthru'];
$cbpop = $_REQUEST['cverify'];

$xxpop =
sha1("$ccustname|$ccustemail|$ccustcc|$ccuststate|$ctransreceipt
|$cproditem|$ctransaction|"

."$ctransaffiliate|$ctranspublisher|$cprodtype|$cprodtitle|$ctranspaymentmethod
|$ctransamount|$caffitid|$cvendthru|$key");

$xxpop=strtoupper(substr($xxpop,0,8));

if ($cbpop==$xxpop) return 1;
else return 0;
}
if (cbValid())
mail("YOUR_EMAIL_ADDRESS_HERE", "ClickBank - " .
$_REQUEST['ctransaction'],"Product: " . $_REQUEST['cprodtitle'] . "\nPublisher: " . $_REQUEST['ctranspublisher'] . "\nAffiliate: " . $_REQUEST['ctransaffiliate'] . "\nTransaction: " . $_REQUEST['ctransaction'] . "\nAmount: " . $_REQUEST['ctransamount']);

?>

Or you can download the file here. Make sure to change the file extension from .txt to .php before uploading it.

8. Put that file on your server using an FTP program. I chose to upload the file right to my root directly so the URL ends up being:

http://www.mydomain.com/cb.php

(Hopefully you already have one and know how to use it. If not, leave a comment and I’ll help you out.)

9. Back in the Clickbank site, enter that URL (http://www.mydomain.com/cb.php) – after replacing “mydomain” with your own of course – into the Instant Notification URL 1: field. I left the second field blank.

10. Before saving changes, click on “Test” to make sure everything is hunky dory. You should receive a test email to the email address you put in the php file.

11. A window should pop up to notify you that the test was a success. Hooray! Now you can save changes.

Now you’ll receive an email each time you make a Clickbank sale. Sweet, hey?

Time Sensitive Note: I’ve got another Clickbank tip coming up in Monday’s MamasOnTheWeb Newsletter (June 15th, 2009) – one that I just implemented and increased my sales – so make sure you sign up! It’s the form to the right –>> :)

Related reading:

If you liked this post, you may want to subscribe to my RSS feed and stay up to date with future posts. Thanks so much for visiting MamasOnTheWeb!

RT @cassiegermsheid: "Clickbank Tip – Turning On Instant Notification"

30 comments ↓

#1 Perry Wolf on 06.15.09 at 10:44 am

Yo Mama,

Cool post, I think most people don’t go through this process because they’re afraid they can’t program PHP, but as your simple step guideline suggests, all they need is Copy & Paste abilities!

Great Post.

Regards,
Perry Wolf.

#2 Cassie on 06.15.09 at 10:51 am

Thanks Perry :)

It really is fairly simple and it’s SO NICE to receive emails now for sales notifications. No more signing in to Clickbank all the time.

#3 Perry Wolf on 06.15.09 at 11:16 am

Another nice thing about it, which you don’t get with ClickBank’s receipt email, is it tells you if, and who, the Affiliate is who referred the sale. :)

Perry.

#4 Cassie on 06.15.09 at 11:28 am

According to the Clickbank blog, you can even make your browser “ding” when you make a sale! There are lots of variables you can add to that code. It’s pretty cool stuff.

#5 Eugene on 07.09.09 at 8:19 pm

Thanks. Excellent post. You made the whole process so simple to follow. You definitely have saved a lot of my time to try to figure from CB’s own guide.
Eugene´s last blog ..T Harv Eker’s The Wealthy Warrior – Self Mastery (6 – final) My ComLuv Profile

#6 Cassie on 07.10.09 at 9:08 am

Awesome Eugene, that was my goal. I’m glad it worked for you. Thanks for commenting! :)

#7 Marco on 07.18.09 at 3:16 am

I tried it. All I got in my email was this:
Product:
Publisher:
Affiliate:
Transaction:
Amount:

All details blank.

#8 Cassie on 07.18.09 at 11:42 am

Hi Marco,

If I remember correctly, I’m pretty sure that’s the way it’s supposed to be. When you make a sale, it will send you some actual numbers.

#9 Gaida on 07.18.09 at 4:15 pm

Thank you for the great tip…. It’s so much easier when you’re shown how to do it. Will definitely give it a try.

#10 Cassie on 07.18.09 at 4:19 pm

Thanks Gaida, if you need any help just let me know. Thanks for stopping by. :)

#11 Internet marketing strategies on 07.18.09 at 9:58 pm

Hi Cassie,

Andrew here. I was doing the same thing but I was wondering why it does not work for me until I saw your last portion, which is to get the results and do something with the results. Finally can get some fun going with my own customization ideas.

For those who wants to know if it is working, you should see these values (these are default values by clickbank for testing purposes) in your email after clicking Test on your Instant Notification URL:

——————————
Product: A passed in title
Publisher: (This will present your affiliate ID)
Affiliate:
Transaction: TEST
Amount: 100
——————————

Hope this helps for others and thanks Cassie for showing me the “light” or rather, the code.

Regards,
andrew
Internet marketing strategies´s last blog ..Using Free Traffic System For The First Time My ComLuv Profile

#12 Internet marketing strategies on 07.18.09 at 9:59 pm

Just one more thing, what comment plugin are you using such that it can show the commenter’s last blog post too?
Internet marketing strategies´s last blog ..Using Free Traffic System For The First Time My ComLuv Profile

#13 Cassie on 07.19.09 at 10:28 am

Hi Andrew,

Thanks for the clarification on the test email. I deleted mine so I couldn’t remember what it was supposed to say!

The plugin I use to show your last blog post is CommentLuv. It’s one of the few plugins I really love. :)

Thanks for stopping by!

#14 10.5 Cool Tools and Tasty Tips on 07.21.09 at 1:34 pm

[...] 4. Clickbank Sales Notifications [...]

#15 Colleen @ Buy Wholesale Product on 09.04.09 at 7:34 am

Thanks Cassie,

I have been looking everywhere for tips on how to make the notifications work. I am going to set it up right now.
Colleen @ Buy Wholesale Product´s last blog ..Wholesale Drop Ship – Get Great Deals My ComLuv Profile

#16 Cassie on 09.04.09 at 7:36 am

@Colleen – I hope everything works for you! Let me know if it doesn’t. :)

#17 Susan on 09.08.09 at 10:32 pm

What if you are using affiliate accounts and do not have access to the main web site? How can you get notified of a sale when the website is not your own?

#18 Cassie on 09.09.09 at 10:15 am

Hi Susan,

Do you mean you don’t have access to Clickbank or just the website you’re using? If you don’t have an account with Clickbank where you can log in with your own email address, then you won’t be able to change the notification settings. If you mean the website, and you’re using a non self-hosted domain like blogspot or wordpress.com, then you won’t be able to access the server to upload the file to. If you have a webmaster though, you can ask them to do it for you. Hope this helps!

#19 DFB on 10.29.09 at 5:54 pm

Hello,

Thanks for the detailed instructions.

I have an affiliate account with CB. I followed your instructions all the way through. Clicked on “Test” and it said “successful”, but I didn’t get the test email (as you mentioned). Now couple days have passed, I made a sale too, but still no emails from CB. I went and tested it again. It gave me the same “successful” message again.

Am I missing something?

Thanks again for your help.

#20 Cassie on 10.29.09 at 7:16 pm

Hey DFB. Sorry to hear it’s not working for you.

I’m not technical at all so the only idea I have is there is something wrong in the code for your cb.php file. Are you sure you have your cb.php file in the right spot according to the URL? Did you type the URL into your address bar? When I do, I just get a white screen. I’m guessing that’s what it’s supposed to do… (see, not technical).

Did you double check your email address? Did something else get changed somehow? Even one little miss-placed character or punctuation mark in the code can keep it from working.

#21 DFB on 10.29.09 at 7:34 pm

Hello Cassie,

Thanks for your prompt response. As I mentioned earlier, when I test the script, CB says it’s able to communicate successfully with the script.

Also, if I give a wrong URL for the script, it gives me an “unsuccessful” message. Infact, earlier I had tried to host the script on Google Sites (and some other sites) but CB won’t accept it (because Google Sites and those other sites don’t support php scripts). Then I managed to find a proper hosting site and uploaded the script there and this time CB accepted it.

I copied the script from this post and made exactly 2 changes to it:

1. The secret key
2. Email address

Is there anything else that needs to be changed in the script?

Thanks again.

#22 Cassie on 10.29.09 at 8:41 pm

No, just those two things need to be modified. I’m stumped.

Did you check your junk box? Your ISP could have blocked it as spam.

#23 DFB on 10.29.09 at 8:48 pm

Yes, actually I did that first thing when I didn’t get the mail. I’m using Gmail, BTW.

Anyways, I really appreciate all your help. Sooner or later, I’ll figure it out and post the resolution here.

Thanks.

#24 Cassie on 10.30.09 at 9:46 am

That would be great DFB. Thanks! Good luck :)

#25 Don on 11.09.09 at 11:27 am

Hi Cassie,
This is a great post, but unlike all the successful posts I have a problem, I see your are no techie but I will try anyway. I have done all as you suggest and when I click test it said there was an error, so I checked the URL adn this comes up first time:
Secure Connection Failed

http://www.jdfmarketing.com uses an invalid security certificate.

The certificate is only valid for the following names:
*.bluehost.com , bluehost.com

(Error code: ssl_error_bad_cert_domain)

any help here, anyone else posting on here had similar issues? Hope you can help!
Top job by the way!
Don
Don´s last blog ..Welcome to the website of Don Finch, UK Copywriter. My ComLuv Profile

#26 Cassie on 11.10.09 at 1:29 pm

Hi Don,

Thanks for commenting! I’m sorry it’s not working for you. When I have those kinds of problems, I google the crap out of them until I find a solution. Hopefully someone else reading this may have an answer for you since I’m a bit stumped on this one.

#27 DFB on 11.27.09 at 8:58 am

Hello Cassie,

I’m back with the fix, as promised. Actually I didn’t look into this issue until today. Finally, I spent some time and managed to fix it.

The only thing I really changed was a couple of line breaks that crept in during copy n paste of the code from your page into file. The one that may have actually caused the problem was in the sha1 call (the really long line). I removed those extra line breaks, uploaded the code again and everything worked fine.

If you want, you can take note of this issue as a common pitfall people need to be aware of.

Otherwise you have done a great job of putting the instructions together.

Thanks for your help.

- DFB
DFB´s last blog ..PMP Exam Passing Score – Not a Number Game anymore My ComLuv Profile

#28 Cassie on 11.27.09 at 11:15 am

Thanks DFB. I was worried about possible line breaks so I also added a downloadable file to the post. Thanks for pointing that out. I’m glad you got it working!

#29 Alex on 11.30.09 at 10:06 am

Hey Cassie,

thank you very much for the code. I works perfectly for me!

Have a great day!
Alex´s last blog ..Cambios importantes en la publicación de artículos My ComLuv Profile

#30 Cassie on 11.30.09 at 10:08 am

Excellent Alex! I’m glad to hear that. Thanks for stopping by. :)

Leave a Comment

CommentLuv Enabled