Skip to content

x.com: ads #20792

Closed
Closed

Description

Prerequisites

  • This is NOT a YouTube, Facebook or Twitch report.
  • I read and understand the policy about what is a valid filter issue.
  • I verified that this issue is not a duplicate. (Use this button to find out.)
  • I forced an update of my filter lists. (Click the "Purge all caches" button while holding the 'Shift' key, then click the "Update now" button.)
  • I did not remove any of the default filter lists, or I have verified that the issue was not caused by removing any of the default lists.
  • I did not enable additional filter lists, or I have verified that the issue still occurs without enabling additional filter lists.
  • I do not have custom filters/rules, or I have verified that the issue still occurs without custom filters/rules.
  • I am not using uBlock Origin (uBO) along with other content blocker extensions.
  • I have verified that the web browser's built-in blocker or DNS blocking (standalone or through a VPN) is not causing the issue.
  • I did not answer truthfully to ALL the above checkpoints.

URL address of the web page

https://twitter.com/

Category

ads

Description

It seems twitter has done something so now ads are appearing in replies along with For You Page and Following.

Other extensions used

none

Screenshot(s)

Screenshot(s)

image

Configuration

Details
uBlock Origin: 1.53.0
Chromium: 119
filterset (summary):
 network: 103611
 cosmetic: 43778
 scriptlet: 19072
 html: 0
listset (total-discarded, last-updated):
 default:
  user-filters: 4-0, never
  easylist: 75532-16, now
  easyprivacy: 32902-64, now
  plowe-0: 3718-1078, now
  ublock-badware: 7423-137, now
  ublock-filters: 35634-156, now
  ublock-privacy: 680-5, now
  ublock-quick-fixes: 114-37, now
  ublock-unbreak: 2155-32, now
  urlhaus-1: 9970-0, now
filterset (user): [array of 4 redacted]
trustedset:
 added: [array of 1 redacted]
 removed:
  chrome-scheme
userSettings: [none]
hiddenSettings: [none]
supportStats:
 allReadyAfter: 337 ms
 maxAssetCacheWait: 148 ms
popupPanel:
 blocked: 15
 network:
  twitter.com: 13
  ads-twitter.com: 1
  google-analytics.com: 1

