agentleFS
Eugenevdm01Eugenevdm01/eugenes-meta-agent/skills/vanx-meta-purchase-repair/SKILL.md

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.

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
  1. Distinctive:

    Before making changes, identify the following fields from the user, browser, VanX/GHL, or previous context.

    line 18
  2. Distinctive:

    If any of these are missing, infer them from VanX/GHL and the published page source where possible.

    line 31
  3. Distinctive:

    When editing in VanX/GHL, preserve existing non-Meta tracking unless it is clearly broken.

    line 66
  4. Very specific:

    Use a route-aware script when one funnel has multiple paid outcomes.

    line 70
  5. Distinctive:

    After saving in VanX/GHL, reopen the same tracking-code area and extract or inspect the saved textarea.

    line 151
  6. Distinctive:

    Always attach or save a repair log when the task involved real funnel edits.

    line 202

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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.

FieldWhat to captureExample
VanX/GHL locationAccount/sub-account being editedVAN Studios
Funnel nameExact funnel receiving the repair3-Day Challenge B2B
Published domainPublic website domainhttps://funneljunkies.co.za
Confirmation pathsSuccessful purchase URLs/3day-confirmation, /3day-vip-confirmation
Expected productsProduct names or ticket tiersBase ticket, VIP upgrade
Expected valuesPurchase amounts by path99.00, 499.00
CurrencyCurrency sent to MetaZAR
Pixel IDMeta Pixel ID used by the funnel972312940009993

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.

FindingDiagnosisNext action
Pixel base code missingPixel not installed on confirmation pageAdd Pixel base code and Purchase branch
PageView exists but Purchase missingMain repair targetAdd page-load Purchase call on confirmation URL
Purchase exists with wrong valueProduct branch/value bugUpdate route-specific offer payload
Purchase exists but wrong Pixel IDAttribution bugConfirm correct Pixel and replace if needed
Code correct in VanX/GHL but not livePublish/cache issueSave again, publish if needed, retest with cache-buster
Browser code correct but Meta not showingPlatform/test delay or blockerValidate 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:

PathEventValueCurrencyContent ID
/3day-confirmationPurchase99.00ZAR3day_challenge_base_ticket
/3day-vip-confirmationPurchase499.00ZAR3day_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.

FlagPass condition
hasBasePurchaseBase confirmation path fires Purchase
hasVipPurchaseVIP confirmation path fires Purchase
hasBaseValueBase payload value equals expected amount
hasVipValueVIP payload value equals expected amount
hasCurrencyPayload currency is correct, usually ZAR for these funnels
hasPixelIdCorrect Meta Pixel ID appears in fbq('init', ...)
noBrokenExistingScriptsExisting 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.

AreaResult
Root causeMissing Purchase event, wrong value, wrong Pixel, cache issue, or Meta-side validation pending
Change madeDescribe exact tracking-code update and where it was saved
Base confirmationState value, currency, content ID, and status
VIP confirmationState value, currency, content ID, and status
Published-page verificationPass/fail with URLs tested
Remaining actionMeta 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.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.