Announcement

Collapse
No announcement yet.

Google Dynamic Remarketing

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

  • Google Dynamic Remarketing

    Hello
    I am trying to implement Goolge Dynamic Remarketing tags so I can better target our customers with ads relevant to them
    I am adding the following script to the footer of the View Cart page

    <script type="text/javascript">
    var google_tag_params = {
    ecomm_prodid: ['123', '456'],
    ecomm_pagetype: 'cart',
    ecomm_totalvalue: '120.00'
    };
    </script>

    2 questions
    How can I create a javascript array of the product ids for the ecomm_prodid variable? ie ['[id1]','[id2]']
    How can I get the cart total without a dollar sign in it? [CARTTOTAL] has a $

    Info on Google's tag requirements can be found here https://support.google.com/adwords/answer/3103357?hl=en

    Thanks

  • #2
    I can give you some help. Here is the jquery javascript code I use to take the subtotal field and remove everything but numbers and decimal point.

    HTML Code:
    var subtotal = parseFloat(("[CARTSUBTOTAL]".replace(/[^0-9-.]/g, '')));
    You should be able to use a standard javascript replace function with the regex sequence above.

    jeff
    Jeff

    The Wedding Printer

    Comment


    • #3
      Has anyone figured out the correct code to get this working properly?

      I'm using "ototal" for the ecomm_totalvalue, but not sure what to use for the other two tags.

      Golfbox: We added this code to the Footer of the entire site, any reason you are adding it to the View Cart page only?
      Last edited by SeeYaLater; 11-19-2013, 03:11 PM.

      Comment


      • #4
        You can use the variable [total_noformat]
        Chris
        TC Life Safety
        TC Wireless

        Comment


        • #5
          Google Adwords Dynamic Remarketing Script

          I think that you can just use id - not sure you need to include an array but I'm not a programmer.

          ecomm_prodid: "[id]",
          ecomm_pagetype: "product",
          ecomm_totalvalue: "[price]",

          @SeeYaLater - I used the values above and they worked for me. Keep in mind that the productid & totalvalue have to be in your merchant account & feed and apparently should be in brackets []. The pagetype has to be one of the values google defines, i.e.

          home,
          searchresults,
          category,
          product,
          cart,
          purchase,
          other

          Also, install Google's Tag Assistant in Chrome and you can verify that the tag (and all google tags) work. you can even put in your merchant ID and see that values are being pulled in correctly.

          Hope this helps.

          Also, if you haven't done this already - be sure and update your Analytics tag (if you're using google analytics) to the universal tag. you can create more detailed remarketing lists in analytics than you can with the Adwords tag, i.e. number of pages visited, time spent on site, etc.

          Comment


          • #6
            Has anyone had any success with the dynamic remarketing on the view cart page? We're having difficulty because according to tech support this page doesn't call on the "ID", but gets the information from the page before.

            Comment


            • #7
              In your product spreadsheet, mirror your value for price in price_10.
              Then in hide_10 place a 1.

              If you then use the template tag [price_10] it will display your price without the $.

              Comment

              Working...
              X