Home > Technical & Creative Skills > Programming, Servers & Scripts

Propellerads - Python script to find whitelist/blacklist zone (14)


09-07-2021 05:13 AM #1 noobmarketer (Member)
Propellerads - Python script to find whitelist/blacklist zone

I just started trying POP with some low payout offer. I realised I needed to find whitelist / blacklist fast and systematically.

Came across this thread:

https://stmforum.com/forum/showthrea...Banners-Part-2

But it's a pain to manually put data in, especially when in propellerads there are hundreds if not thousands of zones.

So I wrote a python script to do grab campaign and zone stats from each campaign and plug the numbers into the formula mentioned above.

Output:

/PycharmProjects/PropellerAdsAPI/venv/bin/python propellergrab.py


-------
Campaign ID: 4697223 Name: xxxxx
Impressions: 4394 Conversions: 3 Spent: 1.24 Revenue: 1.05 Profit: -0.19
Calculated CR: 0.068% Lower CR: 0.025% High CR: 0.152%
Minimum Viable CR: 0.097% Verdict (campaign): KEEP RUNNING!


Whitelist:
[3507363]
Blacklist:
[]
-------
Campaign ID: 4700143 Name: xxxx
Impressions: 151 Conversions: 0 Spent: 0.14 Revenue: 0.00 Profit: -0.14
Calculated CR: 0.000% Lower CR: 0.000% High CR: 1.513%
Minimum Viable CR: 0.325% Verdict (campaign): KEEP RUNNING!


Whitelist:
[]
Blacklist:
[]
-------
Campaign ID: 4697864 Name: xxxx
Impressions: 6319 Conversions: 5 Spent: 4.47 Revenue: 1.75 Profit: -2.72
Calculated CR: 0.079% Lower CR: 0.039% High CR: 0.147%
Minimum Viable CR: 0.242% Verdict (campaign): BLACKLIST!


Whitelist:
[4292258]
Blacklist:
[4485812]
-------
Campaign ID: 4700266 Name: xxxx
Impressions: 579 Conversions: 0 Spent: 0.67 Revenue: 0.00 Profit: -0.67
Calculated CR: 0.000% Lower CR: 0.000% High CR: 0.397%
Minimum Viable CR: 0.394% Verdict (campaign): KEEP RUNNING!


Whitelist:
[]
Blacklist:
[]
-------
Campaign ID: 4698479 Name: xxxx
Impressions: 6349 Conversions: 0 Spent: 4.49 Revenue: 0.00 Profit: -4.49
Calculated CR: 0.000% Lower CR: 0.000% High CR: 0.036%
Minimum Viable CR: 0.242% Verdict (campaign): BLACKLIST!


Whitelist:
[]
Blacklist:
[4485812]
-------
Campaign ID: 4697670 Name: xxxx
Impressions: 10305 Conversions: 24 Spent: 14.60 Revenue: 8.40 Profit: -6.20
Calculated CR: 0.233% Lower CR: 0.174% High CR: 0.306%
Minimum Viable CR: 0.485% Verdict (campaign): BLACKLIST!


Whitelist:
[3915512]
Blacklist:
[2798595]
-------
Campaign ID: 4697658 Name: xxxx
Impressions: 5348 Conversions: 7 Spent: 2.32 Revenue: 2.45 Profit: 0.13
Calculated CR: 0.131% Lower CR: 0.073% High CR: 0.220%
Minimum Viable CR: 0.148% Verdict (campaign): KEEP RUNNING!


Whitelist:
[3507363, 3753999]
Blacklist:
[]


Process finished with exit code 0

And here's the script:

https://drive.google.com/file/d/1eHA...ew?usp=sharing


Declaration:
1) You will need your API Key on PropellerAds. Requested under user profile/api access. Parameters are defined at the top of the file.
2) This script does not create/stop/change any of the campaigns/zones. All actions are taken manually on the web UI.
3) My programming knowledge stems from 20 years ago and only brushed up just a little bit recently. It probably isn't the best way to write code.
4) You will need to install the requests/textwrap/datetime(?) module before you can run this.
5) I'm only working with popunder ads, these may not work with in-page and push campaigns!

Hope this helps someone!


09-07-2021 06:35 AM #2 twinaxe (Senior Moderator)

Thanks for sharing, it's great to see another member of the python gang


09-07-2021 10:36 PM #3 vortex (Senior Moderator)

Very nice - thank you @noobmarketer!

At this rate, I may set up a "Python Automation" subforum pretty soon!

One consideration though about using that formula for pop: That formula is highly accurate, but requires a ton of data in order to reach a "verdict". For pop traffic which has hundreds/thousands of placements, it will take a ton of ad spend.

