You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Oftentimes, anonymous users won't have a session. In that scenario, ads that are shown to them and ads that they click on won't be recorded. Django's SESSION_SAVE_EVERY_REQUEST setting won't help with this either. The render_ads_zone template tag and the AdClickView view both have this line:
ifrequest.session.session_key:
That line could be replaced with something like this:
You could also have the app support both behaviors (if you wanted to) with a setting like ADS_SESSION_KEY. If it's a string, use the behavior I proposed above. If it's None, use the current behavior. Its default value could be 'django-ads'.
Thoughts?
The text was updated successfully, but these errors were encountered:
Oftentimes, anonymous users won't have a session. In that scenario, ads that are shown to them and ads that they click on won't be recorded. Django's
SESSION_SAVE_EVERY_REQUEST
setting won't help with this either. Therender_ads_zone
template tag and theAdClickView
view both have this line:That line could be replaced with something like this:
You could also have the app support both behaviors (if you wanted to) with a setting like
ADS_SESSION_KEY
. If it's a string, use the behavior I proposed above. If it'sNone
, use the current behavior. Its default value could be'django-ads'
.Thoughts?
The text was updated successfully, but these errors were encountered: