mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-04-05 03:00:15 -04:00
Don't fire pixels or fetch trackers on requested ads.
This commit is contained in:
@@ -244,6 +244,8 @@ class ListingWithPromos(SubredditListingController):
|
||||
skip=False)
|
||||
res.parent_name = "promoted"
|
||||
if res.things:
|
||||
# update the css class so analytics.js can avoid firing pixels etc.
|
||||
res.things[0].rowstyle_cls += " requested"
|
||||
return res
|
||||
|
||||
def make_single_ad(self):
|
||||
|
||||
@@ -5,7 +5,9 @@ r.analytics = {
|
||||
init: function() {
|
||||
// these guys are relying on the custom 'onshow' from jquery.reddit.js
|
||||
$(document).delegate(
|
||||
'.organic-listing .promotedlink.promoted, .comments-page .promotedlink.promoted, .linklisting .promotedlink.promoted',
|
||||
'.organic-listing .promotedlink.promoted:not(".requested"), ' +
|
||||
'.comments-page .promotedlink.promoted, ' +
|
||||
'.linklisting .promotedlink.promoted:not(".requested")',
|
||||
'onshow',
|
||||
_.bind(function(ev) {
|
||||
this.fetchTrackersOrFirePixel(ev.target)
|
||||
|
||||
Reference in New Issue
Block a user