@m13v/seo-components 0.32.1 → 0.32.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@m13v/seo-components",
3
- "version": "0.32.1",
3
+ "version": "0.32.2",
4
4
  "scripts": {
5
5
  "build:css": "tailwind -i src/_build.css -o dist/styles.css --minify",
6
6
  "lint:mobile-spans": "node scripts/lint-mobile-spans.mjs",
@@ -120,13 +120,18 @@ export function InstallEmailGate({
120
120
 
121
121
  const onOpen = () => {
122
122
  const skip = remember && hasCapturedInstallEmail(storageKey);
123
- trackGetStartedClick({
124
- destination: skip ? "modal:command" : "modal:email",
125
- site,
126
- section,
127
- text: label,
128
- component: "InstallEmailGate",
129
- });
123
+ if (skip) {
124
+ // Gate already passed previously: fire the canonical funnel event for
125
+ // the gated-passed click. No event when the gate is fresh and we're
126
+ // about to ask for the email; that fires on submit instead.
127
+ trackGetStartedClick({
128
+ destination: "modal:command",
129
+ site,
130
+ section,
131
+ text: label,
132
+ component: "InstallEmailGate",
133
+ });
134
+ }
130
135
  setStage(skip ? "command" : "email");
131
136
  setError("");
132
137
  };
@@ -186,12 +191,16 @@ export function InstallEmailGate({
186
191
  try {
187
192
  await navigator.clipboard.writeText(text);
188
193
  setCopied(which);
189
- trackGetStartedClick({
190
- destination: which === "command" ? "clipboard:command" : "clipboard:config",
194
+ // Track the copy as its own event so it does not inflate the
195
+ // canonical `get_started_click` funnel. The gate event fires once
196
+ // when the email is submitted (or once on each subsequent gated-
197
+ // passed click), not for every clipboard copy.
198
+ capture("install_command_copied", {
199
+ component: "InstallEmailGate",
191
200
  site,
192
201
  section,
193
- text: which === "command" ? command : configBlock?.label,
194
- component: "InstallEmailGate",
202
+ which,
203
+ page: typeof window !== "undefined" ? window.location.pathname : undefined,
195
204
  });
196
205
  setTimeout(() => setCopied(null), 1800);
197
206
  } catch {