- Posts: 164
 - Thank you received: 5
 
Facebook and Google advertising conversions
- Andrea Baldoni
 - Topic Author
 - Offline
 - Elite Member
 - 
            
         
        Less
        More
        
            
    
        
            
        
                11 years 4 months ago                #46828
        by Andrea Baldoni
    
    
            
            
            
            
            
                                
    
                                                
    
        Facebook and Google advertising conversions was created by Andrea Baldoni            
    
        hi, as you know, for facebook and google is possible set a campaign payment not just for click or views but also for conversions. for facebook conversion (pixel code) i have to add a script code in the head of the page to check for convesion. please could you tell me how to add this code in the checkout page or in complete order page?
for google it's more easy because the code goes in the body
tx
    for google it's more easy because the code goes in the body
tx
Please Log in or Create an account to join the conversation.
- Andrea Baldoni
 - Topic Author
 - Offline
 - Elite Member
 - 
            
         
        Less
        More
        
            
    
        - Posts: 164
 - Thank you received: 5
 
            
        
                11 years 4 months ago                #46885
        by Andrea Baldoni
    
    
            
            
            
            
            
                                
    
                                                
    
        Replied by Andrea Baldoni on topic Facebook and Google advertising conversions            
    
        hi, using free module flexy custom code you can add your php code in a specific menu item, so if you add this code
<?php
$document = JFactory::getDocument();
$document->addScript('campagna_facebook.js');
?>
in checkout item menu you will have the file js link
this not works for facebook, facebook needs the code in the head not the link to js file. hot to add script code? tx
    <?php
$document = JFactory::getDocument();
$document->addScript('campagna_facebook.js');
?>
in checkout item menu you will have the file js link
this not works for facebook, facebook needs the code in the head not the link to js file. hot to add script code? tx
Please Log in or Create an account to join the conversation.
- Andrea Baldoni
 - Topic Author
 - Offline
 - Elite Member
 - 
            
         
        Less
        More
        
            
    
        - Posts: 164
 - Thank you received: 5
 
            
        
                11 years 4 months ago                #46887
        by Andrea Baldoni
    
    
    
            
            
            
            
                                
    
                                                
    
        Replied by Andrea Baldoni on topic Facebook and Google advertising conversions            
    
        hi, waiting a best solution i solved adding code in template index head and a php condition about link, here you have the code
<?php
$checkoutpage = "/completa-ordine";
$currentpage = $_SERVER;
if($checkoutpage==$currentpage) {
echo '
<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", "0000000000", {"value":"0.01","currency":"USD"}]);
</script>
<noscript><img height="1" width="1" alt="" style="display:none" src=" www.facebook.com/tr?ev=0000000000&cd [value]=0.01&cd[currency]=USD&noscript=1" /></noscript>
';
}
?>
to work it's important to change facebook code script, using " and not '
sorry if it's banal but i'm not a developer
    <?php
$checkoutpage = "/completa-ordine";
$currentpage = $_SERVER;
if($checkoutpage==$currentpage) {
echo '
<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", "0000000000", {"value":"0.01","currency":"USD"}]);
</script>
<noscript><img height="1" width="1" alt="" style="display:none" src=" www.facebook.com/tr?ev=0000000000&cd [value]=0.01&cd[currency]=USD&noscript=1" /></noscript>
';
}
?>
to work it's important to change facebook code script, using " and not '
sorry if it's banal but i'm not a developer
        The following user(s) said Thank You: Giang Dinh Truong     
            Please Log in or Create an account to join the conversation.
- Giang Dinh Truong
 - 
            
				
                                 - Away
 - Administrator
 - 
            
         
            
        
                11 years 3 months ago                #46995
        by Giang Dinh Truong
    
    
            
            
            
            
            
                                
    
                                                
    
        Replied by Giang Dinh Truong on topic Facebook and Google advertising conversions            
    
        Hello Andrea,
I think the your solution is the only way to have this work. Seem this is the only way in Joomla to add a custome script code into the <head> tag.
In the future, I will find a correct solution to allow customers to add their own javascript code into the checkout page.
Thank you for posting your solution here.
Sincerely, Giang
    I think the your solution is the only way to have this work. Seem this is the only way in Joomla to add a custome script code into the <head> tag.
