feat(spa): add UTM markers for product view on OpenCart (#47)

This commit is contained in:
2026-01-05 20:50:43 +03:00
committed by Nikita Kiselev
parent 8a9bac8221
commit 647e20c6b0

View File

@@ -281,7 +281,13 @@ class ProductsService
$data['points'] = (int) $product_info['points'];
$data['description'] = Str::htmlEntityEncode($product_info['description']);
$data['share'] = Str::htmlEntityEncode(
$this->oc->url->link('product/product', 'product_id=' . $productId)
$this->oc->url->link('product/product', [
'product_id' => $productId,
'utm_source' => 'telecart',
'utm_medium' => 'telegram',
'utm_campaign' => 'product_click',
'utm_content' => 'product_button',
]),
);
if ($product_info['quantity'] <= 0) {