Online Chat Integration (Carrot Quest) on Website
Carrot Quest is a Russian platform for marketing automation and customer support: chat, push notifications, email campaigns, pop-ups, and knowledge bases in one tool. Strong point — user segmentation and custom communication chains based on behavior.
Widget Installation
<script>
(function(){ ... })(); // Basic snippet with SITE_ID
</script>
User Identification
// Authorized user
carrotquest.auth(user.id, user.carrotquest_hash); // hash generated on server
// Pass properties
carrotquest.identify([
{op: 'update_or_create', key: '$email', value: user.email},
{op: 'update_or_create', key: '$name', value: user.name},
{op: 'update_or_create', key: 'plan', value: user.plan},
{op: 'update_or_create', key: 'orders_count', value: user.ordersCount}
]);
Event Tracking
// Item added to cart event
carrotquest.track('$cart_added', {
product_id: product.id,
product_name: product.name,
price: product.price
});
// Purchase event
carrotquest.track('$order_created', {
order_id: orderId,
order_price: total
});
HMAC Authorization (Secure Mode)
$hash = hash_hmac('sha256', (string)$user->id, env('CARROTQUEST_SECRET'));
carrotquest.auth(<?= $user->id ?>, '<?= $hash ?>');
Server API
Carrot Quest supports server calls to update user properties from backend:
Http::withToken(env('CARROTQUEST_API_KEY'))
->post("https://api.carrotquest.io/v1/users/{$userId}/props", [
'props' => [
['op' => 'update_or_create', 'key' => 'total_spent', 'value' => $totalSpent]
]
]);
Setup timeframe: 1 business day with identification and event setup.







