added on local at 2026-07-01 13:48:13
| 1 | #!/usr/bin/perl | |
| 2 | #====================================================================== | |
| 3 | # AffSoft - Product tour (logged-out marketing). | |
| 4 | # A four-step walkthrough that mirrors the actual flow on signup. | |
| 5 | #====================================================================== | |
| 6 | use strict; | |
| 7 | use warnings; | |
| 8 | ||
| 9 | use lib '/var/www/vhosts/3dshawn.com/affiliate.3dshawn.com'; | |
| 10 | use CGI; | |
| 11 | use MODS::Login; | |
| 12 | use MODS::AffSoft::Wrapper; | |
| 13 | ||
| 14 | my $auth = MODS::Login->new; | |
| 15 | my $wrap = MODS::AffSoft::Wrapper->new; | |
| 16 | my $userinfo = $auth->login_verify; | |
| 17 | ||
| 18 | print "Content-Type: text/html; charset=utf-8\r\nCache-Control: no-store, no-cache, must-revalidate, max-age=0\r\nPragma: no-cache\r\nExpires: 0\r\n\r\n"; | |
| 19 | ||
| 20 | my $body = <<'HTML'; | |
| 21 | <div class="page-pad" style="padding:64px 32px"> | |
| 22 | <div style="color:#a78bfa;font-size:12px;text-transform:uppercase;letter-spacing:.1em;font-weight:600;margin-bottom:14px;text-align:center">Product tour</div> | |
| 23 | <h1 style="margin:0 0 14px;font-size:42px;letter-spacing:-.02em;line-height:1.1;text-align:center">From zero to first paid conversion in four steps.</h1> | |
| 24 | <p style="color:#aaa;font-size:18px;line-height:1.6;margin:0 auto 56px;max-width:600px;text-align:center">Five minutes, no integration work, no JS pixels on your site.</p> | |
| 25 | ||
| 26 | <ol style="list-style:none;padding:0;margin:0;display:grid;grid-template-columns:1fr;gap:18px;counter-reset:step"> | |
| 27 | ||
| 28 | <li style="display:grid;grid-template-columns:64px 1fr;gap:20px;padding:24px;border:1px solid rgba(255,255,255,.08);border-radius:14px;background:rgba(20,20,30,.4)"> | |
| 29 | <div style="width:48px;height:48px;border-radius:12px;background:rgba(102,99,255,.2);color:#a78bfa;display:flex;align-items:center;justify-content:center;font-size:22px;font-weight:700">1</div> | |
| 30 | <div> | |
| 31 | <h3 style="margin:0 0 6px;font-size:20px">Create a program</h3> | |
| 32 | <p style="color:#aaa;line-height:1.55;margin:0 0 12px;font-size:14px">Name it. Paste the URL where you want to send traffic. Pick a commission — percent of order, flat per sale, or CPA. Pick an attribution window.</p> | |
| 33 | <div style="color:#666;font-size:12px;font-family:ui-monospace,Consolas,Menlo,monospace"> | |
| 34 | name=Spring Promo · dest=yourstore.com/buy · 20% · 30-day window | |
| 35 | </div> | |
| 36 | </div> | |
| 37 | </li> | |
| 38 | ||
| 39 | <li style="display:grid;grid-template-columns:64px 1fr;gap:20px;padding:24px;border:1px solid rgba(255,255,255,.08);border-radius:14px;background:rgba(20,20,30,.4)"> | |
| 40 | <div style="width:48px;height:48px;border-radius:12px;background:rgba(102,99,255,.2);color:#a78bfa;display:flex;align-items:center;justify-content:center;font-size:22px;font-weight:700">2</div> | |
| 41 | <div> | |
| 42 | <h3 style="margin:0 0 6px;font-size:20px">Hand out tracking links</h3> | |
| 43 | <p style="color:#aaa;line-height:1.55;margin:0 0 12px;font-size:14px">Affiliates discover your program in the catalog and join with one click. We mint each of them a short tracking link they can drop in tweets, emails, newsletters, or Discord.</p> | |
| 44 | <div style="color:#a78bfa;font-size:13px;font-family:ui-monospace,Consolas,Menlo,monospace">https://affiliate.3dshawn.com/t.cgi?l=aB9xK2qPmN3z</div> | |
| 45 | </div> | |
| 46 | </li> | |
| 47 | ||
| 48 | <li style="display:grid;grid-template-columns:64px 1fr;gap:20px;padding:24px;border:1px solid rgba(255,255,255,.08);border-radius:14px;background:rgba(20,20,30,.4)"> | |
| 49 | <div style="width:48px;height:48px;border-radius:12px;background:rgba(102,99,255,.2);color:#a78bfa;display:flex;align-items:center;justify-content:center;font-size:22px;font-weight:700">3</div> | |
| 50 | <div> | |
| 51 | <h3 style="margin:0 0 6px;font-size:20px">Fire a webhook on conversion</h3> | |
| 52 | <p style="color:#aaa;line-height:1.55;margin:0 0 12px;font-size:14px">When a visitor converts on your site, POST to <code style="color:#a78bfa">/conv.cgi</code> with the program ID, the visitor's <code style="color:#a78bfa">affsoft_av</code> cookie, and the order amount. AffSoft matches it to the most recent click in the attribution window and computes commission.</p> | |
| 53 | <div style="color:#666;font-size:12px;font-family:ui-monospace,Consolas,Menlo,monospace;background:rgba(0,0,0,.3);padding:10px 12px;border-radius:6px;overflow:auto">curl -X POST https://affiliate.3dshawn.com/conv.cgi \<br> -d program_id=1 -d visitor_token=$AV_COOKIE \<br> -d order_value_cents=4999</div> | |
| 54 | </div> | |
| 55 | </li> | |
| 56 | ||
| 57 | <li style="display:grid;grid-template-columns:64px 1fr;gap:20px;padding:24px;border:1px solid rgba(255,255,255,.08);border-radius:14px;background:rgba(20,20,30,.4)"> | |
| 58 | <div style="width:48px;height:48px;border-radius:12px;background:rgba(34,197,94,.2);color:#86efac;display:flex;align-items:center;justify-content:center;font-size:22px;font-weight:700">4</div> | |
| 59 | <div> | |
| 60 | <h3 style="margin:0 0 6px;font-size:20px">Approve and pay out</h3> | |
| 61 | <p style="color:#aaa;line-height:1.55;margin:0 0 12px;font-size:14px">New conversions land as <em>pending</em>. You review (refund-window-friendly), approve, and AffSoft surfaces the payable amount per affiliate. v1 ships with manual payout marking; v1.1 wires Stripe Connect transfers.</p> | |
| 62 | <div style="color:#666;font-size:12px">Pending → Approved → Paid — every transition logged.</div> | |
| 63 | </div> | |
| 64 | </li> | |
| 65 | ||
| 66 | </ol> | |
| 67 | ||
| 68 | <div style="margin-top:32px;padding:24px 28px;border:1px solid rgba(91,33,182,.30);border-radius:14px;background:linear-gradient(135deg,rgba(91,33,182,.10),rgba(46,16,101,.04));display:grid;grid-template-columns:64px 1fr;gap:20px;align-items:start"> | |
| 69 | <div style="width:48px;height:48px;border-radius:12px;background:rgba(91,33,182,.25);color:#c4b5fd;display:flex;align-items:center;justify-content:center;font-size:22px">🛡️</div> | |
| 70 | <div> | |
| 71 | <div style="color:#c4b5fd;font-size:11px;text-transform:uppercase;letter-spacing:.08em;font-weight:600;margin-bottom:6px">Running underneath all four steps</div> | |
| 72 | <h3 style="margin:0 0 6px;font-size:20px">Fraud protection, on by default</h3> | |
| 73 | <p style="color:#aaa;line-height:1.55;margin:0 0 10px;font-size:14px">Every conversion is scanned the moment it lands. We watch for cookie stuffing, self-referral, velocity abuse, duplicate-order resubmissions, and a handful of patterns we don't publish (so they keep working). Anything that scores high enough lands in a review queue with a plain-English explanation of <em>why</em> — no opaque "we blocked this." You decide approve or reject; automated payouts never touch unreviewed flags.</p> | |
| 74 | <div style="color:#888;font-size:12px">Real-time scan · reviewer-facing explanations · merchant always has final say.</div> | |
| 75 | </div> | |
| 76 | </div> | |
| 77 | ||
| 78 | <div style="margin-top:48px;text-align:center"> | |
| 79 | <a href="/signup.cgi" class="btn btn-primary btn-lg">Start free trial</a> | |
| 80 | <div style="color:#666;font-size:13px;margin-top:10px">Or <a href="/pricing.cgi" style="color:#a78bfa">see pricing</a> first.</div> | |
| 81 | </div> | |
| 82 | </div> | |
| 83 | HTML | |
| 84 | ||
| 85 | $wrap->render({ | |
| 86 | userinfo => $userinfo, | |
| 87 | title => 'Tour', | |
| 88 | body => $body, | |
| 89 | }); |