Facebook Pixel Dynamic Value based on Selected Menu

Home Forums Quform WordPress Facebook Pixel Dynamic Value based on Selected Menu

This topic is: not resolved
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #31593
    AudiojungleDaniel
    Participant

    Hi, thank you for a great Form! I just love Quform for WordPress!
    With no code-skills Im trying to ad a correct value in my Facebook Pixel.

    I used the JavaScript below in the in the Custom JavaScript Section and it works great!

    But I need to set up a Dynamic Value based on the Amount that is selected in the dropdown menu in the form. The Dropdown has a Unique Identifier. In this case it is: 27_26.

    Can you help me with a fill out the the script correctly for a Dynamic Value based on the selected value in the unique dropdown menu. 
    For example, If a visitor fill out the form and selects the value 3 in the dropdown and Submit I like to see the value 3×79 in my Facebook ads purchase value. 
    Possible?

    jQuery(function ($) {
        $(‘.quform-form-27’).on(‘quform:successStart’, function () {
            if (window.fbq) {
                fbq(‘track’, ‘Purchase’, {value: 79.00, currency: ‘SEK’});
            }
        });
    });

    Attachments:
    You must be logged in to view attached files.
    #31599
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

    #31600
    AudiojungleDaniel
    Participant

    Hi Ally, looks good but it didn’t work. It still shows up a value of 79 in my Facebook Pixel Helper no matter what I select in the dropdown.

    Should I add something else or was it meant to just copy paste it in to the Custom JavaScript Section?

    I was hoping for if I select 3 bottles in the dropdown it would end up as 3×79=237 SEK

    Check for your self here:

    Barone Montalto Pinot Grigio Brut

    Attachments:
    You must be logged in to view attached files.
    #31605
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.
Be inspired. © 2020 ThemeCatcher Ltd. 20-22 Wenlock Road, London, England, N1 7GU | Company No. 08120384 | Built with React | Privacy Policy