conversion-optimizer 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +98 -0
  2. package/index.js +27 -0
  3. package/package.json +27 -0
package/README.md ADDED
@@ -0,0 +1,98 @@
1
+ # Conversion Optimizer
2
+
3
+ A powerful toolkit for optimizing website conversion rates through A/B testing, analytics, and data-driven optimization strategies. Built as part of the [Popupsmart](https://popupsmart.com) ecosystem.
4
+
5
+ ## Overview
6
+
7
+ `conversion-optimizer` provides developers with essential utilities to measure, test, and improve website conversion rates. Whether you're optimizing popup campaigns, landing pages, or checkout flows, this package offers the tools you need to make data-informed decisions.
8
+
9
+ ## Installation
10
+
11
+ ```bash
12
+ npm install conversion-optimizer
13
+ ```
14
+
15
+ ## Quick Start
16
+
17
+ ```javascript
18
+ const { ConversionOptimizer, ABTest, Analytics } = require('conversion-optimizer');
19
+
20
+ // Initialize the optimizer
21
+ const optimizer = new ConversionOptimizer({
22
+ siteId: 'your-site-id',
23
+ trackingEnabled: true
24
+ });
25
+
26
+ // Track a conversion event
27
+ optimizer.trackConversion('signup', {
28
+ value: 29.99,
29
+ source: 'popup-campaign'
30
+ });
31
+ ```
32
+
33
+ ## Key Features
34
+
35
+ - **A/B Testing Engine** - Create and manage split tests with statistical significance calculations
36
+ - **Conversion Tracking** - Monitor user actions and measure conversion rates across your funnel
37
+ - **Funnel Analysis** - Identify drop-off points and optimize user journeys
38
+ - **Real-time Analytics** - Access live data on campaign performance and user behavior
39
+ - **Popup Integration** - Seamlessly works with Popupsmart campaigns for enhanced optimization
40
+
41
+ ## Usage Examples
42
+
43
+ ### Creating an A/B Test
44
+
45
+ ```javascript
46
+ const test = new ABTest({
47
+ name: 'popup-headline-test',
48
+ variants: [
49
+ { id: 'control', weight: 50 },
50
+ { id: 'variant-a', weight: 50 }
51
+ ]
52
+ });
53
+
54
+ const selectedVariant = test.assignVariant(userId);
55
+ console.log(`User assigned to: ${selectedVariant}`);
56
+ ```
57
+
58
+ ### Tracking Funnel Events
59
+
60
+ ```javascript
61
+ const analytics = new Analytics({ siteId: 'your-site-id' });
62
+
63
+ // Track funnel progression
64
+ analytics.trackFunnelStep('viewed_popup');
65
+ analytics.trackFunnelStep('clicked_cta');
66
+ analytics.trackFunnelStep('completed_signup');
67
+
68
+ // Get funnel metrics
69
+ const metrics = await analytics.getFunnelMetrics('signup-flow');
70
+ console.log(`Conversion rate: ${metrics.conversionRate}%`);
71
+ ```
72
+
73
+ ## Configuration Options
74
+
75
+ | Option | Type | Default | Description |
76
+ |--------|------|---------|-------------|
77
+ | `siteId` | string | required | Your unique site identifier |
78
+ | `trackingEnabled` | boolean | `true` | Enable/disable conversion tracking |
79
+ | `cookieDuration` | number | `30` | Days to persist visitor data |
80
+ | `debugMode` | boolean | `false` | Enable verbose logging |
81
+ | `apiEndpoint` | string | `null` | Custom API endpoint for data collection |
82
+
83
+ ```javascript
84
+ const optimizer = new ConversionOptimizer({
85
+ siteId: 'your-site-id',
86
+ trackingEnabled: true,
87
+ cookieDuration: 60,
88
+ debugMode: process.env.NODE_ENV === 'development'
89
+ });
90
+ ```
91
+
92
+ ## About Popupsmart
93
+
94
+ This package is part of the [Popupsmart](https://popupsmart.com) ecosystem — a no-code popup builder and conversion optimization platform trusted by thousands of businesses to increase leads, sales, and engagement.
95
+
96
+ ## License
97
+
98
+ MIT License - see [LICENSE](LICENSE) for details.
package/index.js ADDED
@@ -0,0 +1,27 @@
1
+ /**
2
+ * conversion-optimizer
3
+ * Tools and utilities for optimizing website conversion rates
4
+ *
5
+ * @module conversion-optimizer
6
+ * @author Popupsmart
7
+ * @license MIT
8
+ */
9
+
10
+ module.exports = {
11
+ name: 'conversion-optimizer',
12
+ version: '1.0.0',
13
+ description: 'Tools and utilities for optimizing website conversion rates',
14
+ homepage: 'https://popupsmart.com',
15
+
16
+ /**
17
+ * Initialize the package
18
+ * @returns {Object} Package information
19
+ */
20
+ init: function() {
21
+ return {
22
+ name: this.name,
23
+ version: this.version,
24
+ homepage: this.homepage
25
+ };
26
+ }
27
+ };
package/package.json ADDED
@@ -0,0 +1,27 @@
1
+ {
2
+ "name": "conversion-optimizer",
3
+ "version": "1.0.0",
4
+ "description": "Tools and utilities for optimizing website conversion rates",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "test": "echo \"Error: no test specified\" && exit 1"
8
+ },
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "https://github.com/popupsmart/conversion-optimizer.git"
12
+ },
13
+ "homepage": "https://popupsmart.com",
14
+ "keywords": [
15
+ "popup",
16
+ "marketing",
17
+ "conversion",
18
+ "popupsmart",
19
+ "conversion",
20
+ "optimizer"
21
+ ],
22
+ "author": "Popupsmart",
23
+ "license": "MIT",
24
+ "bugs": {
25
+ "url": "https://github.com/popupsmart/conversion-optimizer/issues"
26
+ }
27
+ }