-
Notifications
You must be signed in to change notification settings - Fork 23
WT-964 Refactor stub attribution #1296
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
maureenlholland
wants to merge
28
commits into
main
Choose a base branch
from
WT-964--refactor-stub-attribution
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 21 commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
ede47dc
Copy existing Stub Attribution folder and rename to Download Attribution
maureenlholland 5a79ad6
Convert JS file to ES6
maureenlholland 05601ac
Refactor download attribution to clarify split between essential and …
maureenlholland 2901242
Add refactored JS bundle and apply behind switch
maureenlholland e4ac493
Update download as default to simpler attribution flow
maureenlholland b0a7bbc
Move GTM event listener into GTM analytics storage util
maureenlholland 5434feb
Add auto-download JS
maureenlholland 8efb354
Duplicate all-init JS for use with new Download Attribution JS
maureenlholland dfb55e6
Update all-init-v2 to use DownloadAttribution
maureenlholland 1c92946
Ensure stale essential data is refreshed
maureenlholland 8630374
Add E2E download attribution tests
maureenlholland fb3e452
Auto-download should apply any existing download attribution to download
maureenlholland 1e871de
Add check for valid essential campaigns and fix download as default c…
maureenlholland 00cb6ab
Rename marketing to analytics for consistency
maureenlholland b7b3b92
All download attribution values default to (not set)
maureenlholland 2cdfea0
Reorg and update comment for default download attribution init JS
maureenlholland 1293142
Fix edge case with cookie policy page consent status update
maureenlholland f5ba0a8
Restore commented out code (was used for local testing)
maureenlholland 48bb9c9
Fix invalid use of waffle switch
maureenlholland 326f6be
Add removeDownloadAsDefault setup to playwright tests for more contro…
maureenlholland 62c6b39
Update thanks prefix comment
maureenlholland de6963a
Fix source key typo
maureenlholland f886354
Gate JS download attribution call behind check for HTML data switch a…
maureenlholland 6cbf61b
Guard against undefined Mozilla namespace
maureenlholland f7c2cb9
Ensure download as default also has timeout callback to avoid trappin…
maureenlholland 3c7d5c0
Add guard against undefined Mozilla.DownloadAttribution
maureenlholland 608d4d8
Ensure extended template inherits /thanks html attrs
maureenlholland 0cbcb05
Fix playwright test typo and potential race conditions
maureenlholland File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
media/js/base/download-attribution/download-attribution-init.es6.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| /* | ||
| * This Source Code Form is subject to the terms of the Mozilla Public | ||
| * License, v. 2.0. If a copy of the MPL was not distributed with this | ||
| * file, You can obtain one at https://mozilla.org/MPL/2.0/. | ||
| */ | ||
|
|
||
| import DownloadAttribution from './download-attribution.es6'; | ||
|
|
||
| // Refresh the essential data to avoid an outdated download experience | ||
| // - If there's new essential data, update | ||
| // - If there's no essential data, remove | ||
| DownloadAttribution.initEssential(); | ||
|
|
||
| DownloadAttribution.applyAttributionDataToLinks(); |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.