Changes are reflected on the storefront immediately
Order
Name
Cat
Price
Cost
Reward Pts
Variants
Popular
Stock
Actions
Loading products…
Active Affiliates
Name
Code
Venmo
Commission %
Customer Discount %
Orders
Commission Owed
Password
Actions
Pending Applications
Name
Code
Email
Platform
Actions
⏳ Pending Requests
Date
Affiliate
Reward
Points
Details
Actions
History
Date
Affiliate
Reward
Points
Status
🎉 Welcome CodeGiven on first login
% off
➕ Create Custom Code
% off
All Active CodesAll codes sync live to the website via admin.php
Registered Users
#
Name
Email
Company / Lab
Joined
Verified
Last Login
Actions
👥
Click Refresh to load users
Change Password
Changing password for
Select a user above
📦 Product Stacks
Bundles shown in the "Research Stacks" section of your shop. Changes go live instantly. The section hides automatically when you have no active stacks.
Add Stack
Name
Products
Original
Sale
Badge
Live
Loading…
⭐ Customer Reviews
Testimonials shown on your storefront home page. Your site ships with placeholder reviews — replace them with real customer feedback. The section hides automatically if none are live.
Add Review
Name
Role
Review
Stars
Live
Loading…
📄 Certificates of Analysis
One entry per lot / report. The storefront's Certificates page lists all of them, and each product card's "View COA" button opens that product's most recent current certificate. Mark older lots as archived instead of deleting so customers with old vials can still find them.
Add Certificate
Product
Report / Lot
Purity
Tested
Lab
Status
Loading…
Dashboard Password
Change the owner password for this dashboard. Stored as a secure hash on the server — never in this file.
Storefront Theme
Switch the live website between its two looks. Takes effect the next time the storefront loads — no file uploads needed.
Gold & Black
Green & Black
Storefront Fonts
Pick the heading and body typefaces and scale the overall text size. The storefront picks this up automatically on its next load.
SmallerDefaultLarger
PURE. POTENT. RELENTLESS.
Premium research peptides for serious research. Third-party tested, 99%+ purity, COA on every batch.
Connect Google Sheets
Paste your Google Apps Script Web App URL to sync orders into the dashboard.
Apps Script Code
Paste this into Google Apps Script (Extensions → Apps Script in your Sheet).
// D Alpha Labs — Google Apps Script v3 (secured)
// Must match SHEET_API_SECRET in the dashboard HTML.
const API_SECRET = 'wl_hBLMCkr4Bb50';
// Fields customers are allowed to see via public order lookup.
// Deliberately excludes: Name, Venmo, Address, Zip, affiliate + commission data.
const PUBLIC_FIELDS = ['Order Number', 'Timestamp', 'Items', 'Total', 'Status', 'Tracking', 'Shipping'];
function doPost(e) {
// Lock prevents two simultaneous requests from double-appending
const lock = LockService.getScriptLock();
lock.waitLock(10000);
try {
const sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
const d = JSON.parse(e.postData.contents);
const rows = sheet.getDataRange().getValues();
const headers = rows[0].map(function(h){ return String(h).trim(); });
const onCol = headers.indexOf('Order Number');
// ── STATUS / TRACKING / NOTES UPDATE (dashboard only — requires secret) ──
if (d.action === 'update_order') {
if (d.secret !== API_SECRET) {
return ContentService.createTextOutput("FORBIDDEN").setMimeType(ContentService.MimeType.TEXT);
}
if (!d.orderNumber) {
return ContentService.createTextOutput("MISSING_ORDER").setMimeType(ContentService.MimeType.TEXT);
}
const sCol = headers.indexOf('Status');
const nCol = headers.indexOf('Notes');
const tCol = headers.indexOf('Tracking');
for (var i = 1; i < rows.length; i++) {
if (String(rows[i][onCol]).trim().toUpperCase() === String(d.orderNumber).trim().toUpperCase()) {
if (d.status !== undefined && sCol > -1) sheet.getRange(i+1, sCol+1).setValue(String(d.status).toUpperCase());
if (d.notes !== undefined && nCol > -1) sheet.getRange(i+1, nCol+1).setValue(d.notes);
if (d.tracking !== undefined && tCol > -1) sheet.getRange(i+1, tCol+1).setValue(d.tracking);
return ContentService.createTextOutput("UPDATED").setMimeType(ContentService.MimeType.TEXT);
}
}
return ContentService.createTextOutput("NOT_FOUND").setMimeType(ContentService.MimeType.TEXT);
}
// ── NEW ORDER (public — storefront checkout logs here) ──
// Idempotent: same order number never logs twice.
if (d.orderNumber && onCol > -1) {
for (var j = 1; j < rows.length; j++) {
if (String(rows[j][onCol]).trim() === String(d.orderNumber).trim()) {
return ContentService.createTextOutput("DUPLICATE").setMimeType(ContentService.MimeType.TEXT);
}
}
}
sheet.appendRow([
d.timestamp, d.orderNumber||'', d.name, d.venmo, d.address, d.zip,
d.items, d.subtotal, d.shipping, d.total,
d.discountCode, d.affiliateCode, d.affiliateName,
d.affiliateVenmo, d.commissionOwed, 'PENDING', '', d.tracking||'',
d.paymentMethod||''
]);
return ContentService.createTextOutput("OK").setMimeType(ContentService.MimeType.TEXT);
} finally {
lock.releaseLock();
}
}
function doGet(e) {
const sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
const rows = sheet.getDataRange().getValues();
const headers = rows[0].map(function(h){ return String(h).trim(); });
const p = (e && e.parameter) ? e.parameter : {};
// ── PUBLIC: single-order lookup for the customer tracking page ──
// Returns ONLY safe fields for the one matching order. No key needed.
if (p.orderNumber) {
const onCol = headers.indexOf('Order Number');
const want = String(p.orderNumber).trim().toUpperCase();
for (var i = 1; i < rows.length; i++) {
if (String(rows[i][onCol]).trim().toUpperCase() === want) {
const obj = {};
PUBLIC_FIELDS.forEach(function(f) {
const c = headers.indexOf(f);
if (c > -1) obj[f] = rows[i][c];
});
// tracking page expects an array it can .find() on
return ContentService.createTextOutput(JSON.stringify([obj]))
.setMimeType(ContentService.MimeType.JSON);
}
}
return ContentService.createTextOutput(JSON.stringify([]))
.setMimeType(ContentService.MimeType.JSON);
}
// ── PRIVATE: full dump for the dashboard — requires key ──
if (p.key !== API_SECRET) {
return ContentService.createTextOutput(JSON.stringify({error:'forbidden'}))
.setMimeType(ContentService.MimeType.JSON);
}
const data = rows.slice(1).map(function(r) {
const obj = {};
headers.forEach(function(h, i) { obj[h] = r[i]; });
return obj;
});
return ContentService.createTextOutput(JSON.stringify(data))
.setMimeType(ContentService.MimeType.JSON);
}
Sheet Headers
Row 1 of your Google Sheet must have exactly these headers:
Timestamp | Order Number | Name | Venmo | Address | Zip | Items | Subtotal | Shipping | Total | Discount Code | Affiliate Code | Affiliate Name | Affiliate Venmo | Commission Owed | Status | Notes | Tracking | Payment
If your sheet already has data: just type Payment in the next empty header cell (column S). Old orders keep working — Payment just shows blank for them.
Welcome!
BD Rewards — earn points, redeem for cash, codes, or free product
🐾
Pup
0 pts lifetime
0
Orders
$0
Revenue Driven
$0
Lifetime Earned
Redeemable Balance
0 pts
= $0.00 cash value
🐾
🎮 Redeem Your Points
💸
Cash to Venmo
100 pts = $1.00
Redeem →
🏷️
Discount Code
From 700 pts
Redeem →
🧪
Free Peptide
Best long-term value
Redeem →
🎁 Your Reward Requests
Date
Reward
Points Spent
Status
Your Orders
Date
Customer
Total
Your Commission
Points Earned
Status
💸 Redeem Cash to Venmo
Rate: 100 pts = $1.00 — exactly your earned commission, no markup. Minimum redemption: 500 pts ($5).
🏷️ Redeem a Discount Code
Get an instant, ready-to-use discount code — better value than cashing out if you use it on a real order.
🧪 Redeem a Free Peptide
The best value per point — save up instead of cashing out and unlock free product. We ship it to you directly.