Facebook conversion pixel with valuesInstall Facebook Pixel TrackingaddAttributeToFilter with mutiselect...
Why has Russell's definition of numbers using equivalence classes been finally abandoned? ( If it has actually been abandoned).
Why don't electron-positron collisions release infinite energy?
Why is the design of haulage companies so “special”?
Can you lasso down a wizard who is using the Levitate spell?
N.B. ligature in Latex
How can I fix this gap between bookcases I made?
Do airline pilots ever risk not hearing communication directed to them specifically, from traffic controllers?
How do we improve the relationship with a client software team that performs poorly and is becoming less collaborative?
Why is an old chain unsafe?
If Manufacturer spice model and Datasheet give different values which should I use?
Why do we use polarized capacitor?
What is the meaning of "of trouble" in the following sentence?
Why CLRS example on residual networks does not follows its formula?
How old can references or sources in a thesis be?
Can I interfere when another PC is about to be attacked?
Can an x86 CPU running in real mode be considered to be basically an 8086 CPU?
Can a German sentence have two subjects?
Why is this code 6.5x slower with optimizations enabled?
how to create a data type and make it available in all Databases?
Copycat chess is back
What is the logic behind how bash tests for true/false?
The use of multiple foreign keys on same column in SQL Server
A Journey Through Space and Time
Email Account under attack (really) - anything I can do?
Facebook conversion pixel with values
Install Facebook Pixel TrackingaddAttributeToFilter with mutiselect valuesAdding New Facebook pixel to <head>How to add new facebook tracking pixel to magento site?Facebook Pixel addToCart AjaxHow to setup magento facebook login with facebook app create and configure step by step?Magento facebook pixelNotice: Array to string conversion when calling soapV2 with complexfilterHow many Facebook Pixel Code can you have in Magento?Login with Facebook Not working Magento 1.9
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}
I can only find some suggestions for the 'old' pixel to get the correct values for amount and currency. How do I magento-fy this new version?
<!-- Facebook Conversion Code -->
<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', 'ID', {'value':'0.01','currency':'EUR'}]);
</script>
<noscript><img height="1" width="1" alt="" style="display:none" src="https://www.facebook.com/tr?ev=ID&cd[value]=0.01&cd[currency]=EUR&noscript=1" /></noscript>
And should I really place it in head, not succes.phtml?
magento-1.9
bumped to the homepage by Community♦ 17 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
I can only find some suggestions for the 'old' pixel to get the correct values for amount and currency. How do I magento-fy this new version?
<!-- Facebook Conversion Code -->
<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', 'ID', {'value':'0.01','currency':'EUR'}]);
</script>
<noscript><img height="1" width="1" alt="" style="display:none" src="https://www.facebook.com/tr?ev=ID&cd[value]=0.01&cd[currency]=EUR&noscript=1" /></noscript>
And should I really place it in head, not succes.phtml?
magento-1.9
bumped to the homepage by Community♦ 17 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
I can only find some suggestions for the 'old' pixel to get the correct values for amount and currency. How do I magento-fy this new version?
<!-- Facebook Conversion Code -->
<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', 'ID', {'value':'0.01','currency':'EUR'}]);
</script>
<noscript><img height="1" width="1" alt="" style="display:none" src="https://www.facebook.com/tr?ev=ID&cd[value]=0.01&cd[currency]=EUR&noscript=1" /></noscript>
And should I really place it in head, not succes.phtml?
magento-1.9
I can only find some suggestions for the 'old' pixel to get the correct values for amount and currency. How do I magento-fy this new version?
<!-- Facebook Conversion Code -->
<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', 'ID', {'value':'0.01','currency':'EUR'}]);
</script>
<noscript><img height="1" width="1" alt="" style="display:none" src="https://www.facebook.com/tr?ev=ID&cd[value]=0.01&cd[currency]=EUR&noscript=1" /></noscript>
And should I really place it in head, not succes.phtml?
magento-1.9
magento-1.9
asked Sep 23 '15 at 10:57
user2806026user2806026
204418
204418
bumped to the homepage by Community♦ 17 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ 17 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
I don't see any problem with putting this script in success.phtml to track conversion data for facebook.
If you want to get the order value use something like
$lastOrderId = Mage::getSingleton('checkout/session')->getLastOrderId();
$order = Mage::getSingleton('sales/order');
$order->load($lastOrderId);
$_totalData =$order->getData();
$_conversion_value = number_format($_totalData['grand_total'],2);
and then in the fb script
window._fbq.push(['track', 'ID', {'value':'<?php echo $_conversion_value ?>','currency':'EUR'}]);
<noscript><img height="1" width="1" alt="" style="display:none" src="https://www.facebook.com/tr?ev=ID&cd[value]=<?php echo $_conversion_value ?>&cd[currency]=EUR&noscript=1" /></noscript>
Thanks. Shouldn't it be added in the<noscript><img height="1" width="1" alt="" style="display:none" src="https://www.facebook.com/tr?ev=ID&cd[value]=0.01&cd[currency]=EUR&noscript=1" /></noscript>
also?
– user2806026
Sep 23 '15 at 11:29
yes you should add the value there too, if required you could extract the currency code from Magento as well if your shop has multiple currencies
– paj
Sep 23 '15 at 11:42
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "479"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f84014%2ffacebook-conversion-pixel-with-values%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
I don't see any problem with putting this script in success.phtml to track conversion data for facebook.
If you want to get the order value use something like
$lastOrderId = Mage::getSingleton('checkout/session')->getLastOrderId();
$order = Mage::getSingleton('sales/order');
$order->load($lastOrderId);
$_totalData =$order->getData();
$_conversion_value = number_format($_totalData['grand_total'],2);
and then in the fb script
window._fbq.push(['track', 'ID', {'value':'<?php echo $_conversion_value ?>','currency':'EUR'}]);
<noscript><img height="1" width="1" alt="" style="display:none" src="https://www.facebook.com/tr?ev=ID&cd[value]=<?php echo $_conversion_value ?>&cd[currency]=EUR&noscript=1" /></noscript>
Thanks. Shouldn't it be added in the<noscript><img height="1" width="1" alt="" style="display:none" src="https://www.facebook.com/tr?ev=ID&cd[value]=0.01&cd[currency]=EUR&noscript=1" /></noscript>
also?
– user2806026
Sep 23 '15 at 11:29
yes you should add the value there too, if required you could extract the currency code from Magento as well if your shop has multiple currencies
– paj
Sep 23 '15 at 11:42
add a comment |
I don't see any problem with putting this script in success.phtml to track conversion data for facebook.
If you want to get the order value use something like
$lastOrderId = Mage::getSingleton('checkout/session')->getLastOrderId();
$order = Mage::getSingleton('sales/order');
$order->load($lastOrderId);
$_totalData =$order->getData();
$_conversion_value = number_format($_totalData['grand_total'],2);
and then in the fb script
window._fbq.push(['track', 'ID', {'value':'<?php echo $_conversion_value ?>','currency':'EUR'}]);
<noscript><img height="1" width="1" alt="" style="display:none" src="https://www.facebook.com/tr?ev=ID&cd[value]=<?php echo $_conversion_value ?>&cd[currency]=EUR&noscript=1" /></noscript>
Thanks. Shouldn't it be added in the<noscript><img height="1" width="1" alt="" style="display:none" src="https://www.facebook.com/tr?ev=ID&cd[value]=0.01&cd[currency]=EUR&noscript=1" /></noscript>
also?
– user2806026
Sep 23 '15 at 11:29
yes you should add the value there too, if required you could extract the currency code from Magento as well if your shop has multiple currencies
– paj
Sep 23 '15 at 11:42
add a comment |
I don't see any problem with putting this script in success.phtml to track conversion data for facebook.
If you want to get the order value use something like
$lastOrderId = Mage::getSingleton('checkout/session')->getLastOrderId();
$order = Mage::getSingleton('sales/order');
$order->load($lastOrderId);
$_totalData =$order->getData();
$_conversion_value = number_format($_totalData['grand_total'],2);
and then in the fb script
window._fbq.push(['track', 'ID', {'value':'<?php echo $_conversion_value ?>','currency':'EUR'}]);
<noscript><img height="1" width="1" alt="" style="display:none" src="https://www.facebook.com/tr?ev=ID&cd[value]=<?php echo $_conversion_value ?>&cd[currency]=EUR&noscript=1" /></noscript>
I don't see any problem with putting this script in success.phtml to track conversion data for facebook.
If you want to get the order value use something like
$lastOrderId = Mage::getSingleton('checkout/session')->getLastOrderId();
$order = Mage::getSingleton('sales/order');
$order->load($lastOrderId);
$_totalData =$order->getData();
$_conversion_value = number_format($_totalData['grand_total'],2);
and then in the fb script
window._fbq.push(['track', 'ID', {'value':'<?php echo $_conversion_value ?>','currency':'EUR'}]);
<noscript><img height="1" width="1" alt="" style="display:none" src="https://www.facebook.com/tr?ev=ID&cd[value]=<?php echo $_conversion_value ?>&cd[currency]=EUR&noscript=1" /></noscript>
edited Sep 23 '15 at 11:40
answered Sep 23 '15 at 11:26
pajpaj
2,62521026
2,62521026
Thanks. Shouldn't it be added in the<noscript><img height="1" width="1" alt="" style="display:none" src="https://www.facebook.com/tr?ev=ID&cd[value]=0.01&cd[currency]=EUR&noscript=1" /></noscript>
also?
– user2806026
Sep 23 '15 at 11:29
yes you should add the value there too, if required you could extract the currency code from Magento as well if your shop has multiple currencies
– paj
Sep 23 '15 at 11:42
add a comment |
Thanks. Shouldn't it be added in the<noscript><img height="1" width="1" alt="" style="display:none" src="https://www.facebook.com/tr?ev=ID&cd[value]=0.01&cd[currency]=EUR&noscript=1" /></noscript>
also?
– user2806026
Sep 23 '15 at 11:29
yes you should add the value there too, if required you could extract the currency code from Magento as well if your shop has multiple currencies
– paj
Sep 23 '15 at 11:42
Thanks. Shouldn't it be added in the
<noscript><img height="1" width="1" alt="" style="display:none" src="https://www.facebook.com/tr?ev=ID&cd[value]=0.01&cd[currency]=EUR&noscript=1" /></noscript>
also?– user2806026
Sep 23 '15 at 11:29
Thanks. Shouldn't it be added in the
<noscript><img height="1" width="1" alt="" style="display:none" src="https://www.facebook.com/tr?ev=ID&cd[value]=0.01&cd[currency]=EUR&noscript=1" /></noscript>
also?– user2806026
Sep 23 '15 at 11:29
yes you should add the value there too, if required you could extract the currency code from Magento as well if your shop has multiple currencies
– paj
Sep 23 '15 at 11:42
yes you should add the value there too, if required you could extract the currency code from Magento as well if your shop has multiple currencies
– paj
Sep 23 '15 at 11:42
add a comment |
Thanks for contributing an answer to Magento Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f84014%2ffacebook-conversion-pixel-with-values%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown