Commit 2b1ea88
authored
Update Dux CDN script to version 5.0.1 (#14336)
This PR updates the @shopify/dux package from version 4.4.0 to 5.0.1 and
implements the new Global Privacy Control (GPC) feature.
Changes:
- Added support for the enableSecGpc flag throughout the application
- Modified the GoogleTagManager component to respect GPC signals by not
loading GTM when optOutSaleOfData is true
- Updated the Dux client configuration to pass the GPC signal from
request headers
- Added the GPC signal detection in server loaders and partials
- Updated the privacy signal API version references in tests from 1.0.2
to 1.0.3
- Added the missing enableSecGpc property in story mock data
- This update ensures the application respects the Global Privacy
Control signal, preventing tracking and data collection when users have
enabled this privacy feature in their browsers.
You can test this locally by turning SHOPIFY_DUX_DEBUG_MODE to false in
env.development and restarting your server. Then go to a page, turn on
sec-gpc: 1 as a header and load brochure.shop.dev. You should see a
privacy_signal cookie being set and its value should contain
"consentedSaleOfData": "-1". You should also see no google tag manager
js being loaded.
@merwan7 put together this video for upgrading Brochure (his [PR
here](shop/world#330056)):
https://share.descript.com/view/zHjZb1tzCBk
Verified that dux 5.0.1 is being called locally:
<img width="956" height="588" alt="image"
src="https://github.com/user-attachments/assets/46567d2c-edd3-4ae5-9f63-24aad8978cb6"
/>
<!--
☝️How to write a good PR title:
- Prefix it with [ComponentName] (if applicable), for example: [Button]
- Start with a verb, for example: Add, Delete, Improve, Fix…
- Give as much context as necessary and as little as possible
- Open it as a draft if it’s a work in progress
-->
### WHY are these changes introduced?
Fixes #0000 <!-- link to issue if one exists -->
<!--
Context about the problem that’s being addressed.
-->
### WHAT is this pull request doing?
<!--
Summary of the changes committed.
Before / after screenshots are appreciated for UI changes. Make sure to
include alt text that describes the screenshot.
Include a video if your changes include interactive content.
If you include an animated gif showing your change, wrapping it in a
details tag is recommended. Gifs usually autoplay, which can cause
accessibility issues for people reviewing your PR:
<details>
<summary>Summary of your gif(s)</summary>
<img src="..." alt="Description of what the gif shows">
</details>
-->
### How to 🎩
🖥 [Local development
instructions](https://github.com/Shopify/polaris/blob/main/README.md#install-dependencies-and-build-workspaces)
🗒 [General tophatting
guidelines](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting.md)
📄 [Changelog
guidelines](https://github.com/Shopify/polaris/blob/main/.github/CONTRIBUTING.md#changelog)
### 🎩 checklist
- [ ] Tested a
[snapshot](https://github.com/Shopify/polaris/blob/main/documentation/Releasing.md#-snapshot-releases)
- [ ] Tested on
[mobile](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting.md#cross-browser-testing)
- [ ] Tested on [multiple
browsers](https://help.shopify.com/en/manual/shopify-admin/supported-browsers)
- [ ] Tested for
[accessibility](https://github.com/Shopify/polaris/blob/main/documentation/Accessibility%20testing.md)
- [ ] Updated the component's `README.md` with documentation changes
- [ ] [Tophatted
documentation](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting%20documentation.md)
changes in the style guide1 parent 77806e8 commit 2b1ea88
2 files changed
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
96 | | - | |
| 96 | + | |
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
| |||
0 commit comments