Closed Bug 1713687 Opened 2 years ago Closed 2 years ago

Improve the ETP shim for Google Analytics and fold the Tag Manager shim into it

Categories

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

enhancement

Tracking

()

RESOLVED FIXED
91 Branch
Tracking Status
firefox91 --- fixed

People

(Reporter: twisniewski, Assigned: twisniewski)

References

(Depends on 1 open bug)

Details

Attachments

(1 file)

Some request the script with get-parameters, which the shim currently does not match. The shim can also more thoroughly stub out and mimic the API to prevent some more obscure site breakage.

See Also: → 1493602
Depends on: 1714110

It actually seems like we can drop the dedicated Tag Manager shim and just perform its functions in the GA shim, as per my thoughts in bug 1713687. I think we ought to do that to simplify the code as well as cover the case where a webpage only loads one of the scripts, rather than both, yet relies on the dataLayer to be processed regardless.

Summary: Improve the ETP shim for Google Analytics → Improve the ETP shim for Google Analytics and fold the Tag Manager shim into it
Blocks: 1649077, 1694168
See Also: → 1478593
  • add wildcards to the URLs, as some sites access the scripts with GET parameters.
  • we don't actually need a standalone Tag Manager shim, so just re-use the GA one.
  • this will also mitigate breakage on some sites which load only one of the two scripts.
  • more thoroughly stub out the Analytics window object to mitigate more site breakage.
Assignee: nobody → twisniewski
Status: NEW → ASSIGNED
Attachment #9226881 - Attachment description: WIP: Bug 1713687 - Improve the ETP shim for Google Analytics and fold the Tag Manager shim into it; d?denschub → Bug 1713687 - Improve the ETP shim for Google Analytics and fold the Tag Manager shim into it; d?denschub
Attachment #9226881 - Attachment description: Bug 1713687 - Improve the ETP shim for Google Analytics and fold the Tag Manager shim into it; d?denschub → Bug 1713687 - Improve the ETP shim for Google Analytics and fold the Tag Manager shim into it; r?denschub
Pushed by twisniewski@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/2e82d85e50b4
Improve the ETP shim for Google Analytics and fold the Tag Manager shim into it; r=webcompat-reviewers,denschub
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 91 Branch
Blocks: 1721336
Regressions: 1725887

(commented on the wrong bug)

Regressions: 1731042
Regressions: 1728237
Blocks: 1731910
No longer blocks: 1731910

Hey, I have NO IDEA what am I doing here guys, but please...just explain me is this bad or good that Firefox shimming GA and TM? Just ckecked out console today and got redirected here.

Flags: needinfo?(twisniewski)

i mean checked, not ckecked :)))

Firefox only shims them when they would otherwise be blocked by strict or private browsing's tracking protection. It does so because when they are simply blocked, quite a few sites will break (sometimes in minor ways, and sometimes completely).

Whether that's a good or bad thing is entirely up to you. You are free to disable SmartBlock if you'd prefer not to activate any shims (in about:config, the extensions.webcompat.enable_shims setting) at the expense of more websites breaking while using stricter tracking protection.

Hope that helps!

Flags: needinfo?(twisniewski)
You need to log in before you can comment on or make changes to this bug.