In the future, I will find a correct solution to allow customers to add their own javascript code into the checkout page.
Thank you for posting your solution here.
Sincerely, Giang
Please Log in or Create an account to join the conversation.
- Ric Raftis
 - 
            
				
                                 - Offline
 - Junior Member
 - 
            
         
            
        
                8 years 3 months ago                #101061
        by Ric Raftis
    
    
            
            
            
            
            
                                
    
                                                
    
        Replied by Ric Raftis on topic Facebook and Google advertising conversions            
    
        Hi Giang,
Have a client, (with whom you are no doubt familiar right now), who is looking to do this. Found this post via Googling for Facebook Pixel insertion in Joomla. As it is some three years old, is there an update on methodology for this?
Cheers,
Ric
    Have a client, (with whom you are no doubt familiar right now), who is looking to do this. Found this post via Googling for Facebook Pixel insertion in Joomla. As it is some three years old, is there an update on methodology for this?
Cheers,
Ric
Please Log in or Create an account to join the conversation.
- Giang Dinh Truong
 - 
            
				
                                 - Away
 - Administrator
 - 
            
         
            
        
                8 years 3 months ago                #101670
        by Giang Dinh Truong
    
    
            
            
            
            
            
                                
    
                                                
    
        Replied by Giang Dinh Truong on topic Facebook and Google advertising conversions            
    
        I am sorry but there is no update on this!    
    Please Log in or Create an account to join the conversation.
- Ric Raftis
 - 
            
				
                                 - Offline
 - Junior Member
 - 
            
         
            
        
                8 years 3 months ago                #101708
        by Ric Raftis
    
    
            
            
            
            
            
                                
    
                                                
    
        Replied by Ric Raftis on topic Facebook and Google advertising conversions            
    
        Is it on the radar Giang? Interest in Facebook Pixel seems to be increasing daily.
Cheers,
Ric
    Cheers,
Ric
Please Log in or Create an account to join the conversation.
- Giang Dinh Truong
 - 
            
				
                                 - Away
 - Administrator
 - 
            
         
            
        
                8 years 2 months ago                #101833
        by Giang Dinh Truong
    
    
    
            
            
            
            
                                
    
                                                
    
        Replied by Giang Dinh Truong on topic Facebook and Google advertising conversions            
    
        Hi Ric,
I am not sure about this. In this future, I will add the feature to integrate Eshop with Facebook page shop.
Sincerely, Giang
    I am not sure about this. In this future, I will add the feature to integrate Eshop with Facebook page shop.
Sincerely, Giang
        The following user(s) said Thank You: Ric Raftis     
            Please Log in or Create an account to join the conversation.
- Patter35
 - Offline
 - New Member
 - 
            
         
        Less
        More
        
            
    
        - Posts: 1
 - Thank you received: 0
 
            
        
                7 years 9 months ago         -  7 years 9 months ago        #108959
        by Patter35
    
    
    
            
            
            
            
                                
    
                                                
    
        Replied by Patter35 on topic Facebook and Google advertising conversions            
    
        That’s a wonderful share. I also have been thinking to target potential customers using FB ads. I have been learning the 
    facebook ads management
 skills so this post was also quite helpful for me. I am sure that this platform will help me not only in getting the views but will be useful for conversions as well.    
    
        Last edit: 7 years 9 months ago  by Patter35.            
            Please Log in or Create an account to join the conversation.
- Giang Dinh Truong
 - 
            
				
                                 - Away
 - Administrator
 - 
            
         
            
        
                7 years 9 months ago                #108988
        by Giang Dinh Truong
    
    
            
            
            
            
            
                                
    
                                                
    
        Replied by Giang Dinh Truong on topic Facebook and Google advertising conversions            
    
        Hi,
Unfortunately, this feature is still not existed in our extension yet.
Sincerely, Giang
    Unfortunately, this feature is still not existed in our extension yet.
Sincerely, Giang
Please Log in or Create an account to join the conversation.
        Moderators: Giang Dinh Truong    
Support
Documentation
Information
Copyright © 2025 Joomla Extensions by Joomdonation. All Rights Reserved.
joomdonation.com is not affiliated with or endorsed by the Joomla! Project or Open Source Matters.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.