Problem/Motivation

Impressions left and clicks left are incorrect. Only show number for today not previous days.

Proposed resolution

See patch

Remaining tasks

Test

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Ada Hernandez’s picture

Status: Active » Needs review
FileSize
2.17 KB
edysmp’s picture

The return value needs to be unique, this patch does.

Note:

changes db_select by db_query for efficiency.

shevgeny’s picture

#2, work for me, thanks :)

heddn’s picture

Status: Needs review » Reviewed & tested by the community

Based on #3, marking RTBC.

shevgeny’s picture

Status: Reviewed & tested by the community » Needs review
FileSize
41.94 KB
31.57 KB

i'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.

heddn’s picture

I 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...

shevgeny’s picture

FileSize
93.6 KB
87.27 KB

Here are on English.

edysmp’s picture

Sure that the start of the campaign is less than or equal clicks history saved ?
For testing purposes

shevgeny’s picture

FileSize
37.26 KB
108.41 KB

yes… see

shevgeny’s picture

FileSize
50.49 KB
63.83 KB

There 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.

shevgeny’s picture

Status: Needs review » Needs work

Unique clicks / impressions should be calculated separately for each period (an hour, a day, a week, etc.).

minnur’s picture

Status: Needs work » Closed (won't fix)