Home > Mobile >

Сampaigns autostop (if server is down or offer overcaped) (3)


04-19-2015 07:50 AM #1 MrHardwork (Member)
Сampaigns autostop (if server is down or offer overcaped)

I think, lots of us were in situations when server is down, offer overcaped, but we still flushing money.
I was in both of these situations in one day. Offer was overcapped at the night, server went down in lunchtime… I tried to find manual what to do in this case, but found nothing, except advices to sit like a broody over nest (tracker).

So, long story short, decision is simple. Only one sharp edge - it requires traffic source to have API. If no, you could just set SMS notification about overcap with this manual, you may skip to second step.

First step
Find a programmer (or maybe you know php little bit, it’s really easy code. It took about 1 hour and I’m not a pro programmer).
Give him the link to traffic source’s API manual and ask to code script which:
a) stops all campaigns in account
b) stop selected campaigns, with ID received by GET query.
If programmer is good - it will be enough for him. It’s about 50 rows of code and 1 hour. But this code varies from source to source, so you should have separate scripts for each traffic source you are working with.

Second step
Hola IFTTT.com!
You should connect IFTTT with your Gmail account (hope you use gmail) and select event «New email inbox from search».
Then you have to find message from:
a) your server monitor (uptimerobot.com for example) and copy it’s subject. In my case it looks like «subject:Monitor is DOWN: Yourserver».
b) you network with info about overcap.

Third step
Next step comes little bit tricky. IFTTT doesn’t allow to make direct URL query, but some guys made nice solution. (https://github.com/captn3m0/ifttt-webhook)
You need to choose integration with Wordpress, server: http://ifttt.captnemo.in
login and password could be random, they doesn’t play role.
Than select «create a post» and in message body enter link to your script (for sure it’s better to use not your main server). If you are going to stop selected campaigns, enter link with campaign ID via GET (your programmer will explain this).

Same with SMS notifications, but much easier. All you need to do is set recipe on IFTTT without coding and wordpress tricks.

DONE!
Now if something happens, your traffic will be stopped within 5 minutes.

If you have something to add, you are welcome.


04-19-2015 08:35 AM #2 qureyoon (AMC Alumnus)

Excellent addition to this guide http://stmforum.com/forum/showthread.php?t=21779

Thanks!


04-19-2015 02:11 PM #3 bbrock32 (Administrator)

This is a great idea!

IFTTT looks like a great solution for automating many AM related tasks.


Home > Mobile >