Repository navigation
Conversation
…, Shopify Payments from the shop config flag #1447 Signed-off-by: Nik Cubrilovic <[email protected]>
…d), static-tracking and per-company forms, real loader fixture, docs caveat #1447 Signed-off-by: Nik Cubrilovic <[email protected]>
nc9
force-pushed
the
feat/tech-klaviyo-shopify-payments-1447
branch
from
October 31, 2026 19:55
be2557d to
c977863
Compare
Contributor
Author
|
Landed in v0.0.152 as nik |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #1447 (acceptance criteria 1, 2, 4, 5; criterion 3 is conditional and not taken, see below)
Change
other.ts; the script URL goes through thescriptSrchelper, so it is anchored: a listed script URL or thesrcof a real script tag, in thestatic.,static-tracking.and per-company/onsite/js/<id>/klaviyo.jsforms; a link or code sample is not a script, removed fromgenerated.tsso a regenerate cannot drop the new signals): the existingstatic.klaviyo.comscript and_learnq.push(signals, plus the Shopify theme app block markershopify://apps/klaviyo-email-marketing-sms/(found in an HTML comment or an attribute) and the inline onsite loader (window._klOnsite=window._klOnsite||,window.klaviyo=window.klaviyo||/new Proxy(). Thestatic.klaviyo.comscript is injected after load, so the marker and loader are what a local--httpaudit sees.shopify-paymentssignature (payment category) from"shopifyPaymentsEnabled":truein the inline shop config. Named "Shopify Payments (enabled in shop config)", confidence medium: it is a merchant setting, not a loaded script.pi-*SVG titles) are not reported: criterion 3 is conditional ("if reported") and an advertised-method marker needs a report field of its own. The docs say so.Tests
klaviyo-shopify-payments-1447.test.ts(10), with and without script bodies attached: the app block marker in a comment and in an attribute, the inline loader and proxy forms, the existing script and queue; negatives: prose, a link, a similarly named app block,window.klaviyoLike/_klOnsiteX,shopifyPaymentsEnabled:false, a similar key, prose naming the key. All tech-detect suites and the CLI tech-detect parity, limits and fit tests pass.Real-bundle check: 23 library bundles (22 from the ops harness plus the review's) (react, vue, sentry, clerk, stripe, firebase, ...) inlined and external, with and without bodies, against main with the ops harness: no differences, none added.
Icons: the new slug
shopify-paymentshas no tech icon yet; the icon is not part of this PR and will be queued privately.klaviyois an existing slug.Docs:
cloud/technologies.mdx(Shopify storefronts). Skill change: none.nik
Review round: CodeQL missing-anchor fixed by the
scriptSrcform, the real onsite embed snippet and the three script forms added as fixtures, rebased on v0.0.151, docs note that a developer blog quoting the marker or loader, or a JSON block carrying the marker, is detected too.generated.tsis not regenerated (the klaviyo entry is deleted by hand, like firebase-hosting in #1450).Script signature: what changed with
scriptSrcMoving the
static.klaviyo.comscript signature to thescriptSrchelper anchors it, so it is not semantics-unchanged. Lost, compared with the old unanchored pattern: an unquotedsrc=, asrcafter more than 300 characters of other attributes, a loader built in JS (b.src="//static.klaviyo.com/..."),<link rel=preload>anddata-srclazy loaders, and a proxied URL in the script list. New false positive: a commented-out<script src=...klaviyo.js>(the html detector reads comments). The inline loader and app block signals cover the common Shopify case; restoring script recall is filed separately.