Client SDK
First include the sdk in your website
<script src="https://convertedin-pixel-sdk-v1.s3.amazonaws.com/sdk.js"></script>
Then initialize the sdk by providing the pixel key
<script>
ciq("init", "{your-pixel-key-goes-here}")
</script>
Event Name | Event Description |
---|---|
PageView | This is the default pixel tracking page visits.
a person lands on your website pages. |
ViewContent | A visit to a web page you care about (product details page).
a person lands on a product details page. |
AddToCart | When a product is added to the shopping cart.
a person clicks on an add to cart button. |
InitiateCheckout | When a person enters the checkout flow prior to completing the checkout flow. |
Purchase | When a purchase is made or checkout flow is completed.
A person has finished the purchase or checkout flow and lands on thank you or confirmation page. |
// the basic syntax
ciq("track", "EventName", data={});
<script>
// PageView
ciq("track", "PageView");
// ViewContent
ciq("track", "ViewContent", {
content: [
{
id: 1234, // required
quantity: 3, // required
name: "Product name", // optional
category: "Product Category", // optional
}
],
currency: "USD", // required
value: 150.50 // required, sum of products price
});
// AddToCart
ciq("track", "AddToCart", {
content: [
{
id: 1234, // required
quantity: 3, // required
name: "Product name", // optional
category: "Product Category", // optional
},
{
id: 456,
quantity: 1,
}
],
currency: "USD", // required
value: 150.50 // required
});
// InitiateCheckout
ciq("track", "InitiateCheckout", {
content: [
{
id: 1234, // required
quantity: 3, // required
name: "Product name", // optional
category: "Product Category", // optional
},
{
id: 456,
quantity: 1,
}
],
currency: "USD", // required
value: 150.50 // required
});
// Purchase
ciq("track", "Purchase", {
content: [
{
id: 1234, // required
quantity: 3, // required
name: "Product name", // optional
category: "Product Category", // optional
},
{
id: 456,
quantity: 1,
}
],
order_id: 1234343545, // required
currency: "USD", // required
value: 150.50 // required
});
</script>
identify the customer if he authenticated by the id or email or phone to re target him in ads.
the recommended way is to add all data.
ciq('identity', {your_store_customer_id}, {
phone: "" ,
email: "",
});
is a modal box that ask the user about his email and phone to re target him in email or sms campaigns, if he not authenticated user or anonymous, if the customer fill this data the popup no more appear to him.
// the basic syntax
ciq('popup', timeout, options);
the popup already predefined with English localization simply you can call
// will show the popup after 1 second.
ciq('popup', 1000);
if you need any customization you can use this code for any language or any custom text, for example if your localization is Arabic.
ciq('popup', {
showAfter:4, // in seconds
appearIfDismissAfter: 172800, // in seconds 2days
rtl: true,
title: 'اشترك في قايمة العروض بتاعتنا وخد خصم <span>10%</span> واعرف اجدد العروض',
email_label: 'البريد الإلكتروني',
email_placeholder: 'اكتب البريد الإلكتروني هنا ...',
email_invalid: 'بريد الكتروني غير صحيح',
email_required: 'البريد الإلكتروني مطلوب',
phone_label: 'رقم الهاتف',
phone_invalid: 'هاتف غير صحيح',
phone_required: 'الهاتف مطلوب',
submit_action: 'تسجيل',
submit_success: 'تم ارسال البيانات بنجاح',
submit_failed: 'خطأ لم يتم ارسال البيانات'
});
and the result will be like this

you can also use your custom popup or modal and ask the user for his email and phone or any login service and then identify him by use this code.
ciq('identity', null, {
phone: "{customer_phone}" ,
email: "{customer_email}",
});
Last modified 9mo ago