If you have a non-attributed orders, they will show up in the pixel view as following:
If you want to reduce those, you can do it in 2 steps:
Events are deduplicated. Venon recognizes events that are tracked by both the theme script and the customer events pixel, and counts each event only once. You can safely add both.
Add this script to theme.liquid
Add this script to theme.liquid
Video instruction: https://drive.google.com/file/d/1JZbs1HszH_dDEiMZ7YXO0HJw1iiLxKp9/view?usp=drive_link
<script async src="https://storage.googleapis.com/tp_script/YOURSHOPIFYNAME.myshopify.com/config.js"></script>
Change YOURSHOPIFYNAME with your Shopify shop name.
Could not display content
You can also see your shopify shopname in Venon if you click on your shop in the top left. In this example the Shopify shopname is acme-demo-store:
So your final script that you need to add is:
<script async src="https://storage.googleapis.com/tp_script/acme-demo-store.myshopify.com/config.js"></script>
1. Go to Online shops → Themes
2. Click on three dots → Edit code
3. Go to layout → theme.liquid
4. Add it in <head> at the top:
5. Then click on Save at the top right
When you're done with this, you just need to do step 2:
Add customer events
Add customer events
Video instruction: https://drive.google.com/file/d/10snXwP4qDl03ER10IsqeFh7GQ6Qnc-7P/view?usp=sharing
1. Go to Shopify settings (bottom left)
2. Go to Customer events
3. Add custom pixel
4. Add name Venon
5. Set settings
Permission: Not required
Data sale: Data collected does not qualify as data sale
6. Add this code:
Replace YOURSHOPIFYNAME with your Shopify name here. So for example: const shopName = "test"; Keep the quotes before and after ("...").
Script to copy:
const shopName="YOURSHOPIFYNAME", t="https://api.venon.io/api/shopifyfeedback";function e(t){return{product_id:t.merchandise?.product?.id?.replace("gid://shopify/Product/","")||"",variant_id:t.merchandise?.id?.replace("gid://shopify/ProductVariant/","")||"",title:t.merchandise?.product?.title||t.merchandise?.title||"",price:t.cost?.totalAmount?.amount||t.merchandise?.price?.amount||0,quantity:t.quantity||1,image_url:t.merchandise?.image?.src||null,url:t.merchandise?.product?.url||null}}function n(t){return(t.lineItems||[]).slice(0,10).map(t=>({product_id:t.variant?.product?.id?.replace("gid://shopify/Product/","")||"",variant_id:t.variant?.id?.replace("gid://shopify/ProductVariant/","")||"",title:t.title||t.variant?.title||"",price:t.variant?.price?.amount||0,quantity:t.quantity||1,image_url:t.variant?.image?.src||null,url:t.variant?.product?.url||null}))}function r(t){if(!t)return null;try{const e=atob(t);return JSON.parse(e).$exchange_id||null}catch(e){return null}}function a(t){const e={checkoutId:t?.token,value:t?.totalPrice?.amount,currency:t?.totalPrice?.currencyCode,email:t?.email||null,phone:t?.phone||null};return t?.lineItems&&(e.line_items=n(t),e.item_count=t.lineItems.reduce((t,e)=>t+(e.quantity||1),0),e.cart_total=t.totalPrice?.amount),e}function i(t){const e=new URL(t.context.document.location.href),n=""!==e.searchParams.toString(),r=t.context.document.referrer,a=""!==r,i=a&&new URL(r).hostname===e.hostname,c=t.context.document.location.href.includes("checkouts"),o=t.context.document.location.href.includes("/orders/");return n||a&&!i||c||o?{}:null}function c(t){const e=t.data.productVariant;return{currency_code:e?.price?.currencyCode,brand:e?.product?.vendor,url:e?.product?.url,image_url:e?.image?.src,product_id:e?.product?.id,value:e?.price?.amount,product_name:e?.product?.title}}function o(t){const n=t.data?.cartLine;return n?{value:n.cost?.totalAmount?.amount,currency:n.cost?.totalAmount?.currencyCode,line_items:[e(n)],item_count:n.quantity||1,cart_total:n.cost?.totalAmount?.amount,product_type:n.merchandise?.product?.type,variant_id:n.merchandise?.id,product_id:n.merchandise?.product?.id,variant_sku:n.merchandise?.sku,product_name:n.merchandise?.product?.title,variant_name:n.merchandise?.title,brand:n.merchandise?.product?.vendor,url:n.merchandise?.product?.url,image_url:n.merchandise?.image?.src}:{}}function u(t){const e=t.data?.checkout,r={orderId:e?.order?.id,checkoutId:e?.token,value:e?.totalPrice?.amount,currency:e?.totalPrice?.currencyCode,email:e?.email||null,phone:e?.phone||null,subtotal_price:e?.subtotalPrice?.amount||null};return e?.lineItems&&(r.line_items=n(e),r.item_count=e.lineItems.reduce((t,e)=>t+(e.quantity||1),0)),r}function s(t){const e=t.data?.checkout,r={checkoutId:e?.token,value:e?.totalPrice?.amount,currency:e?.totalPrice?.currencyCode};return e?.lineItems&&(r.line_items=n(e),r.item_count=e.lineItems.reduce((t,e)=>t+(e.quantity||1),0),r.cart_total=e.totalPrice?.amount,r.line_items=e.lineItems?.map(t=>({key:t?.id,quantity:t?.quantity,title:t?.title,price:t?.finalLinePrice?.amount,productId:t?.variant?.product?.id,variantId:t?.variant?.id,variantTitle:t?.variant?.title,variantPrice:t?.variant?.price?.amount,sku:t?.variant?.sku,vendor:t?.variant?.product?.vendor,productType:t?.variant?.product?.type,image_url:t?.variant?.image?.src,url:t?.variant?.product?.url}))),e&&(r.customer_locale=e.localization?.language?.isoCode,r.discountCodes=e.discountApplications,r.item_count=e.lineItems?.length,r.items=e.lineItems?.map(t=>t?.title),r.sourceName="web",r.totalDiscounts=e.discountsAmount?.amount,r.value=e.totalPrice?.amount,r.currency=e.currencyCode,r.token=e.token,r.email=e.email,r.phone=e.phone,r.subtotal_price=e.subtotalPrice?.amount,r.totalTax=e.totalTax?.amount,r.shippingPrice=e.shippingLine?.price?.amount),r}async function d(t,e,shopName){if(e)return JSON.parse(e).sessionId;const n=m();return t.cookie.set("dv_sessionId",JSON.stringify({sessionId:n,shopName:shopName})),n}function l(t,e,n,shopName,r,a){const i={name:t.name,sessionId:n,shop_name:shopName,title:e.context.document.title,clientId:t.clientId,timestamp:t.timestamp,page:e.context.document.location.href,referrer:e.context.document.referrer,cartId:r,user_agent:e.context.navigator?.userAgent};return a&&(i.klaviyo_exchange_id=a),i}function m(){const t=new Uint8Array(16);return self.crypto.getRandomValues(t),Array.from(t,t=>("0"+t.toString(16)).slice(-2)).join("")}analytics.subscribe("all_standard_events",async e=>{const n=await browser.cookie.get("__kla_id"),m=await browser.cookie.get("dv_sessionId"),p=await d(browser,m,shopName),_=await browser.cookie.get("cart"),h=r(n);let y={};switch(e.name){case"page_viewed":const t=i(init);if(!t)return;y=t;break;case"product_viewed":y=c(e);break;case"product_added_to_cart":y=o(e);break;case"checkout_completed":y=u(e);break;case"checkout_started":y=s(e);break;case"checkout_address_info_submitted":case"checkout_contact_info_submitted":case"checkout_shipping_info_submitted":case"payment_info_submitted":y=a(e.data?.checkout);break;case"product_removed_from_cart":case"search_submitted":break;default:return}const v={...y,...l(e,init,p,shopName,_,h)};fetch(t,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(v),keepalive:!0})});
Script as file (same script as above): https://drive.google.com/file/d/1QAD5vgTTrpIQTkAXyq5QAXW8GcUpK7Nh/view?usp=sharing
Please copy the whole script to your clipboard.
7. Click 'Connect'










