注意!您在尚未提供 Shopify Pinterest 應用程式的國家/地區閱覽本文。 瞭解詳情

使用 Shopify 版 Pinterest 應用程式,將您的 Shopify 商店連結到您的 Pinterest 企業帳號。

Shopify 商店一次只能與一個 Pinterest 企業帳號連結。如果您有兩家 Shopify 商店,請與我們聯絡

如果您已手動將 Pinterest 標籤新增至 Shopify,或已使用其他第三方新增這項標籤,就必須先移除標籤 ,才能使用 Shopify 版 Pinterest 應用程式。

好處
  • 我們會在 Pinterest 上聲明您的網站擁有權
  • 將安裝 Pinterest 標籤和轉換率 API
  • 您的 Shopify 產品動態將連結至 Pinterest
  • 將從您的 Shopify 產品動態產生產品 Pin
  • 您在 Pinterest 上啟用第一個廣告宣傳活動時,即可獲得 100 美元的廣告點數
  • 開始使用之前

    將您的 Shopify 商店連結到您的 Pinterest 帳號前,您需要:

  • 取得 Pinterest 企業帳號
  • 建立廣告客戶帳號
  • 理想情況下,您應使用桌面上的 Chrome 瀏覽器,將 Shopify 商店連線至您的 Pinterest 帳號。

     

    透過 Shopify 版 Pinterest 應用程式連結帳號
  • 登入您的 Shopify 帳號
  • Shopify 應用程式商店中,前往 Shopify 版 Pinterest 應用程式的頁面
  • 檢視權限,如果同意就按一下「新增應用程式」
  • 按照畫面上的說明操作,安裝 Shopify 版 Pinterest 應用程式
  • 雖然可以手動將 Pinterest 標籤新增至 Shopify,但我們不建議使用。在可能的情況下,請按照上述步驟將您的商店與 Shopify 版 Pinterest 應用程式連結,以便自動新增標籤。

    新增基本代碼

    基本代碼可讓您取得有關事件的資料,例如有人購買產品或將產品加入購物籃。您網站上的所有頁面均須安裝基本代碼。

    1. 在您的 Shopify 管理員中,按一下「線上商店」,然後按一下「佈景主題」。​
    2. 瀏覽至想要編輯的佈景主題,按一下「動作」,然後按一下「編輯程式碼」
    3. 按一下「theme.liquid」
    4. 捲動畫面直到看到 </head>,然後將以下程式碼貼至其上方:
      <script type="text/javascript">
      !function(e){if(!window.pintrk){window.pintrk=function()
      {window.pintrk.queue.push(Array.prototype.slice.call(arguments))};var
      n=window.pintrk;n.queue=[],n.version="3.0";var
      t=document.createElement("script");t.async=!0,t.src=e;var
      r=document.getElementsByTagName("script")[0];r.parentNode.insertBefore(t,r)}}
      ("https://s.pinimg.com/ct/core.js"); 
      
      pintrk('load','YOUR_TAG_ID', { em: '{{ customer.email }}', });
      pintrk('page');
      </script> 
      <noscript> 
      <img height="1" width="1" style="display:none;" alt=""
      src="https://ct.pinterest.com/v3/?tid=YOUR_TAG_ID&noscript=1"/> 
      </noscript>
      
    5. 使用您的專屬標籤 ID 取代 YOUR_TAG_ID。要查找專屬標籤 ID,請前往 Pinterest 上的「廣告管理員」
    6. 導覽至您的轉換率追蹤概覽,然後找到詳細資料區段。
    7. 複製「標籤 ID」下的 13 碼數字,然後將該數字貼到程式碼,取代其中的 YOUR_TAG_ID

    新增 Checkout 事件

    安裝基本代碼後,您可以新增其他事件以收集其他資料。您可以新增 Checkout 事件,追蹤使用者購買產品和完成交易的時機。

    1. 在您的 Shopify 管理員中,按一下「設定」,然後按一下「結帳」
    2. 將以下追蹤程式碼貼到「訂單狀態頁面指令碼」下的文字方塊。如果此方格內已有代碼,請將您的追蹤代碼貼在其後:
      {% if first_time_accessed %}
      <script type="text/javascript">
      !function(e){if(!window.pintrk){window.pintrk=function()
      {window.pintrk.queue.push(Array.prototype.slice.call(arguments))};var
      n=window.pintrk;n.queue=[],n.version="3.0";var
      t=document.createElement("script");t.async=!0,t.src=e;var
      r=document.getElementsByTagName("script")[0];r.parentNode.insertBefore(t,r)}}
      ("https://s.pinimg.com/ct/core.js");
      
      pintrk('load','YOUR_TAG_ID', { em: '{{ customer.email }}', }); 
      pintrk('page'); 
      </script> 
      <noscript> 
      <img height="1" width="1" style="display:none;" alt=""
      src="https://ct.pinterest.com/v3/?tid=YOUR_TAG_ID&noscript=1"/> 
      </noscript>
      
      <script>
      pintrk('track', 'checkout',{
      value: {{ total_price }} / 100,
      currency: '{{ currency }}',
      order_quantity: 2,
      event_id: '{{ event_id }}',
      line_items: [
           {
             product_name: '{{ product_name_1 }}',
             product_id: '{{ product_id_1 }}',
             product_price: {{ product_price_1 }},
             product_quantity: 1
           },
           {
             product_name: '{{ product_name_2 }}',
             product_id: '{{ product_id_2 }}',
             product_price: {{ product_price_2 }},
             product_quantity: 1
           },
         ],
      order_id: {{ checkout.order_id}}
      });
      </script>
      <noscript>
      <img height="1" width="1" style="display:none;" alt=""
      src="https://ct.pinterest.com/v3/?tid=YOUR_TAG_ID&event=checkout&noscript=1"/>
      </noscript>
      {% endif %}
    3. 使用您的專屬標籤 ID 取代 YOUR_TAG_ID。要查找專屬標籤 ID,請前往 Pinterest 上的「廣告管理員」

    新增 AddToCart 事件 (選擇性)

    安裝基本代碼後,您可以選擇性新增其他事件以收集其他資料。您可以新增 AddToCart 事件,追蹤使用者將產品加入購物車的時機。

    注意:使用部分 Shopify 佈景主題和小工具會無法新增 AddToCart 事件。

    1. 在您的 Shopify 管理員中,按一下「線上商店」,然後按一下「佈景主題」
    2. 在目前使用的主題中,按一下「動作」「編輯代碼」
    3. 「範本」下方,找出名稱為 product.liquid-template.liquid,或 product-form.liquid 的程式碼檔案,並開啟該檔案。這個步驟會依您安裝的佈景主題而有所不同,但加入購物車按鈕的程式碼最常見於 products.liquid 或類似的檔案。
    4. 在該程式碼檔案中搜尋 addtocart
    5. 將以下程式碼置於 <button><input> 元素的結尾插入點中:
      onclick="pintrk('track', 'addtocart');"
    6. 按一下右上角的「儲存」。

    如果您已經手動安裝 Pinterest 標籤,現在想改用 Shopify 版 Pinterest 應用程式,則應先移除手動安裝的標籤。務必移除基本代碼、Checkout 程式碼和 AddToCart 程式碼。

    移除基本代碼

    1. 在您的 Shopify 管理區中,按一下 「網路商店」,然後按一下「主題」
    2. 瀏覽至想要編輯的佈景主題,按一下「動作」,然後按一下「編輯程式碼」
    3. 按一下「theme.liquid」
    4. 捲動畫面直到看到 </head>,然後找到以下程式碼:
      <script type="text/javascript">
      !function(e){if(!window.pintrk){window.pintrk=function()
      {window.pintrk.queue.push(Array.prototype.slice.call(arguments))};var
      n=window.pintrk;n.queue=[],n.version="3.0";var
      t=document.createElement("script");t.async=!0,t.src=e;var
      r=document.getElementsByTagName("script")[0];r.parentNode.insertBefore(t,r)}}
      ("https://s.pinimg.com/ct/core.js"); 
      
      pintrk('load','YOUR_TAG_ID', { em: '{{ customer.email }}', });
      pintrk('page');
      </script> 
      <noscript> 
      <img height="1" width="1" style="display:none;" alt=""
      src="https://ct.pinterest.com/v3/?tid=YOUR_TAG_ID&noscript=1"/> 
      </noscript>

    移除 Checkout 程式碼

    1. 在您的 Shopify 管理員中,按一下「設定」,然後按一下「結帳」
    2. 「訂單狀態頁面指令碼」部分,找出位於文字方塊的下列追蹤程式碼。如果此方塊中有其他程式碼,務必僅移除以下這段程式碼:
      {% if first_time_accessed %}
      <script type="text/javascript">
      !function(e){if(!window.pintrk){window.pintrk=function()
      {window.pintrk.queue.push(Array.prototype.slice.call(arguments))};var
      n=window.pintrk;n.queue=[],n.version="3.0";var
      t=document.createElement("script");t.async=!0,t.src=e;var
      r=document.getElementsByTagName("script")[0];r.parentNode.insertBefore(t,r)}}
      ("https://s.pinimg.com/ct/core.js");
      
      pintrk('load','YOUR_TAG_ID', { em: '{{ customer.email }}', }); 
      pintrk('page'); 
      </script> 
      <noscript> 
      <img height="1" width="1" style="display:none;" alt=""
      src="https://ct.pinterest.com/v3/?tid=YOUR_TAG_ID&noscript=1"/> 
      </noscript>
      
      <script>
      pintrk('track', 'checkout',{
      value: {{ total_price | money_without_currency }}, 
      currency: '{{ currency }}',
      order_quantity: 1,
      order_id: {{ checkout.id }}
      });
      </script>
      <noscript>
      <img height="1" width="1" style="display:none;" alt=""
      src="https://ct.pinterest.com/v3/?tid=YOUR_TAG_ID&event=checkout&noscript=1"/>
      </noscript>
      {% endif %}
      

    移除 AddToCart 程式碼

    1. 在您的 Shopify 管理員中,按一下「線上商店」,然後按一下「佈景主題」​。
    2. 在目前使用的佈景主題中,依序按一下「動作」「編輯程式碼」
    3. 「範本」下,找到名為 product.liquidproduct-template.liquidproduct-form.liquid 的程式碼檔案,並開啟該檔案。這會依您安裝的佈景主題而有不同,但加入購物車按鈕的程式碼最常見於 products.liquid 或類似的檔案。
    4. 在該檔案中搜尋 addtocart
    5. 找到並移除以下程式碼。應在 <button<button> 的結尾插入點>或<input> 元素:
      onclick="pintrk('track', 'addtocart');"
      
    6. 按一下右上角的「儲存」。
    End of Other articles Links
    User feedback
    這篇文章是否對您有幫助?

    collection_fields

    我們能如何改善此文章?