You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`pixelId`| string | Yes | Your ConvertedIn pixel ID|
60
129
|`storeUrl`| string | Yes | Your store URL|
61
130
62
-
### `useConvertedIn`
131
+
### `useConvertedInSdk`
63
132
64
133
Returns an object with the following methods:
65
134
@@ -68,9 +137,9 @@ Returns an object with the following methods:
68
137
|`isInitialized`| None |`boolean`| Returns whether the SDK has been initialized. |
69
138
|`initializeSDK`|`config: { pixelId: string, storeUrl: string }`|`Promise<void>`| Initializes the SDKwith the provided configuration. Callthis as early as possible in your app's lifecycle. |
70
139
| `identifyUser` | `email: string, countryCode: string, phoneNumber: string` | `void` | Identifies a user with their email, country code, and phone number. This helps in tracking user-specific events and improving personalization. |
71
-
|`addEvent`|`eventName: string, currency: string, total: number, products: Product[]`|`void`| Adds a custom event with the specified name, currency, total, and products. This allows tracking of specific actions or milestones in your app. |
140
+
| `addEvent` | `eventName: string, currency: string, total: number, products: Product[]` | `void` | Adds a custom event with the specified name, currency, total, and products. This allows tracking specific actions or milestones in your app. |
72
141
| `viewContentEvent` | `currency: string, total: number, products: Product[]` | `void` | Tracks a view content event when a user views a product or content page. Includes details like currency, total value, and viewed products. |
73
-
|`addToCartEvent`|`currency: string, total: number, products: Product[]`|`void`| Tracks an add to cart event when a user adds items to their shopping cart. Includes details about the added products, total value, and currency. |
142
+
| `addToCartEvent` | `currency: string, total: number, products: Product[]` | `void` | Tracks an add-to-cart event when a user adds items to their shopping cart. Includes details about the added products, total value, and currency. |
74
143
| `initiateCheckoutEvent` | `currency: string, total: number, products: Product[]` | `void` | Tracks the initiation of the checkout process. This event should be called when a user starts the purchasing process. |
75
144
| `purchaseEvent` | `currency: string, total: number, products: Product[]` | `void` | Tracks a completed purchase event. This should be called when a user successfully completes a transaction, including details of purchased products. |
76
145
| `registerEvent` | None | `void` | Tracks a user registration event. This should be called when a new user creates an account in your app. |
@@ -83,23 +152,23 @@ Returns an object with the following methods:
83
152
| `quantity` | number | The quantity of the product. |
84
153
| `name` | string | The name of the product. |
85
154
86
-
## Example
155
+
## 🧪 Sample App
87
156
88
157
Check the `example` folder for a complete implementation example.
89
158
90
159
> [!NOTE]
91
160
> If you encounter an error while installing pods in `example/ios`, please refer to this solution: [https://stackoverflow.com/a/78874710/12355129](https://stackoverflow.com/a/78874710/12355129)
92
161
93
-
## Development
162
+
## 🛠️ Development
94
163
95
164
To develop the SDK locally:
96
165
97
-
1. Clone the repository
166
+
1. Clone the repository.
98
167
2. Ensure you have the following environment set up:
99
168
- Node.js version 18 or higher.
100
-
- Yarn version 3 or higher; the version fixed with the project is 3.6.1.
169
+
- Yarn version 3 or higher (project version: 3.6.1).
101
170
- Java 17 or higher.
102
-
- For iOS development: Xcode 12.0 or higher.
171
+
- For iOS development: Xcode 12.0 or higher. iOS deployment target 13.0 or higher.
103
172
- For Android development: Android Studio 4.0 or higher.
104
173
105
174
3. Install dependencies:
@@ -123,15 +192,15 @@ To develop the SDK locally:
123
192
yarn example android
124
193
```
125
194
126
-
## Testing
195
+
## 🧪 Testing
127
196
128
197
Run tests with:
129
198
130
199
```bash
131
200
yarn test
132
201
```
133
202
134
-
### Error Handling
203
+
## 🚨 Error Handling
135
204
136
205
If any SDK method is called before initialization, an error will be thrown with the message:
137
206
@@ -141,17 +210,17 @@ SDK must be initialized before calling this method.
141
210
142
211
Make sure to initialize the SDK using the `initializeSDK` method before invoking any other SDK methods.
143
212
144
-
## Contributing
213
+
## 🤝 Contributing
145
214
146
215
See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.
147
216
148
-
## Official Documentation
217
+
## 📚 Official Documentation
149
218
150
219
For detailed information and advanced usage, refer to the official ConvertedIn SDK documentation:
151
220
152
221
- [Android Getting Started Guide](https://developer.converted.in/android/getting-started)
153
222
- [iOS Getting Started Guide](https://developer.converted.in/ios/getting-started)
0 commit comments