Offers now store if they are paid ad eligible #797
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds two new fields to the offer table:
paid_eligible
- whether this offer could be a paid adis_proxy
- whether the offer is to a proxy/vpnThese were combined so we have a single migration against the offers table.
Whether an offer could be paid requires the publisher to be approved for paid campaigns and that the request didn't exclude paid campaigns.
Note: This does not yet change the aggregations to only aggregate on paid eligible ads. There's a couple gotchas with that that I wanted to discuss before moving forward. Most of our KPIs use the
RegionImpression
orTopicImpression
models. We can fairly trivially change those aggregations to requirepaid_eligible
but that means that unpaid (pre-approval) impressions won't even show up at all. One option is to requirepaid_eligible
if and only if the publisher is approved for paid campaigns.