Hi all,
Could you please help?
We have integrated Klaviyo into 2 Shopify plus stores.
We are getting most data except Product Viewed and Add to Cart.
I have added the above 2 tags through GTM using the below code snippet: (please have in mind the base Klaviyo tag is installed directly in the theme)
<script type="text/javascript">
var _learnq = _learnq || |];
var item = {
"Name": "{{dlv - Product View - Name}}",
"ProductID": "{{dlv - Product View - Product ID}}",
"ImageURL": "{{DOM - PDP - Image URL}}",
"SKU": "{{dlv - Product View - SKU}}",
"URL": "https://{{Page Hostname}}{{Page Path}}",
"Brand": "{{dlv - Product View - Brand}}",
"Price": "{{dlv - Product View - Price}}",
"CompareAtPrice": "{{dlv - Product View - Variant Compare At Price}}"
};
_learnq.push(s"track", "Viewed Product", item]);
_learnq.push(s"trackViewedItem", {
"Title": item.ProductName,
"ItemId": item.ProductID,
"Categories": item.Categories,
"ImageUrl": item.ImageURL,
"SKU": item.ID,
"Url": item.URL,
"Metadata": {
"Brand": item.Brand,
"Price": item.Price,
"CompareAtPrice": item.CompareAtPrice
}
}]);
</script>
however in one of the stores I can see the company_id is wrong in the developer tools > Network so data is not sent to the right Klaviyo account.
I would expect it to go to API key / Site ID (MY API KEY), but it goes to another API Key
How could I make sure that data is sent to the correct public API key / Site ID since the base Klaviyo tag is installed directly in the theme and not in GTM?
Thank you in advance
Dim