coreyhaines31/marketingskills / skills/conversion-tracking
conversion-tracking
VerifiedWhen the user wants to set up, audit, or fix conversion tracking to Google Ads, Meta, GA4, LinkedIn, and TikTok, or asks why conversions are missing or doubled: GTM, pixels, CAPI, Enhanced Conversions, offline imports. Fire on confirmed success, not the submit click; verify a test conversion arrives; diagnose before changing; offer free paths and disclose partner tools. For tracking plans, see analytics. For attribution, see attribution. For bidding, see ads.
assets/snippets/jotform.js
View on GitHub/*! Jotform conversion detection (MIT)
* Detects: form submission. Pushes dataLayer event: jotform_form_submitted
* From the conversion-tracking skill in Marketing Skills */
/* Jotform iframe completion listener. Reads no form answers.
* Counts once per embedded frame on this page. */
(function () {
'use strict';
if (window.__ctDetectJotform || window.__ctJotformMethod2Installed) return;
window.__ctDetectJotform = true;
window.__ctJotformMethod2Installed = true;
var completed = [];
window.addEventListener('message', function (event) {
if (!event.source || event.source === window) return;
if (!/^https:\/\/(form|submit)\.jotform\.com$/.test(event.origin)) return;
var data = event.data;
if (!data || typeof data !== 'object' || Array.isArray(data) || data.action !== 'submission-completed') return;
var frames = document.querySelectorAll('iframe');
for (var i = 0; i < frames.length; i++) {
var frame = frames[i];
if (frame.contentWindow !== event.source) continue;
var match = /^https:\/\/form\.jotform\.com\/(\d+)(?:[/?#]|$)/.exec(frame.getAttribute('src') || '');
if (!match || (data.formID != null && String(data.formID) !== match[1])) return;
if (completed.indexOf(frame) !== -1) return;
completed.push(frame);
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({ event: 'jotform_form_submitted', form_id: match[1] });
return;
}
});
})();
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |