Announcement

Collapse
No announcement yet.

Criteo Retargetting - editing confirmation page

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Criteo Retargetting - editing confirmation page

    Hi and seasons greetings to you.

    We are going to do a trial with Criteo retargetting. I have implemented some of the tracking code required, but the final part involves tracking on the sale confirmation page. I know this page is a little complicated to amend. Basically I need to extract up to 3 product sales lines (Prod Ref, Qty and Price for each one). Here is what they actually ask for :

    The conversion tag must be installed on the sales confirmation page.

    You must populate the ID, Quantity, and Unit price for each purchased product. You must also populate a unique transaction identifier.

    Please insert this tag at the bottom of your pages, just before </body>.
    <script type="text/javascript" src="Loader URL" async="true"></script>
    <script type="text/javascript">var CRITEO_CONF = [[{
    pageType: 'confirmation',
    'Transaction ID': 'Transaction Id',
    'Product IDs': ['First item id', 'Second item id', 'Third item id'],

    'Prices': ['First item price', 'Second item price', 'Third item price'],

    'Quantities': ['First item quantity', 'Second item quantity', 'Third item quantity']

    }], [7793,'pmo','','010',[[7724367, 7724368]],
    {'Transaction ID':['t',0], 'Product IDs':['i',1], 'Prices':['p',1], 'Quantities':['q',1]}]];
    if (typeof (CRITEO) != "undefined") { CRITEO.Load(false); }
    </script>


    Could any advise how to place and populate this script in the confirmation page so it gives this data ?

    Any help appreciated.
    Jez
    Machinery Parts Specialist
    www.magic-parts.co.uk

    #2
    There's probably an hour or two's work involved in what you want so you're unlikely to find anyone who can answer in detail. Assuming you're willing to do it yourself, here are some tips as to how I'd go about it.

    Edit layout Product Line Row to put some unique identifiers into the row and price entries. E.g:
    Code:
    <tr>
       <td colspan="<Actinic:Variable Name="ProductColSpan"/>" class="cart">
    		<actinic:variable name="GoogleAnalyticsMarkup" value="Google Analytics Price" />
          <actinic:variable name="CartProductDetails" />
       </td>
    <actinic:block if="%3cactinic%3avariable%20name%3d%22IsPriceInCart%22%20%2f%3e">
       <td align="right" class="cart">
          <Actinic:Variable Name="Price"/>
       </td>
       <td align="right" class="cart">
          <Actinic:Variable Name="Cost"/>
       </td>
    </actinic:block>
    </tr>
    Becomes (new stuff in red):
    Code:
    <tr class="cr_row">
       <td colspan="<Actinic:Variable Name="ProductColSpan"/>" class="cart">
    		<actinic:variable name="GoogleAnalyticsMarkup" value="Google Analytics Price" />
          <actinic:variable name="CartProductDetails" />
       </td>
    <actinic:block if="%3cactinic%3avariable%20name%3d%22IsPriceInCart%22%20%2f%3e">
       <td align="right" class="cart cr_price">
          <Actinic:Variable Name="Price"/>
       </td>
       <td align="right" class="cart">
          <Actinic:Variable Name="Cost"/>
       </td>
    </actinic:block>
    </tr>
    And amend layout Cart Product Details from:
    Code:
    <actinic:block if="%3cactinic%3avariable%20name%3d%22IsProductReferenceVisible%22%20%2f%3e" >
       <td width="22%">
          <Actinic:Variable Name="ProdRef"/>
       </td>
    </actinic:block>
    
    <td width="64%">
    <Actinic:Variable Name="ProductNameOnline"/>
    <Actinic:REMOVE TAG="DuplicateLinks">
       <Actinic:Variable Name="DuplicateLinkCaption"/>
          <Actinic:XMLTEMPLATE NAME="DuplicateLinkLine">
             <br />
             <Actinic:Variable Name="DuplicateLink"/>
          </Actinic:XMLTEMPLATE>
    </Actinic:REMOVE>
    </td>
    
    <td width="14%" align="right">
      <Actinic:Variable Name="Quantity"/>
    </td>
    To:
    Code:
    <actinic:block if="%3cactinic%3avariable%20name%3d%22IsProductReferenceVisible%22%20%2f%3e" >
       <td class="cr_ref" width="22%">
          <Actinic:Variable Name="ProdRef"/>
       </td>
    </actinic:block>
    
    <td width="64%">
    <Actinic:Variable Name="ProductNameOnline"/>
    <Actinic:REMOVE TAG="DuplicateLinks">
       <Actinic:Variable Name="DuplicateLinkCaption"/>
          <Actinic:XMLTEMPLATE NAME="DuplicateLinkLine">
             <br />
             <Actinic:Variable Name="DuplicateLink"/>
          </Actinic:XMLTEMPLATE>
    </Actinic:REMOVE>
    </td>
    
    <td class="cr_qty" width="14%" align="right">
      <Actinic:Variable Name="Quantity"/>
    </td>
    Now use jQuery to loop through all tr with class cr_row. Within that loop pick out the contained cr_ref, cr_qty and cr_price items and extract their text. For the price field (as you also display prices in Euros, you'll have to select only the first price item) and remove anything other than 0-9 and . from the text as it may contain currency symbols, commas, etc. Assemble these into the relevant arrays and pass those arrays instead of the ['First item id', 'Second item id', 'Third item id'] stuff Criteo wants. You'll need to do something similar with layout Receipt Order Number to get the Transaction ID.
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    Comment


      #3
      Hi Norman - thanks for that. The use of jquery is not something I know anything about at all and would not even know where to start. Criteo say to implement this code should be "no problem" but I can't see it myself.
      Machinery Parts Specialist
      www.magic-parts.co.uk

      Comment


        #4
        I suspect the difficulty here is that SellerDeck doesn't have any standard variables to access the individual product data on the receipt page so Norman's suggestion is to use JQuery to process the content on the page and pick up the necessary data.

        An alternative, if you know any perl, would be to pick up the data in the script that generates the page and drop it into the page as it's generated.

        Both options need some serious coding effort so you might want to go back to criteo or consider hiring someone to write the code for you.

        Mike
        -----------------------------------------

        First Tackle - Fly Fishing and Game Angling

        -----------------------------------------

        Comment

        Working...
        X