Home › Forums › Quform WordPress › Facebook Pixel Dynamic Value based on Selected Menu › Reply To: Facebook Pixel Dynamic Value based on Selected Menu
Hi, and thanks for your help the problem with the Facebook pixel and the Dynamic Value based on the Amount that is selected in the dropdown menu in the form.
Im trying to get the same result on my new site with this landing-page with no luck.
Same problem here as above. The price for the bottle is 369 Kr. And if I add 2 bottles it should end up with
369 Kr x 2. But it ends up with only as one bottle. I use the code below in the java Scrips field.
The Dropdown has a Unique Identifier. In this case it is: 18_38.
jQuery(function ($) {
$(‘.quform-form-18’).on(‘quform:successStart’, function () {
if (window.fbq) {
var value = 369.00,
selectValue = $(‘.quform-field-18_38’).val();
if(selectValue && $.isNumeric(selectValue)) {
value = value * parseInt(selectValue, 10);
}
fbq(‘track’, ‘Purchase’, {value: value, currency: ‘SEK’});
}
});
});