Closed Bug 1713685 Opened 3 years ago Closed 3 years ago

Improve the ETP shim for Google Publisher Tags

Categories

(Core :: Privacy: Anti-Tracking, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
91 Branch
Tracking Status
firefox91 --- fixed

People

(Reporter: twisniewski, Assigned: twisniewski)

References

Details

Attachments

(1 file)

Google Publisher Tags normally participates in placing ads and other content, and our shim does not currently handle this use-case. We can avoid site breakage and add placeholders for content if the shim mimics this capability, as well as stubbing out the API more completely. This will enable fixes for quite a few sites. This will also allow us to make shims for other Google and third-party trackers which rely on or interact with Publisher Tags.

See Also: → 1600538
  • expand the API surface that is stubbed out more completely to account for sites relying on deprecated or more obscure functionality.
  • have the shim perform basic content placement as some sites expect GPT to do.
Assignee: nobody → twisniewski
Status: NEW → ASSIGNED
Depends on: 1713055
Pushed by twisniewski@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/79ac5a63d90f Update the Google Publisher Tags SmartBlock shim; r=denschub,webcompat-reviewers
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 91 Branch
Blocks: 1731910
No longer blocks: 1731910

The function removeEventListener of pubads is missing and throwing error. Can we also shim that function. Thanks.

@mortyccp, definitely. I will file a new bug for that ASAP. Do you have a link you can share where it is failing? I'd like to make sure my fix works well on an actual page, as sometimes the obvious fix isn't enough.

Flags: needinfo?(mortyccp)

Sorry, the website that is failing is my internal web application. I can share the code that's causing the error. It's just very straightforward usage.

  useEffect(() => {
    const listener = event => { ... };

    googletag.cmd.push(() => {
      googletag.pubads().addEventListener("slotRenderEnded", listener);
    });

    return () => {
      googletag.cmd.push(() => {
        googletag.pubads().removeEventListener("slotRenderEnded", listener);
      });
    };
  }, []);
Flags: needinfo?(mortyccp)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: