News:

Support the VirtueMart project and become a member

Main Menu

How to find a "dynamic code for sale values" in Virtuemart 3.0.3?

Started by leunam4, March 20, 2015, 22:20:25 PM

Previous topic - Next topic

leunam4

Hi Guys,

I need place this pixel on the order confirmation page to follow-up on the conversion rate.

<!-- Facebook Conversion Code for __FBMail -->
<script>(function() {
  var _fbq = window._fbq || (window._fbq = []);
  if (!_fbq.loaded) {
    var fbds = document.createElement('script');
    fbds.async = true;
    fbds.src = '//connect.facebook.net/en_US/fbds.js';
    var s = document.getElementsByTagName('script')[0];
    s.parentNode.insertBefore(fbds, s);
    _fbq.loaded = true;
  }
})();
window._fbq = window._fbq || [];
window._fbq.push(['track', '6023963948685', {'value':'0.01','currency':'USD'}]);
</script>
<noscript><img height="1" width="1" alt="" style="display:none" src="https://www.facebook.com/tr?ev=6023963948685&amp;cd[value]=0.01&amp;cd[currency]=USD&amp;noscript=1" /></noscript>


QuoteIMPORTANT NOTE: This pixel will allow you to see exactly how much revenue each ad campaign has generated for you. In order to do this have the developers replace the 0.01 with the dynamic code for sale values  (If you left it as 0.01 each sale would register as one cent. With the dynamic code it will know Sale A was $X and Sale B was $Y.)

So my question is: how or where can I find that "dynamic code for sale values" in Virtuemart 3.0.3?


Thank you for your help!

M.


GJC Web Design

it would be replaced with a php echo of I assume the cart vale/order value?

something like

<!-- Facebook Conversion Code for __FBMail -->
<script>(function() {
  var _fbq = window._fbq || (window._fbq = []);
  if (!_fbq.loaded) {
    var fbds = document.createElement('script');
    fbds.async = true;
    fbds.src = '//connect.facebook.net/en_US/fbds.js';
    var s = document.getElementsByTagName('script')[0];
    s.parentNode.insertBefore(fbds, s);
    _fbq.loaded = true;
  }
})();
window._fbq = window._fbq || [];
window._fbq.push(['track', '6023963948685', {'value':'<?php echo $order_total?>','currency':'USD'}]);
</script>
<noscript><img height="1" width="1" alt="" style="display:none" src="https://www.facebook.com/tr?ev=6023963948685&amp;cd[value]=0.01&amp;cd[currency]=USD&amp;noscript=1" /></noscript>


but you need to find the var on what ever page your talking about
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation