{"id":5730,"date":"2025-04-04T16:18:44","date_gmt":"2025-04-04T07:18:44","guid":{"rendered":"https:\/\/help-ads.smartnews.com\/?p=5730"},"modified":"2025-04-16T18:49:07","modified_gmt":"2025-04-16T09:49:07","slug":"item-5730","status":"publish","type":"post","link":"https:\/\/help-ads.smartnews.com\/en\/item-5730\/","title":{"rendered":"Shopify Pixel support guide"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Using SmartNews Pixels in Shopify themes<\/h2>\n\n\n\n<p>SmartNews Pixels can be easily integrated into your Shopify themes. This page will guide you through the steps of installing SmartNews Pixel tags in Shopify.<\/p>\n\n\n\n<h6 class=\"wp-block-heading\"><i>1<\/i><span>Prepare a SmartNews Pixel<\/span><\/h6>\n\n\n\n<p>Set up a SmartNews Pixel and create a conversion event in SmartNews Ads Manager.<\/p>\n\n\n\n<p><a href=\"https:\/\/help-ads.smartnews.com\/en\/item-3056\/\" title=\"\"><strong>Setting up Pixels and events in SmartNews &gt;<\/strong><\/a><\/p>\n\n\n\n<p>Once your Pixel is ready, copy its base code on the Pixel setup screen.<\/p>\n\n\n\n<h6 class=\"wp-block-heading\"><i>2<\/i><span>Add the base code to your Shopify theme<\/span><\/h6>\n\n\n\n<p>Paste the base code in the <code><strong><mark class=\"has-inline-color has-theme-1-color\">&lt;head&gt;<\/mark><\/strong><\/code> section of <strong>theme.liquid<\/strong>.<\/p>\n\n\n\n<p>If you use any third-party page creation extensions for Shopify, make sure the base code is also included in those extensions\u2019 <strong>theme.liquid<\/strong> files.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"395\" src=\"https:\/\/help-ads.smartnews.com\/wp-content\/uploads\/2025\/04\/image-56-1024x395.png\" alt=\"\" class=\"wp-image-5922\" srcset=\"https:\/\/help-ads.smartnews.com\/wp-content\/uploads\/2025\/04\/image-56-1024x395.png 1024w, https:\/\/help-ads.smartnews.com\/wp-content\/uploads\/2025\/04\/image-56-300x116.png 300w, https:\/\/help-ads.smartnews.com\/wp-content\/uploads\/2025\/04\/image-56-768x296.png 768w, https:\/\/help-ads.smartnews.com\/wp-content\/uploads\/2025\/04\/image-56-1536x593.png 1536w, https:\/\/help-ads.smartnews.com\/wp-content\/uploads\/2025\/04\/image-56-2048x791.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"188\" src=\"https:\/\/help-ads.smartnews.com\/wp-content\/uploads\/2025\/04\/image-57-1024x188.png\" alt=\"\" class=\"wp-image-5924\" srcset=\"https:\/\/help-ads.smartnews.com\/wp-content\/uploads\/2025\/04\/image-57-1024x188.png 1024w, https:\/\/help-ads.smartnews.com\/wp-content\/uploads\/2025\/04\/image-57-300x55.png 300w, https:\/\/help-ads.smartnews.com\/wp-content\/uploads\/2025\/04\/image-57-768x141.png 768w, https:\/\/help-ads.smartnews.com\/wp-content\/uploads\/2025\/04\/image-57-1536x282.png 1536w, https:\/\/help-ads.smartnews.com\/wp-content\/uploads\/2025\/04\/image-57-2048x376.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h6 class=\"wp-block-heading\"><i>3<\/i><span>Configure events in Shopify<\/span><\/h6>\n\n\n\n<p>1. From your Shopify admin account, go to&nbsp;<strong>Settings<\/strong>&nbsp;&gt;&nbsp;<a href=\"https:\/\/admin.shopify.com\/settings\/customer_events\"><strong>Customer events<\/strong><\/a>.<\/p>\n\n\n\n<p>2. Select <strong>Custom pixels<\/strong>.<\/p>\n\n\n\n<p>3. Select <strong>Add pixel<\/strong>.<\/p>\n\n\n\n<p>4. Paste your event code into the code window. It may look something like this:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td><code>\/\/ SmartNews Ads Pixel Initialization<br>!function(){if(window.SmartnewsAds=window.SmartnewsAds||{},!window.SmartnewsAds.p){<br>var e=window.SmartnewsAds.p=function(){e.callMethod?e.callMethod.apply(e,arguments):e.queue.push(arguments)};<br>e.push=e, e.version=\"1.0.1\", e.queue=[];<br>var n=document.createElement(\"script\");<br>n.async=!0, n.src=\"https:\/\/cdn.smartnews-ads.com\/i\/pixel.js\";<br>var s=document.getElementsByTagName(\"script\")[0];<br>s.parentNode.insertBefore(n,s);<br>}}();<br>\/\/ Set up event listeners for standard Shopify events<br>analytics.subscribe(\"page_viewed\", (event) =&gt; {<br>SmartnewsAds.p(\"YOUR_PIXEL_ID\", \"PageView\");<br>});<br>analytics.subscribe(\"product_viewed\", (event) =&gt; {<br>SmartnewsAds.p(\"YOUR_PIXEL_ID\", \"ViewContent\");<br>});<br>analytics.subscribe(\"product_added_to_cart\", (event) =&gt; {<br>SmartnewsAds.p(\"YOUR_PIXEL_ID\", \"AddToCart\");<br>});<br>analytics.subscribe(\"checkout_started\", (event) =&gt; {<br>SmartnewsAds.p(\"YOUR_PIXEL_ID\", \"InitiateCheckout\");<br>});<br>analytics.subscribe(\"payment_info_submitted\", (event) =&gt; {<br>SmartnewsAds.p(\"YOUR_PIXEL_ID\", \"AddPaymentInfo\");<br>});<br>analytics.subscribe(\"checkout_completed\", (event) =&gt; {<br>SmartnewsAds.p(\"YOUR_PIXEL_ID\", \"Purchase\");<br>});<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>5. Replace <code><mark class=\"has-inline-color has-theme-1-color\"><strong>YOUR_PIXEL_ID<\/strong><\/mark><\/code> in the example above with your actual SmartNews Pixel ID.<\/p>\n\n\n\n<h6 class=\"wp-block-heading\"><i>4<\/i><span>Verify implementation<\/span><\/h6>\n\n\n\n<p>Check that your SmartNews Pixel is connected under Setting &gt; Customer events. If the Pixel is shown as \u201cDisconnected\u201d, select Connect to link it with Shopify.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1000\" height=\"651\" src=\"https:\/\/help-ads.smartnews.com\/wp-content\/uploads\/2025\/04\/image_resized_1000px.png\" alt=\"\" class=\"wp-image-5935\" srcset=\"https:\/\/help-ads.smartnews.com\/wp-content\/uploads\/2025\/04\/image_resized_1000px.png 1000w, https:\/\/help-ads.smartnews.com\/wp-content\/uploads\/2025\/04\/image_resized_1000px-300x195.png 300w, https:\/\/help-ads.smartnews.com\/wp-content\/uploads\/2025\/04\/image_resized_1000px-768x500.png 768w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><\/figure>\n\n\n\n<p>Finally, make sure that events are firing correctly and being received in SmartsNews Ads Manager by running some tests in your Shopify environment.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Event mapping reference<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Shopify event<\/th><th>SmartNews event<\/th><\/tr><\/thead><tbody><tr><td><code>page_viewed<\/code><\/td><td><code>PageView<\/code><\/td><\/tr><tr><td><code>product_viewed<\/code><\/td><td><code>ViewContent<\/code><\/td><\/tr><tr><td><code>product_added_to_cart<\/code><\/td><td><code>AddToCart<\/code><\/td><\/tr><tr><td><code>checkout_started<\/code><\/td><td><code>InitiateCheckout<\/code><\/td><\/tr><tr><td><code>payment_info_submitted<\/code><\/td><td><code>AddPaymentInfo<\/code><\/td><\/tr><tr><td><code>checkout_completed<\/code><\/td><td><code>Purchase<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">FAQ<\/h2>\n\n\n\n<p><strong>Q\uff1a<strong>How do I verify my Pixel implementation on dynamic pages?<\/strong><\/strong><\/p>\n\n\n\n<p>A\uff1aFor dynamic pages that require specific user actions, the Pixel validator might incorrectly report that the Pixel hasn&#8217;t fired. You may need to perform actual user actions to properly test the implementation.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>Q\uff1a<strong><strong>Can I track multiple events with the same Pixel?<\/strong><\/strong><\/strong><\/p>\n\n\n\n<p>A\uff1aYes, you can track multiple standard events like <code><mark class=\"has-inline-color has-theme-1-color\"><strong>PageView<\/strong><\/mark><\/code>, <code><strong><mark class=\"has-inline-color has-theme-1-color\">ViewContent<\/mark><\/strong><\/code>, <code><strong><mark class=\"has-inline-color has-theme-1-color\">AddToCart<\/mark><\/strong><\/code>, <code><strong><mark class=\"has-inline-color has-theme-1-color\">InitiateCheckout<\/mark><\/strong><\/code>, <code><strong><mark class=\"has-inline-color has-theme-1-color\">AddPaymentInfo<\/mark><\/strong><\/code>, and <code><strong><mark class=\"has-inline-color has-theme-1-color\">Purchase<\/mark><\/strong><\/code> with a single Pixel implementation.<\/p>\n","protected":false},"excerpt":{"rendered":"Using SmartNews Pixels in Shopify themes SmartNews Pixels can be easily integrated into your Shopify themes. This page will guide you through the steps of installing SmartNews Pixel tags in Shopify. 1Prepare a SmartNews Pixel Set up a SmartNews Pixel and create a conversion event in SmartNews Ads Manager. Setting up Pixels and events in SmartNews &gt; Once your Pixel is ready, copy its base code on the Pixel setup screen. 2Add the base code to your Shopify theme Paste the base code in the &lt;head&gt; section of theme.liquid. If you use any third-party page creation extensions for Shopify, make sure the base code is also included in those extensions\u2019 [&hellip;]","protected":false},"author":4,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[206],"tags":[],"label":[],"class_list":["post-5730","post","type-post","status-publish","format-standard","hentry","category-tracking-en"],"acf":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/help-ads.smartnews.com\/en\/wp-json\/wp\/v2\/posts\/5730","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/help-ads.smartnews.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/help-ads.smartnews.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/help-ads.smartnews.com\/en\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/help-ads.smartnews.com\/en\/wp-json\/wp\/v2\/comments?post=5730"}],"version-history":[{"count":11,"href":"https:\/\/help-ads.smartnews.com\/en\/wp-json\/wp\/v2\/posts\/5730\/revisions"}],"predecessor-version":[{"id":5937,"href":"https:\/\/help-ads.smartnews.com\/en\/wp-json\/wp\/v2\/posts\/5730\/revisions\/5937"}],"wp:attachment":[{"href":"https:\/\/help-ads.smartnews.com\/en\/wp-json\/wp\/v2\/media?parent=5730"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/help-ads.smartnews.com\/en\/wp-json\/wp\/v2\/categories?post=5730"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/help-ads.smartnews.com\/en\/wp-json\/wp\/v2\/tags?post=5730"},{"taxonomy":"label","embeddable":true,"href":"https:\/\/help-ads.smartnews.com\/en\/wp-json\/wp\/v2\/label?post=5730"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}