vanx-meta-purchase-repair
Skill4 starsChanged 6 months agoMITView on GitHub
Diagnose and repair Meta Pixel Purchase events in VanX/GHL funnels. Use for: purchase events not firing, wrong purchase values, Meta Events Manager showing zero purchases while VanX/GHL shows sales, confirmation-page tracking fixes, and funnel-wide head tracking code updates.
In this repository30 other files it gives its agents.
- ad-copywriterSkill
- automated-video-editorSkill
- canva-mcpSkill
- challenge-campaign-operatorSkill
- creative-strategistSkill
- daily-growth-operatorSkill
- funnel-junkies-video-publisherSkill
- funnel-message-match-auditorSkill
- ghl-funnel-inspectorSkill
- gws-best-practicesSkill
- landing-page-cro-analystSkill
- manus-apiSkill
- meta-ads-analyzerSkill
- meta-ads-campaign-auditorSkill
- meta-ads-performance-analystSkill
- meta-ads-social-schedulerSkill
- meta-live-campaign-launch-operatorSkill
- meta-paid-ads-challenge-operatorSkill
- meta-safe-campaign-builderSkill
- music-prompterSkill
- performance-reportingSkill
- persistent-computingSkill
- qualified-lead-scoringSkill
- skill-creatorSkill
- social-media-content-dashboardSkill
- split-test-evaluatorSkill
- vanx-social-plannerSkill
- video-generatorSkill
- weekly-content-operatorSkill
- workshop-workbook-builderSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 5 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 18
Before making changes, identify the following fields from the user, browser, VanX/GHL, or previous context.
- Distinctive: line 31
If any of these are missing, infer them from VanX/GHL and the published page source where possible.
- Distinctive: line 66
When editing in VanX/GHL, preserve existing non-Meta tracking unless it is clearly broken.
- Very specific: line 70
Use a route-aware script when one funnel has multiple paid outcomes.
- Distinctive: line 151
After saving in VanX/GHL, reopen the same tracking-code area and extract or inspect the saved textarea.
- Distinctive: line 202
Always attach or save a repair log when the task involved real funnel edits.
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
VanX Meta Purchase Repair
Use this skill when a VanX/GHL funnel has completed payments but Meta is not receiving the correct Purchase events, values, currencies, or content IDs. The workflow is designed for Funnel Junkies and Van Studios funnels, but can be reused for any GHL/LeadConnector funnel where tracking is controlled through funnel/page head tracking code.
Operating Principle
Diagnose before editing. Do not rewrite tracking blindly. First confirm whether the issue is a missing Pixel, missing Purchase call, wrong confirmation-page branch, wrong value, duplicated code, cached unpublished code, or Meta-side validation delay.
Prioritise commercial accuracy over vanity tracking. A Purchase event is only useful if it reports the correct product, value, currency, and funnel step.
Required Inputs
Before making changes, identify the following fields from the user, browser, VanX/GHL, or previous context.
| Field | What to capture | Example |
| VanX/GHL location | Account/sub-account being edited | VAN Studios |
| Funnel name | Exact funnel receiving the repair | 3-Day Challenge B2B |
| Published domain | Public website domain | https://funneljunkies.co.za |
| Confirmation paths | Successful purchase URLs | /3day-confirmation, /3day-vip-confirmation |
| Expected products | Product names or ticket tiers | Base ticket, VIP upgrade |
| Expected values | Purchase amounts by path | 99.00, 499.00 |
| Currency | Currency sent to Meta | ZAR |
| Pixel ID | Meta Pixel ID used by the funnel | 972312940009993 |
If any of these are missing, infer them from VanX/GHL and the published page source where possible. Ask the user only when the repair cannot safely proceed.
Workflow
1. Inspect Published Pages First
Open each public confirmation URL with a cache-busting query string such as ?tracking_retest=YYYYMMDDa. Save or inspect the rendered HTML. Search the HTML for these patterns:
fbq('init'
fbq('track', 'PageView'
fbq('track', 'Purchase'
safeFbq('Purchase'
value:
currency:
content_ids:Classify each confirmation page before editing.
| Finding | Diagnosis | Next action |
| Pixel base code missing | Pixel not installed on confirmation page | Add Pixel base code and Purchase branch |
| PageView exists but Purchase missing | Main repair target | Add page-load Purchase call on confirmation URL |
| Purchase exists with wrong value | Product branch/value bug | Update route-specific offer payload |
| Purchase exists but wrong Pixel ID | Attribution bug | Confirm correct Pixel and replace if needed |
| Code correct in VanX/GHL but not live | Publish/cache issue | Save again, publish if needed, retest with cache-buster |
| Browser code correct but Meta not showing | Platform/test delay or blocker | Validate in Meta Test Events or controlled checkout |
Record findings in a task log, especially exact URLs, Pixel ID, detected events, values, and remaining uncertainty.
2. Locate the Tracking Code in VanX/GHL
In VanX/GHL, open the correct location and funnel. For a funnel-wide issue affecting multiple confirmation pages, inspect the funnel settings/head tracking code first. Page-level head code may override or duplicate funnel-wide code, so verify page settings if the funnel-wide code does not explain the live page source.
When editing in VanX/GHL, preserve existing non-Meta tracking unless it is clearly broken. Common scripts that must not be removed accidentally include FirstPromoter, jQuery snippets, page styles, and other analytics.
3. Apply a Route-Specific Purchase Event Repair
Use a route-aware script when one funnel has multiple paid outcomes. The important pattern is to define one payload per product and fire the correct Purchase payload based on window.location.pathname.
Adapt this template instead of hard-coding one value across all confirmation pages:
<!-- Meta Pixel: route-specific Purchase repair -->
<script>
!function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n;
n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0;
t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window,document,'script','https://connect.facebook.net/en_US/fbevents.js');
fbq('init', 'PIXEL_ID_HERE');
fbq('track', 'PageView');
(function(){
var path = (window.location.pathname || '').toLowerCase();
var fullUrl = (window.location.href || '').toLowerCase();
var currency = 'ZAR';
var baseOffer = {
content_name: 'Base Offer Name',
content_type: 'product',
content_ids: ['base_offer_id'],
value: 99.00,
currency: currency
};
var vipOffer = {
content_name: 'VIP Offer Name',
content_type: 'product',
content_ids: ['vip_offer_id'],
value: 499.00,
currency: currency
};
function getCurrentOffer(){
if (path.indexOf('/vip-upsell-path') > -1 || path.indexOf('/vip-confirmation-path') > -1) return vipOffer;
return baseOffer;
}
function safeFbq(eventName, payload){
if (typeof window.fbq === 'function') {
window.fbq('track', eventName, payload || {});
}
}
function fireInitiateCheckout(){
var offer = getCurrentOffer();
var checkoutKey = offer.content_ids[0] + '_initiate_checkout_fired';
if (sessionStorage.getItem(checkoutKey)) return;
sessionStorage.setItem(checkoutKey, '1');
safeFbq('InitiateCheckout', offer);
}
function isCheckoutSignal(target){
if (!target) return false;
var node = target.closest ? target.closest('a,button,[role="button"],input') : null;
if (!node) return false;
var text = ((node.innerText || node.value || node.getAttribute('aria-label') || '') + '').toLowerCase();
var href = ((node.getAttribute('href') || '') + '').toLowerCase();
return href.indexOf('one-step-order') > -1 || href.indexOf('checkout') > -1 || /join|register|reserve|secure|claim|get access|start|buy|ticket|challenge|vip|upgrade/.test(text);
}
document.addEventListener('click', function(e){
if (isCheckoutSignal(e.target)) fireInitiateCheckout();
}, true);
if ((window.location.hash || '').toLowerCase().indexOf('one-step-order') > -1 || /checkout|order/.test(fullUrl)) {
setTimeout(fireInitiateCheckout, 800);
}
if (path.indexOf('/base-confirmation-path') > -1) {
safeFbq('Purchase', baseOffer);
}
if (path.indexOf('/vip-confirmation-path') > -1) {
safeFbq('Purchase', vipOffer);
}
})();
</script>
<noscript><img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=PIXEL_ID_HERE&ev=PageView&noscript=1" /></noscript>For the VAN Studios 3-Day Challenge B2B pattern, the known routing was:
| Path | Event | Value | Currency | Content ID |
/3day-confirmation | Purchase | 99.00 | ZAR | 3day_challenge_base_ticket |
/3day-vip-confirmation | Purchase | 499.00 | ZAR | 3day_challenge_vip_upgrade |
4. Save and Confirm Persistence
After saving in VanX/GHL, reopen the same tracking-code area and extract or inspect the saved textarea. Confirm that the saved code still contains every required branch and value.
| Flag | Pass condition |
hasBasePurchase | Base confirmation path fires Purchase |
hasVipPurchase | VIP confirmation path fires Purchase |
hasBaseValue | Base payload value equals expected amount |
hasVipValue | VIP payload value equals expected amount |
hasCurrency | Payload currency is correct, usually ZAR for these funnels |
hasPixelId | Correct Meta Pixel ID appears in fbq('init', ...) |
noBrokenExistingScripts | Existing affiliate/analytics scripts remain intact |
5. Verify Published Pages Again
Reload each public confirmation page using a new cache-busting query string. Save or inspect the rendered HTML and search for the new values and route branches. If browser console access is available, check that window.fbq exists and the Meta library has loaded.
Example browser console check:
(() => {
const entries = performance.getEntriesByType('resource')
.map(e => e.name)
.filter(u => /facebook\.com\/tr|connect\.facebook\.net/.test(u));
return {
url: location.href,
fbqType: typeof window.fbq,
pixelResourceCount: entries.length,
pixelResources: entries.slice(-10)
};
})()This confirms browser-side loading. It does not replace Meta Events Manager validation.
6. Validate in Meta Events Manager
When page-source verification passes, instruct the user or operator to validate in Meta Events Manager → Test Events. Use the exact confirmation URLs or perform one controlled test checkout when needed. Treat Meta-side validation as the final confirmation that Meta receives the event, while browser-source validation confirms that the funnel is attempting to fire it.
Reporting Format
End the repair with a concise table and next actions.
| Area | Result |
| Root cause | Missing Purchase event, wrong value, wrong Pixel, cache issue, or Meta-side validation pending |
| Change made | Describe exact tracking-code update and where it was saved |
| Base confirmation | State value, currency, content ID, and status |
| VIP confirmation | State value, currency, content ID, and status |
| Published-page verification | Pass/fail with URLs tested |
| Remaining action | Meta Events Manager test or controlled checkout |
Always attach or save a repair log when the task involved real funnel edits. Include timestamps, exact page paths, expected values, and verification status so future operators can avoid repeating diagnosis.
Guardrails
Do not submit payments, run live checkouts, or make purchases without explicit user confirmation. Do not remove existing tracking code unless it is clearly duplicated or broken. Do not claim Meta is fully fixed until either Events Manager receives the event or a controlled checkout confirms it. If data is incomplete, clearly separate confirmed findings from assumptions.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