Activity

  1. gorhill commented on Nov 20, 2023

    @gorhill
    Member

    I can reproduce. Investigating an optimal solution.

  2. polymorphicshade commented on Nov 21, 2023

    @polymorphicshade

    I forgot how cancerous the ads are on twitter...

  3. gorhill commented on Nov 21, 2023

    @gorhill
    Member

    My suggestion (if filter authors agree):

    twitter.com##article path[d^="M13.1"]:upward([data-testid="cellInnerDiv"])
    

    For browsers which supports native :has(), it could be plain CSS selector:

    twitter##[data-testid="cellInnerDiv"] article:has(path[d^="M13.1"])
    

    cc @ryanbr


    Since :has() is enabled by default in Firefox 121 (currently beta), I suggest we go with the second form).

  4. Hakkin commented on Nov 21, 2023

    @Hakkin

    path[d^="M13.1"] seems to match the verified business icon? I'm seeing ads from accounts without that icon. [data-testid='cellInnerDiv']:has([data-testid='placementTracking']) seems to block it for me, though obviously placementTracking is some kind of debug tag so Twitter could change it at will.

  5. unbeatable-101 commented on Nov 21, 2023

    @unbeatable-101

    I added twitter##[data-testid="cellInnerDiv"] article:has(path[d^="M13.1"]) to my filters and still am seeing ads, from accounts with verified business icons as well.

  6. SakhG commented on Nov 21, 2023

    @SakhG

    [data-testid='placementTracking'] seems to block it for me

    placementTracking is used for media in regular tweets

    example: https://twitter.com/AzaelOfficial/status/1726754958480232620

  7. gorhill commented on Nov 21, 2023

    @gorhill
    Member

    ## article:has(span:has-text(/^Ad$/))

    Efficiency-wise, this is a terrible filter, span returns hundreds of matching elements, which means :has-text() will have to iterate through all those elements.

    I advise people to not paste into my filters any such suggestion from non-experienced filter list authors. The goal here is to find the minimum set of efficient filters which fulfill the task.

    For now I will add twitter##[data-testid="cellInnerDiv"] article:has(path[d^="M13.1"]) to the list, we can improve on it thereafter.

  8. Hakkin commented on Nov 21, 2023

    @Hakkin

    twitter##[data-testid="cellInnerDiv"] article:has(path[d^="M13.1"]) blocks every tweet from any verified business account, which has nothing to do with ads.

  9. gorhill commented on Nov 21, 2023

    @gorhill
    Member

    If you want to report issue with that filter, post your troubleshooting information, this is a necessary step, just saying "it doesn't work" doesn't work:

    Go to twitter.com, click the uBO toolbar icon > Click the chat icon 💬 > Click "Troubleshooting Information" > Report content here (https://www.reddit.com/link/173jmog/video/bogwf92af9tb1/player)

  10. gorhill commented on Nov 21, 2023

    @gorhill
    Member

    @Hakkin Please post examples of tweets from such "verified business" which is not an ad.

  11. Hakkin commented on Nov 21, 2023

    @Hakkin

    @Hakkin Please post examples of tweets from such "verified business" which is not an ad.

    All the tweets on https://twitter.com/ibm, for example. There are many other verified business Twitter accounts.

  12. added a commit that references this issue on Nov 21, 2023
    e9c8e8a
  13. gorhill commented on Nov 21, 2023

    @gorhill
    Member

    Ok I spotted one such verified business which was not an ad. Reverted.

  14. RambIing commented on Nov 21, 2023

    @RambIing
  15. 104 remaining items

  16. Yuki2718 commented on Nov 24, 2026

    @Yuki2718
    Member

    @repparw @lumynou5 Can you also share JSON of /SearchTimeline, /TweetDetail, and /UserTweets, if you see promoted_metadata in them?

  17. lumynou5 commented on Nov 24, 2026

    @lumynou5

    If /SearchTimeline is for search, I didn't see that; instead /SearchByRawQuery is requested:

    data.search_by_raw_query.search_timeline.timeline.instructions.[].entries.[-].content.content.promoted_metadata

    entries seems to be the same structure as /HomeTimeline (if the instruction is add), but I haven't find a real ad or boosted post yet.

  18. dlukt commented on Nov 24, 2026

    @dlukt
  19. repparw commented on Nov 24, 2026

    @repparw

    @Yuki2718 I captured /TweetDetail by opening a post from the Home timeline in Helium. The request used Fetch (HTTP 200). The complete response contained four TimelineTweet items with promoted_metadata at:

    data.threaded_conversation_with_injections_v2.instructions[].entries[].content.items[].item.content.promoted_metadata

    Here's one sanitized item from that response:

    {
      "__typename": "TimelineTweet",
      "tweet_results": "REDACTED",
      "promoted_metadata": {
        "ad_metadata_container": "REDACTED",
        "advertiser_results": "REDACTED",
        "click_tracking_info": "REDACTED",
        "impression_id": "REDACTED"
      }
    }

    In a separate capture, I saw one labeled conversation ad with a twclid link, and its post ID appeared in the TweetDetail response body. I haven't verified the exact parent of that ID in the response. I don't have verified /SearchTimeline or /UserTweets samples yet.

  20. repparw commented on Nov 24, 2026

    @repparw

    @Yuki2718 I checked search and profile by navigating from inside X in the same Helium session. I observed different operation names:

    • Search used /SearchByRawQuery. Three HTTP 200, untruncated responses contained 62 timeline tweet items in total under data.search_by_raw_query.search_timeline.timeline.instructions.
    • The profile used /UserOriginalsTimeline. One HTTP 200, untruncated response contained 21 timeline tweet items under data.user_result_by_screen_name.result.profile_user_originals_timeline.timeline.instructions.

    I found neither promoted_metadata nor promotedMetadata in the sampled timeline structures. I did not capture /SearchTimeline or /UserTweets themselves. These samples cover three searches and one profile, so I don't have a positive example from either surface.

  21. added a commit that references this issue on Nov 25, 2026
  22. Yuki2718 commented on Nov 25, 2026

    @Yuki2718
    Member

    Thank you guys, updated filters based on trust built by your cooperation. If you still see ads or find promoted_metadata in other requests, please share the response. HTMLs will still be welcome, but I guess it's difficult to make cosmetic filters not dependent on languages. I couldn't reproduce even with @u-RraaLL ' account, so there may be more conditions for the new layout than just an account.

  23. lumynou5 commented on Nov 26, 2026

    @lumynou5

    Can we also hide div:has(> [data-slot="xds-callout"])?

    screenshot
  24. u-RraaLL commented on Nov 26, 2026

    @u-RraaLL
    Contributor

    That's a self-promo, not what is considered an ad. These are fixed in Annoyances.

  25. u-RraaLL commented on Dec 1, 2026

    @u-RraaLL
    Contributor

    Reddit is reporting ads again. I can reproduce too. For the cosmetic approach (with placeholders), they've removed the urt id.

    x.com##li[data-index]:has(.x-link+button [href="#icon-more-dots-hor"])
    
  26. lumynou5 commented on Dec 1, 2026

    @lumynou5

    @Yuki2718

    /HomeTimeline and /HomeLatestTimelineQuery: data.home.home_timeline_urt.instructions.[].entries.[-].content.content.promotion

    They changed the field name promoted_metadata.

  27. added 2 commits that reference this issue on Dec 1, 2026
  28. MikuAuahDark commented on Dec 2, 2026

    @MikuAuahDark

    bd36bd2 need to add /HomeTimeline in addition to /Home as well. Otherwise ads still go through on me.

    twitter.com,x.com,~platform.twitter.com##+js(json-prune-fetch-response, data.*.home_timeline_urt.instructions.[].entries.[-].content.content.promotion, , propsToMatch, /HomeTimeline)
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions