Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
Impressions left and clicks left are incorrect. Only show number for today not previous days.
Proposed resolution
See patch
Remaining tasks
Test
Comment | File | Size | Author |
---|---|---|---|
#1 | simpleads-campaign_summary-2528376-1.patch | 2.17 KB | Ada Hernandez |
#2 | simpleads-campaign_summary-2528376-2.patch | 1.79 KB | edysmp |
#2 | interdiff-1-2.txt | 2.19 KB | edysmp |
#5 | banner-stats.png | 41.94 KB | shevgeny |
#5 | campaign-stats.png | 31.57 KB | shevgeny |
Comments
Comment #1
Ada Hernandez CreditAttribution: Ada Hernandez at MTech, LLC commentedComment #2
edysmpThe return value needs to be unique, this patch does.
Note:
changes db_select by db_query for efficiency.
Comment #3
shevgeny#2, work for me, thanks :)
Comment #4
heddnBased on #3, marking RTBC.
Comment #5
shevgenyi'm sorry, but have any problems with displaying the remaining clicks. Сhecking.
Procedure:
1) Create a company to set a limit: 10 clicks.
2) yesterday made three unique transition - left 7.
3) Today went to the statistics - there were over 10.
Maybe last made changes to the node "campaign" will require more time to test.
Comment #6
heddnI don't read Russian. Can you take screenshots in English?
One thing to keep in mind, the campaign limit logic is a different place in the code. So it is very possible that you could set a limit to 10, the limit logic not function correctly, and have more than 10 unique impressions. Or again, the impressions left logic could still be broken...
Comment #7
shevgenyHere are on English.
Comment #8
edysmpSure that the start of the campaign is less than or equal clicks history saved ?
For testing purposes
Comment #9
shevgenyyes… see
Comment #10
shevgenyThere is an error in the calculation of the number of unique impressions and clicks on banners in the statistics. I assume that the uniqueness is only checked for the current day, and then summed up.
In the examples shown in the attachment and the campaign banner. I clicked on a banner yesterday and today, with the same IP-address. In the remaining clicks campaign shows the correct value, and the statistics summarized my banner yesterday and today click.
Comment #11
shevgenyUnique clicks / impressions should be calculated separately for each period (an hour, a day, a week, etc.).
Comment #12
minnur CreditAttribution: minnur as a volunteer commented