Sign in

Welcome to our Support Center

Get help with integration and live campaigns

Welcome to our Support Center. Get help with integration and live campaigns

BigCommerce Tags and Feed Integration Guide

 

Overview

Follow this guide to generate a product feed, and how to install the Criteo tags on your BigCommerce site.

How to generate a product feed

You can generate a Google Shopping feed by following these instructions.

How to install the Criteo OneTag

The tags are mostly copy+paste ready, but you may need to modify some depending on your site’s customization. Follow these five simple steps to install the Crtieo OneTag:

  1. Click Storefront Design in the left panel
    image37.png
  2. Click Themes
    image36.png
  3. Click More, and then Template Files
    image40.png
  4. Now you can find and edit each template. Simply add the relevant Criteo OneTag at the end of the template. For example, the default.html is for the homepage
    image38.png
  5. Copy+paste each of the following tags into the corresponding templates.
    Homepage Template > default.html
    <script type="text/javascript" src="//static.criteo.net/js/ld/ld.js" async="true"></script>
    <script type="text/javascript">
    window.criteo_q = window.criteo_q || [];
    window.criteo_q.push(
            { event: "setAccount", account: YOUR UNIQUE ACCOUNT ID },
            { event: "setSiteType", type: "m FOR MOBILE OR t FOR TABLET OR d FOR DESKTOP" },
          { event: "setEmail", email: "TRIMMED AND LOWERCASE USER EMAIL ADDRESS" },        
    { event: "viewHome"}
    );
    </script>

    Listing Template > category.html
    <script type="text/javascript" src="//static.criteo.net/js/ld/ld.js" async="true"></script>
    <script type="text/javascript">
    window.criteo_q = window.criteo_q || [];
    window.criteo_q.push(
    { event: "setAccount", account: YOUR UNIQUE ACCOUNT ID },
    { event: "setSiteType", type: "m FOR MOBILE OR t FOR TABLET OR d FOR DESKTOP" },
    { event: "setEmail", email: "TRIMMED AND LOWERCASE USER EMAIL ADDRESS" },
    { event: "viewList", item: ["FIRST PRODUCT ID", "SECOND PRODUCT ID", "THIRD PRODUCT ID"] }
    );
    </script>

    Product Template > product.html
    <script type="text/javascript" src="//static.criteo.net/js/ld/ld.js" async="true"></script> 
    <script type="text/javascript">
    window.criteo_q = window.criteo_q || [];
    window.criteo_q.push(
    { event: "setAccount", account: YOUR UNIQUE ACCOUNT ID },
       { event: "setSiteType", type: "m FOR MOBILE OR t FOR TABLET OR d FOR DESKTOP" },
        { event: "setEmail", email: "TRIMMED AND LOWERCASE USER EMAIL ADDRESS" },        
    { event: "viewItem", item: "YOUR PRODUCT ID" }
    );
    </script>

    Basket Template > cart.html
    <script type="text/javascript" src="//static.criteo.net/js/ld/ld.js" async="true"></script>
    <script type="text/javascript">
    window.criteo_q = window.criteo_q || [];
    window.criteo_q.push(
    { event: "setAccount", account: YOUR UNIQUE ACCOUNT ID },
    { event: "setSiteType", type: "m FOR MOBILE OR t FOR TABLET OR d FOR DESKTOP" },
    { event: "setEmail", email: "TRIMMED AND LOWERCASE USER EMAIL ADDRESS" },
    { event: "viewBasket", item: [
    { id: "FIRST PRODUCT ID", price: FIRST PRODUCT UNIT PRICE, quantity: FIRST PRODUCT QUANTITY },
    { id: "SECOND PRODUCT ID", price: SECOND PRODUCT UNIT PRICE, quantity: SECOND PRODUCT QUANTITY }
    /* add a line for each product in the user's basket */
    ]});
    </script>
    How to implement the Sales Tag
  1. Go to Advanced Settings > Web Analytics > Enable Google Analytics. Then click Save
    image39.png
  2. Go to Google Analytics tab
    If you use Google Analytics, click the link and then copy+paste the source code. Just remember to update the code with your own Google Analytic ID and domain.
  3. Click for Sale Tag (with GA)
    image41.png

  4. Don't use Google Analytics? Copy+paste the alternative source code.
<script type="text/javascript" src="//static.criteo.net/js/ld/ld.js" async="true"></script> 
<script type="text/javascript">
window.criteo_q = window.criteo_q || [];
window.criteo_q.push(        
{ event: "setAccount", account: YOUR UNIQUE ACCOUNT ID },        
{ event: "setSiteType", type: "m FOR MOBILE OR t FOR TABLET OR d FOR DESKTOP" },    
{ event: "setEmail", email: "TRIMMED AND LOWERCASE USER EMAIL ADDRESS" },        
{ event: "trackTransaction", id: "TRANSACTION ID", item: [
{ id: "FIRST PRODUCT ID",  price: FIRST PRODUCT UNIT PRICE,  quantity: FIRST PRODUCT QUANTITY },                                                                                  
{ id: "SECOND PRODUCT ID", price: SECOND PRODUCT UNIT PRICE, quantity: SECOND PRODUCT QUANTITY }                                                                     
/* add a line for each product in the user's basket */
]});
</script>

How do I test the tags?

Support Center

Find more resources to help you with your integration in our Support Center. Alternatively, contact your Technical Solutions Engineer at Criteo.

Was this article helpful?
0 out of 0 found this helpful
Powered by Zendesk