Admin Access
Enter the password to view phone tracker data.
Abandoned Phone Numbers
Users who entered their phone number but didn't complete checkout
-
Total Entries
-
Today
-
This Week
-
Pending
Loading phone records...
No Records
No phone records found
| # ↕ | Phone ↕ | Date ↕ | Time | Cart Total ↕ | Cart Items | Status ↕ |
|---|
Setup Required -- Google Sheets Tracking
- Open Google Sheets and create a new spreadsheet.
- Add these column headers in Row 1:
Phone|Date|Time|Cart Total|Cart Items|Item Count|Page URL|Status - Go to Extensions → Apps Script.
- Delete the default code and paste the Google Apps Script code (provided below).
- Click Deploy → New deployment → Web app.
- Set "Execute as" = Me, "Who has access" = Anyone.
- Click Deploy and copy the Web App URL.
- Open your Shopify theme file:
snippets/mobile-number-popup.liquid - Find the line
- Paste your Web App URL between the quotes.
- Save the file and this page will automatically start showing data!
Google Apps Script Code (copy this):
// Google Apps Script - Paste this in Extensions > Apps Script
function doGet(e) {
try {
var sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
var params = e.parameter;
// If action=log, this is a phone logging request
if (params.action === 'log') {
sheet.appendRow([
params.phone || '',
params.date || '',
params.time || '',
params.cartTotal || '',
params.cartItems || '',
params.itemCount || 0,
params.pageUrl || '',
params.status || 'Pending Checkout'
]);
return ContentService.createTextOutput(
JSON.stringify({ status: 'success' })
).setMimeType(ContentService.MimeType.JSON);
}
// Otherwise return all data for the admin dashboard
var data = sheet.getDataRange().getValues();
var headers = data[0];
var rows = [];
for (var i = 1; i < data.length; i++) {
var row = {};
for (var j = 0; j < headers.length; j++) {
row[headers[j]] = data[i][j];
}
rows.push(row);
}
return ContentService.createTextOutput(
JSON.stringify({ status: 'success', data: rows })
).setMimeType(ContentService.MimeType.JSON);
} catch (err) {
return ContentService.createTextOutput(
JSON.stringify({ status: 'error', message: err.toString() })
).setMimeType(ContentService.MimeType.JSON);
}
}
function doPost(e) {
try {
var sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
var data = JSON.parse(e.postData.contents);
sheet.appendRow([
data.phone || '',
data.date || '',
data.time || '',
data.cartTotal || '',
data.cartItems || '',
data.itemCount || 0,
data.pageUrl || '',
data.status || 'Pending Checkout'
]);
return ContentService.createTextOutput(
JSON.stringify({ status: 'success' })
).setMimeType(ContentService.MimeType.JSON);
} catch (err) {
return ContentService.createTextOutput(
JSON.stringify({ status: 'error', message: err.toString() })
).setMimeType(ContentService.MimeType.JSON);
}
}