Skip to content

ENG-682: Smarter and earlier initialization strategy for Shopify integration#6202

Merged
tvandort merged 3 commits intomainfrom
ENG-682
Jun 6, 2025
Merged

ENG-682: Smarter and earlier initialization strategy for Shopify integration#6202
tvandort merged 3 commits intomainfrom
ENG-682

Conversation

@eastandwestwind
Copy link
Copy Markdown
Contributor

@eastandwestwind eastandwestwind commented Jun 6, 2025

Closes https://ethyca.atlassian.net/browse/ENG-682

Description Of Changes

Currently we have an arbitrary 3000ms wait (3 secs) before loading Shopify. This change allows us to init Shopify early in init lifecycle, passing in defaults first, then updating as Fides completes initialization.

Code Changes

  • Update the Shopify integration to allow earlier initialization of Shopify.

Steps to Confirm

  1. In fides-js-components-demo.html, add the following code after Fides init (L:220):
window.Shopify = {
          customerPrivacy: {
            setTrackingConsent: function () {
              // This function is used to test the Shopify integration.
              // It will be called by the Shopify platform script.
              console.log("Shopify customer privacy function called");
            }
          }
        }
        Fides.shopify();
  1. Nav to http://localhost:3001/fides-js-components-demo.html, and open up console
  2. Reload page to see Shopify customer privacy function called immediately after FidesReady event.
Screenshot 2025-06-06 at 4 59 24 PM

Pre-Merge Checklist

  • Issue requirements met
  • All CI pipelines succeeded
  • CHANGELOG.md updated
    • Add a db-migration This indicates that a change includes a database migration label to the entry if your change includes a DB migration
    • Add a high-risk This issue suggests changes that have a high-probability of breaking existing code label to the entry if your change includes a high-risk change (i.e. potential for performance impact or unexpected regression) that should be flagged
    • Updates unreleased work already in Changelog, no new entry necessary
  • Followup issues:
    • Followup issues created
    • No followup issues
  • Database migrations:
    • Ensure that your downrev is up to date with the latest revision on main
    • Ensure that your downgrade() migration is correct and works
      • If a downgrade migration is not possible for this change, please call this out in the PR description!
    • No migrations
  • Documentation:
    • Documentation complete, PR opened in fidesdocs
    • Documentation issue created in fidesdocs
    • If there are any new client scopes created as part of the pull request, remember to update public-facing documentation that references our scope registry
    • No documentation updates required

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Jun 6, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
fides-plus-nightly ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 6, 2025 6:47pm
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
fides-privacy-center ⬜️ Ignored (Inspect) Jun 6, 2025 6:47pm

Copy link
Copy Markdown
Contributor

@tvandort tvandort left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! Were there any tests we wanted to add or update as part of this? If not I'm good to approve but I'd be remiss if I didn't ask.

@tvandort tvandort merged commit f0427a3 into main Jun 6, 2025
17 checks passed
@tvandort tvandort deleted the ENG-682 branch June 6, 2025 19:00
tvandort added a commit that referenced this pull request Jun 6, 2025
…gration (#6202)

Co-authored-by: Tom Van Dort <tom@ethyca.com>
@cypress
Copy link
Copy Markdown

cypress Bot commented Jun 6, 2025

fides    Run #12969

Run Properties:  status check passed Passed #12969  •  git commit f0427a3ac8: ENG-682: Smarter and earlier initialization strategy for Shopify integration (#6...
Project fides
Branch Review main
Run status status check passed Passed #12969
Run duration 00m 51s
Commit git commit f0427a3ac8: ENG-682: Smarter and earlier initialization strategy for Shopify integration (#6...
Committer Catherine Smith
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 5
View all changes introduced in this branch ↗︎

erosselli pushed a commit that referenced this pull request Jun 12, 2025
…gration (#6202)

Co-authored-by: Tom Van Dort <tom@ethyca.com>
erosselli pushed a commit that referenced this pull request Jun 12, 2025
…gration (#6202)

Co-authored-by: Tom Van Dort <tom@ethyca.com>
erosselli pushed a commit that referenced this pull request Jun 16, 2025
…gration (#6202)

Co-authored-by: Tom Van Dort <tom@ethyca.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants