Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
637 changes: 637 additions & 0 deletions docs/campaign-system.md

Large diffs are not rendered by default.

43 changes: 43 additions & 0 deletions example/campaigns/element-click-tour.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"version": "1.0.0",
"campaigns": [
{
"id": "feature-discovery",
"name": "Feature Discovery Tour",
"description": "Tour that starts when user clicks on a specific element",
"active": true,
"mode": "tour",
"triggers": [
{
"type": "element_click",
"selector": ".help-button",
"delay": 500
}
],
"frequency": {
"type": "session"
},
"tourOptions": {
"steps": [
{
"element": ".feature-panel",
"intro": "This is our main feature panel where you can access advanced tools.",
"position": "left"
},
{
"element": ".settings-icon",
"intro": "Click here to customize your preferences.",
"position": "bottom"
},
{
"element": ".export-button",
"intro": "Use this button to export your data in various formats.",
"position": "top"
}
],
"showProgress": true,
"showBullets": false
}
}
]
}
40 changes: 40 additions & 0 deletions example/campaigns/exit-intent-promotion.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"version": "1.0.0",
"campaigns": [
{
"id": "exit-intent-promotion",
"name": "Exit Intent - Special Offer",
"description": "Show special offer when user tries to leave the page",
"active": true,
"mode": "tour",
"triggers": [
{
"type": "exit_intent",
"sensitivity": 10
}
],
"frequency": {
"type": "once"
},
"tourOptions": {
"steps": [
{
"intro": "<h3>Wait! Don't leave yet!</h3><p>We have a special offer just for you. Get 20% off your first purchase!</p>",
"position": "floating"
},
{
"element": ".promo-code",
"intro": "Use code <strong>WELCOME20</strong> at checkout to get your discount.",
"position": "bottom"
}
],
"exitOnEsc": true,
"exitOnOverlayClick": true
},
"analytics": {
"trackViews": true,
"trackCompletions": true
}
}
]
}
52 changes: 52 additions & 0 deletions example/campaigns/first-visit-tour.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"version": "1.0.0",
"campaigns": [
{
"id": "welcome-tour",
"name": "Welcome Tour - First Visit",
"description": "A welcome tour that appears when a user visits the site for the first time",
"active": true,
"mode": "tour",
"triggers": [
{
"type": "first_visit",
"delay": 1000
}
],
"frequency": {
"type": "once"
},
"tourOptions": {
"steps": [
{
"element": "#step1",
"intro": "Welcome to the Intro.js Campaign System! Let's take a quick tour.",
"title": "Welcome",
"position": "bottom"
},
{
"element": "#step2",
"intro": "This campaign was loaded from a JSON file and triggered automatically on your first visit.",
"title": "Automatic Triggers",
"position": "bottom"
},
{
"element": "#step3",
"intro": "You can configure campaigns with various triggers, targeting rules, and frequencies.",
"title": "Features",
"position": "top"
},
{
"element": ".demo-buttons",
"intro": "Use these buttons to explore different campaign features. That's it! Enjoy the campaign system.",
"title": "Try It Out",
"position": "top"
}
],
"showProgress": true,
"showBullets": true,
"exitOnOverlayClick": false
}
}
]
}
43 changes: 43 additions & 0 deletions example/campaigns/form-assistance.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"version": "1.0.0",
"campaigns": [
{
"id": "form-help-tour",
"name": "Form Assistance Tour",
"description": "Provide help when user starts filling out a form",
"active": true,
"mode": "tour",
"triggers": [
{
"type": "form_interaction",
"selector": "#signup-form input",
"interactionType": "focus"
}
],
"frequency": {
"type": "once"
},
"tourOptions": {
"steps": [
{
"element": "#email-field",
"intro": "Enter your email address. We'll never share it with anyone.",
"position": "right"
},
{
"element": "#password-field",
"intro": "Choose a strong password with at least 8 characters, including numbers and symbols.",
"position": "right"
},
{
"element": "#terms-checkbox",
"intro": "Please review and accept our terms of service and privacy policy.",
"position": "top"
}
],
"exitOnEsc": true,
"showBullets": false
}
}
]
}
49 changes: 49 additions & 0 deletions example/campaigns/idle-user-engagement.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"version": "1.0.0",
"campaigns": [
{
"id": "idle-engagement",
"name": "Idle User Engagement",
"description": "Re-engage users who have been idle for a certain period",
"active": true,
"mode": "tour",
"triggers": [
{
"type": "idle_user",
"idleTime": 30000
}
],
"tourOptions": {
"steps": [
{
"intro": "👋 Still here? Let us show you some features you might have missed!",
"title": "Welcome Back!",
"position": "floating"
},
{
"element": "#step1",
"intro": "This is the main content area where you can find important information.",
"title": "Main Content",
"position": "bottom"
},
{
"element": "#step2",
"intro": "Here you'll find additional details and features.",
"title": "More Information",
"position": "bottom"
},
{
"element": ".demo-buttons",
"intro": "Use these buttons to interact with different campaign features and test various triggers.",
"title": "Action Buttons",
"position": "top"
}
],
"showProgress": true,
"showBullets": true,
"exitOnEsc": true,
"exitOnOverlayClick": true
}
}
]
}
Loading
Loading