Announcement

Collapse
No announcement yet.

Bing Goal Value Tracking Code

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

    Bing Goal Value Tracking Code

    I probably can figure out which token to use for price. But I am clueless as to what should go in the discount:


    Code:
    Example 1: Assigning variable values to a Goal Value or 'gv':
    
    Track and determine the amount (dynamically) for a purchase conversion.
    
    <script>
    
        function computeDiscount(discount, price) {
    
            return price - (discount / 100) * price;
    
        }
    
        var amount = computeDiscount(20, 100); // Compute the goal value
    
    </script>
    
    <script>
    
        var uetq = uetq || [];
    
        uetq.push({ 'gv': amount }); // Pass the computed goal value
    
    </script
    Leslie
    Leslie Kirk
    Miva Certified Developer
    Miva Merchant Specialist since 1997
    Previously of Webs Your Way
    (aka Leslie Nord leslienord)

    Email me: [email protected]
    www.lesliekirk.com

    Follow me: Twitter | Facebook | FourSquare | Pinterest | Flickr

    #2
    Re: Bing Goal Value Tracking Code

    Hi Leslie:

    i don't have an answer for you, but if you end up figuring it out on your own, would you mind terribly checking back in and posting the solution here for us?

    Thanks in advance.
    Mark Romero
    ~~~~~~~~

    Comment


      #3
      Re: Bing Goal Value Tracking Code

      Will do - I hope I get an answer soon...
      Leslie Kirk
      Miva Certified Developer
      Miva Merchant Specialist since 1997
      Previously of Webs Your Way
      (aka Leslie Nord leslienord)

      Email me: [email protected]
      www.lesliekirk.com

      Follow me: Twitter | Facebook | FourSquare | Pinterest | Flickr

      Comment


        #4
        Re: Bing Goal Value Tracking Code

        That example is assuming a percentage discount value, ie. 10 for 10%. So you would either need to pass the percentage discount value, or alter the function to better match the discount methods in use for the specific goal.

        Comment


          #5
          Re: Bing Goal Value Tracking Code

          So if there is no discount?
          Leslie Kirk
          Miva Certified Developer
          Miva Merchant Specialist since 1997
          Previously of Webs Your Way
          (aka Leslie Nord leslienord)

          Email me: [email protected]
          www.lesliekirk.com

          Follow me: Twitter | Facebook | FourSquare | Pinterest | Flickr

          Comment


            #6
            Re: Bing Goal Value Tracking Code

            So if there is no discount?
            The math comes out to zero if the discount value is zero. I would personally alter the tracking snippet to better fit the specific needs of the given store. You could easily kill the discount function and simply pass the order subtotal if that is the end goal.

            Comment

            Working...
            X