This is what I would suggest:

1)Only use the formula for the highest-volume placements (where the extra accuracy may be worth the extra spend in collecting enough data to reach a "verdict").

OR

2)Just use a rule of thumb, such as cutting a placement when it's over 2-3x payout in loss.



Amy


09-07-2021 11:05 PM #4 affpayinggao (Veteran Member)

Awesome, thanks for sharing this


09-08-2021 03:46 PM #5 jeremie (Moderator)

Quote Originally Posted by vortex View Post
At this rate, I may set up a "Python Automation" subforum pretty soon!
Yeah


09-09-2021 10:31 AM #6 twinaxe (Senior Moderator)

Quote Originally Posted by jeremie View Post
Yeah
Whoop whoop


09-09-2021 11:27 AM #7 noobmarketer (Member)

It seems we can blacklist pretty fast. The formula is valid when np>5 (or nq which will definitely be >5).

From what I gather, the CR is about 0.2% on most pop offers. (Am I right?) Anyway, if it's any higher, it just means we could confirm earlier.

So, 2500 views with no conversions, very high chance that funnel is not working in that zone.


09-09-2021 12:17 PM #8 twinaxe (Senior Moderator)

From what I gather, the CR is about 0.2% on most pop offers. (Am I right?)
No, this is a very generic assumption and in no way applicable for most offers.

It can vary alot depending on geo, targeting, connection, conversion flow, payout etc.

So, 2500 views with no conversions, very high chance that funnel is not working in that zone.
I also don´t recommend to use this as a general statement.

A converting campaign with only 1 LP and 1 offer is completely different from a test campaign with 3 LPs and 4 offers.

Also as I said before, don´t only go by views, also consider the spend.

You don´t pay your trafficsource in views and you don´t get paid from the affiliate networks in views.

You pay with money and you get paid in money so this should be the most important factor to judge if a campaign is profitable or not.


09-11-2021 12:04 AM #9 vortex (Senior Moderator)

Quote Originally Posted by noobmarketer View Post
It seems we can blacklist pretty fast. The formula is valid when np>5 (or nq which will definitely be >5).

From what I gather, the CR is about 0.2% on most pop offers. (Am I right?) Anyway, if it's any higher, it just means we could confirm earlier.

So, 2500 views with no conversions, very high chance that funnel is not working in that zone.
^^What @twinaxe said, 100%.

You can't set a cut-off based on CR or views alone. Because there are other variables that decide whether you're profitable or not.

To illustrate with an example:

Say you're bidding $1 CPM. You're testing 3 offers.

OfferA with $10 payout converts at 0.01%, so 1 conversion per 10000 impressions or $10 in spend.

OfferB with $1 payout converts at 0.1%, so 1 conversion per 1000 impressions or $1 in spend.

OfferC with $0.10 payout converts at 1%, so 1 conversion per 100 impressions or $0.10 in spend.

All 3 offers are converting at break-even. Yet the CR and impressions/conversion are vastly different.



Amy


09-11-2021 01:05 AM #10 twinaxe (Senior Moderator)

To illustrate with an example:

Say you're bidding $1 CPM. You're testing 3 offers.

OfferA with $10 payout converts at 0.01%, so 1 conversion per 10000 impressions or $10 in spend.

OfferB with $1 payout converts at 0.1%, so 1 conversion per 1000 impressions or $1 in spend.

OfferC with $0.10 payout converts at 1%, so 1 conversion per 100 impressions or $0.10 in spend.

All 3 offers are converting at break-even. Yet the CR and impressions/conversion are vastly different.
Amen


09-13-2021 04:03 PM #11 noobmarketer (Member)

Absolutely.

I was working with a particular set of variable, and hence it became constant with the offers i was working with.

it is in fact reflected in the code, however the criteria with the code has been evolving as I test more and more and got some data back.

I now run this every 2 minutes on my raspberry pi, spitting out an html to give an overview of current stats.

This is most helpful since the UI on propellerads and funnelflux is not mobile friendly.


09-13-2021 08:51 PM #12 jeremie (Moderator)

Why are you using a Raspberry Pi? Any particular reason?


09-13-2021 08:53 PM #13 twinaxe (Senior Moderator)

Quote Originally Posted by jeremie View Post
Why are you using a Raspberry Pi? Any particular reason?
For quite some time I also think about getting a Raspberry Pi just for fun


09-13-2021 09:12 PM #14 noobmarketer (Member)

Quote Originally Posted by jeremie View Post
Why are you using a Raspberry Pi? Any particular reason?
Not really. Bought it just for fun much earlier. This is the perfect use case. Low power, always on, and it doesn't get in the way.


Home > Technical & Creative Skills > Programming, Servers & Scripts