Skip to content

Commit 49ea4e2

Browse files
committed
Merge branch 'main' of https://github.com/totalKonnect/Main
2 parents 8fe1599 + ddb3a80 commit 49ea4e2

9 files changed

Lines changed: 1849 additions & 503 deletions

File tree

index.html

Lines changed: 316 additions & 142 deletions
Large diffs are not rendered by default.

plans/standardd/1index.html

Lines changed: 0 additions & 296 deletions
This file was deleted.

plans/standardd/README.md

Lines changed: 217 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,217 @@
1+
# Standard Plan - Digital Business Card
2+
3+
## Overview
4+
The Standard Plan offers enhanced features for professionals looking to elevate their digital presence with analytics, custom branding, and team support.
5+
6+
## Features
7+
- 5 Premium NFC Cards
8+
- Custom Card Design
9+
- Unlimited Media Links
10+
- Analytics Dashboard
11+
- Email Support
12+
- No Watermark
13+
- Real-time Link Updates
14+
15+
## Files Structure
16+
17+
### Frontend Files
18+
- **index.html** - Main landing and data collection form
19+
- **dashboard.html** - Analytics dashboard for card owners
20+
- **main.js** - Form handling and validation logic
21+
- **dashboard.js** - Dashboard data visualization and charts
22+
- **config.js** - Configuration settings (API endpoints, validation rules)
23+
- **script.js** - Additional UI features
24+
25+
### Backend Files
26+
- **code.gs** - Google Apps Script for backend processing
27+
28+
## Google Apps Script Setup
29+
30+
### Prerequisites
31+
1. Google Account with access to Google Sheets
32+
2. Google Apps Script project
33+
34+
### Setup Instructions
35+
36+
1. **Create a Google Sheet**
37+
- Create a new Google Sheet
38+
- Name it "Standard Plan Submissions" or similar
39+
40+
2. **Create Required Sheets**
41+
The script will auto-create these sheets on first run:
42+
- `Form Submissions` - Stores all form submissions
43+
- `Analytics` - Tracks user analytics events
44+
- `Referral Codes` - (Optional) Store referral codes
45+
46+
3. **Set up Google Apps Script**
47+
- Open the Google Sheet
48+
- Go to Extensions > Apps Script
49+
- Copy the content from `code.gs` into the script editor
50+
- Save the project
51+
52+
4. **Deploy as Web App**
53+
- Click "Deploy" > "New deployment"
54+
- Select type: Web app
55+
- Execute as: Me
56+
- Who has access: Anyone
57+
- Click "Deploy"
58+
- Copy the Web App URL
59+
60+
5. **Update Configuration**
61+
- Update `config.js` with your new Web App URL:
62+
```javascript
63+
googleScriptUrl: "YOUR_WEB_APP_URL_HERE"
64+
```
65+
66+
### Referral Codes Setup (Optional)
67+
1. Create a sheet named "Referral Codes"
68+
2. Add headers: `Code` | `Discount Value` | `Valid Until`
69+
3. Add referral codes (5 characters, uppercase)
70+
71+
Example:
72+
```
73+
Code | Discount Value | Valid Until
74+
ABCD1 | 10% OFF | 2024-12-31
75+
XYZ99 | 15% OFF | 2024-06-30
76+
```
77+
78+
## Form Workflow
79+
80+
1. **User fills the form** with:
81+
- Profile picture (uploaded to Cloudinary)
82+
- Name and tagline
83+
- Custom URL link
84+
- Social/professional links
85+
- Contact information
86+
- Card style preference
87+
- Optional referral code
88+
89+
2. **Validation checks**:
90+
- Duplicate email/link detection
91+
- Referral code validation
92+
- Image size and type validation
93+
94+
3. **Data processing**:
95+
- Image uploaded to Cloudinary
96+
- Form data sent to Google Sheets
97+
- Confirmation email sent to user
98+
- Unique submission ID generated
99+
100+
4. **Post-submission**:
101+
- User receives email with dashboard link
102+
- Can access analytics dashboard with submission ID
103+
104+
## Analytics Dashboard
105+
106+
### Metrics Tracked
107+
- Total profile views
108+
- Link clicks
109+
- Contact saves (vCard downloads)
110+
- Engagement rate
111+
- Recent activity timeline
112+
113+
### Charts
114+
- Profile views over time (line chart)
115+
- Most clicked links (bar chart)
116+
117+
### Data Collection
118+
Analytics events are tracked in the `Analytics` sheet:
119+
- View events: When someone views the card
120+
- Click events: When someone clicks a link
121+
- Save events: When someone saves the contact
122+
123+
## UX/UI Features
124+
125+
### Persuasion Psychology Elements
126+
1. **Social Proof**: "Join 2,500+ professionals"
127+
2. **Progress Indicators**: Visual step completion
128+
3. **Scarcity**: "5 spots left today" messaging
129+
4. **Trust Signals**: Security badges (Secure, Protected, Instant)
130+
5. **Benefits Reminder**: Pre-submission feature recap
131+
6. **Professional Design**: Glassmorphism effects, smooth animations
132+
133+
### Form Progress Tracking
134+
- Automatic progress bar updates
135+
- Step indicators (1 of 4, 2 of 4, etc.)
136+
- Real-time validation feedback
137+
138+
## API Endpoints
139+
140+
The Google Apps Script handles these query parameters:
141+
142+
### Check Duplicates
143+
```
144+
?check_duplicates=true&email={email}&link={link}
145+
```
146+
Returns: `{ emailExists: boolean, linkExists: boolean }`
147+
148+
### Check Referral Code
149+
```
150+
?check_referral=true&code={code}
151+
```
152+
Returns: `{ codeExists: boolean, codeDetails: {...} }`
153+
154+
### Track Analytics
155+
```
156+
?track_analytics=true&userId={id}&eventType={type}&eventData={data}
157+
```
158+
Returns: `{ status: "success" }`
159+
160+
### Get Analytics
161+
```
162+
?get_analytics=true&id={userId}
163+
```
164+
Returns: Analytics data object
165+
166+
### Form Submission
167+
```
168+
?name={name}&email={email}&link={link}&...
169+
```
170+
Returns: `{ status: "success", submissionId: "..." }`
171+
172+
## Customization
173+
174+
### Styling
175+
Modify the gradient presets in `config.js`:
176+
```javascript
177+
export const stylePresets = {
178+
corporateGradient: { background: "..." },
179+
oceanGradient: { background: "..." },
180+
// Add more presets
181+
};
182+
```
183+
184+
### Validation Rules
185+
Update validation patterns in `config.js`:
186+
```javascript
187+
export const CONFIG = {
188+
emailRegex: /pattern/,
189+
linkRegex: /pattern/,
190+
maxFileSize: 5 * 1024 * 1024,
191+
// ...
192+
};
193+
```
194+
195+
## Troubleshooting
196+
197+
### Form submission fails
198+
- Check Google Apps Script deployment URL
199+
- Verify CORS settings in Apps Script
200+
- Check browser console for errors
201+
202+
### Images not uploading
203+
- Verify Cloudinary credentials
204+
- Check image size (max 5MB)
205+
- Ensure allowed file types (JPEG, PNG, GIF)
206+
207+
### Analytics not showing
208+
- Verify submission ID in URL
209+
- Check Analytics sheet has data
210+
- Ensure proper Google Sheets permissions
211+
212+
## Support
213+
For issues or questions, contact support at support@tccards.tn
214+
215+
## Version
216+
Current Version: 1.0.0
217+
Last Updated: 2024

0 commit comments

Comments
 (0)