AdNauseam icon indicating copy to clipboard operation
AdNauseam copied to clipboard

Add support for Mgid text-ads

Open MrDemocracy opened this issue 8 years ago • 11 comments

Can this be implemented? Many sites use these "smart ads" now. Mgid is the company responsible for these.

All the real links can be found in a javascript(sent from this url) that you get on page load. In the javascript you can see, the same "teaser"-ID's used for the html elements, listed along with the real urls.

Example

The ad's classes: mgline teaser-2338995 type-w

Snippet from the javascript:

["quantomcoding.com", "2338995", "1", "It's Time To Zero-Extend Your Monthly Income", "", "0", "", " ", " ", "KWd_0uh9coEBGCLLWn-lgaYpcrzUCL-6W3_IhJpHnqy00QqIxDG4xxvkxtPkGuQc", {
    "i": "http://imgg-cdn.mgid.com/2338/2338995_492x328.jpg",
    "l": "//www.mgid.com/ghits/2338995/i/40172/0/pp/4/2?h=KWd_0uh9coEBGCLLWn-lgaYpcrzUCL-6W3_IhJpHnqy00QqIxDG4xxvkxtPkGuQc&tt=Direct",
    "adc": [],
    "sdl": 1,
    "dl": "",
    "type": "w",
    "clicktrackers": []
}],

What the ad looks like:

Some sites using Mdig ads: KimCartoons Fmovies KickassTorrents BitTorrentScene 9anime KissAnime

Another thing...

Please make it so this isn't displayed in the ad vault, it messes up the symmetry: mgid_logo_mini_43x20

Your settings

  • OS/version: macOS 10.12.6
  • Browser/version: Google Chrome 61.0.3163.79 (Official Build) (64-bit)
  • AdNauseam version: v3.3.404

MrDemocracy avatar Sep 15 '17 22:09 MrDemocracy

These are what we call text-ads (ads containing multiple elements, some textual, rather than a single image), and require a custom filter to parse the various parts. You can see several examples here. If you are familiar with selectors, you can write the function yourself and send a PR. Otherwise we can get to it after the 3.4 release, which is our priority at moment.

ps. that image should be ignored in versions >= v3.4.101

dhowe avatar Sep 16 '17 04:09 dhowe

I'm not familiar with selectors, but I would really appreciate this being added after 3.4. By "the image should be ignored", do you mean it's being marked as failed? Because that's what happens for me, I still get a lot of failed Mgid ads in my ad vault. A "clear all failed ad's" option would be perfect for this.

MrDemocracy avatar Sep 16 '17 08:09 MrDemocracy

If you go back to these pages (with version >=3.4), the image should not be marked as an ad at all, so it won't make it to the vault

dhowe avatar Sep 18 '17 07:09 dhowe

@greysonevins take a try a writing a text-ad filter for Mgid?

dhowe avatar Sep 18 '17 07:09 dhowe

@dhowe Just realised AdNauseam doesn't automatically update. I just expected it to do that seamlessly like all my other extensions... Is there a way to tell AdNauseam to pull new updates from the github instead (since it's not on the chrome webstore)? Is there also a way to export all AdNauseam setting, advault data and filters in one file, that can be imported to the new update?

MrDemocracy avatar Sep 18 '17 10:09 MrDemocracy

@MrDemocracy moving this to its own issue: see #1209

dhowe avatar Sep 22 '17 13:09 dhowe

See also #1224

dhowe avatar Oct 12 '17 16:10 dhowe

I can create text ad filter for mgid, but the major issue is to get the correct target link. For each ad, the target link that get rendered in the dom is a fake placeholder like the following: https://New_Limitless_Pill_Just_Made_Legal_In_Providence The real link would only be rendered to replace it when the user click the ad in the web page. These links could be found in the js file @MrDemocracy mentioned above, but to fetch this information and create an ad based on that is a very specific case that is unique to mgid ads.

cqx931 avatar Oct 28 '17 19:10 cqx931

Wonder if it is possible to attach our own onclick handler to the element, which then updates the target URL... if not too much overhead this might even be the right default behavior, so that we always get the same URL as a manual click

thoughts?

dhowe avatar Oct 29 '17 04:10 dhowe

What is in our own onclick handler? By binding an onclick event to the link and close any new tab/window after the click?

cqx931 avatar Nov 05 '17 19:11 cqx931

just thinking aloud, but:

  1. add onclick handler, which simply updates the ad.targetUrl, then cancels the click
  2. do click via js

not sure if we'd get the correct url or not, but maybe worth a try (low priority)

dhowe avatar Nov 05 '17 23:11 dhowe