facebook pixel

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
8 anni tempo fa
To track facebook ads I need to insert the facebook pixel code between <Head> and </Head>.
How do I do this on Nop 1.7?
the Google adsense insert under configuration>Global settings puts the info into the body so it won't work (I guess).

If there isn't somewhere to do it from the admin side, is there anywhere I can do it directly?

Any help would be appreciated. Thanks
8 anni tempo fa
adaminspace1 wrote:
To track facebook ads I need to insert the facebook pixel code between <Head> and </Head>.
How do I do this on Nop 1.7?
the Google adsense insert under configuration>Global settings puts the info into the body so it won't work (I guess).

If there isn't somewhere to do it from the admin side, is there anywhere I can do it directly?

Any help would be appreciated. Thanks


You will find <Head> and </Head> tag in Root.Master file
8 anni tempo fa
adaminspace1 wrote:
To track facebook ads I need to insert the facebook pixel code between <Head> and </Head>.
How do I do this on Nop 1.7?
the Google adsense insert under configuration>Global settings puts the info into the body so it won't work (I guess).

If there isn't somewhere to do it from the admin side, is there anywhere I can do it directly?

Any help would be appreciated. Thanks

For facebook pixel, You have to paste facebook script on the required page as this script dynamic and changed according to requirement. It is not possible to set it from admin panel.
8 anni tempo fa
Thank you for answers. That should be the solution.
8 anni tempo fa
Hi
I don't find the way and folder to insert Pixel code.
Where did you do it please ?
Luc
8 anni tempo fa
In Views\Product\ProductTemplate.Grouped.cshtml and Views\Product\ProductTemplate.Simple.cshtml=>

<!-- Facebook Pixel Code -->
<script>
        !function (f, b, e, v, n, t, s) {
            if (f.fbq) return; n = f.fbq = function () {
                n.callMethod ?
                n.callMethod.apply(n, arguments) : n.queue.push(arguments)
            }; if (!f._fbq) f._fbq = n;
            n.push = n; n.loaded = !0; n.version = '2.0'; n.queue = []; t = b.createElement(e); t.async = !0;
            t.src = v; s = b.getElementsByTagName(e)[0]; s.parentNode.insertBefore(t, s)
        }(window,
        document, 'script', '//connect.facebook.net/en_US/fbevents.js');

        fbq('init', '0000000000000000');
fbq('track', 'PageView');
        fbq('track', 'ViewContent');
</script>
<noscript>
    <img height="1" width="1" style="display:none"
         src="https://www.facebook.com/tr?id=0000000000000000&ev=PageView&noscript=1" />
</noscript>
<!-- End Facebook Pixel Code -->


Views\ShoppingCart\Wishlist.cshtml=>

<script>
    !function (f, b, e, v, n, t, s) {
        if (f.fbq) return; n = f.fbq = function () {
            n.callMethod ?
            n.callMethod.apply(n, arguments) : n.queue.push(arguments)
        }; if (!f._fbq) f._fbq = n;
        n.push = n; n.loaded = !0; n.version = '2.0'; n.queue = []; t = b.createElement(e); t.async = !0;
        t.src = v; s = b.getElementsByTagName(e)[0]; s.parentNode.insertBefore(t, s)
    }(window,
    document, 'script', '//connect.facebook.net/en_US/fbevents.js');

    fbq('init', '0000000000000000');
    fbq('track', 'PageView');
    fbq('track', 'AddToWishlist');
</script>
<noscript>
    <img height="1" width="1" style="display:none"
         src="https://www.facebook.com/tr?id=0000000000000000&ev=PageView&noscript=1" />
</noscript>


Views\Catalog\Search.cshtml=>

<script>
    !function (f, b, e, v, n, t, s) {
        if (f.fbq) return; n = f.fbq = function () {
            n.callMethod ?
            n.callMethod.apply(n, arguments) : n.queue.push(arguments)
        }; if (!f._fbq) f._fbq = n;
        n.push = n; n.loaded = !0; n.version = '2.0'; n.queue = []; t = b.createElement(e); t.async = !0;
        t.src = v; s = b.getElementsByTagName(e)[0]; s.parentNode.insertBefore(t, s)
    }(window,
    document, 'script', '//connect.facebook.net/en_US/fbevents.js');

    fbq('init', '0000000000000000');
    fbq('track', 'PageView');
    fbq('track', 'Search');
</script>
<noscript>
    <img height="1" width="1" style="display:none"
         src="https://www.facebook.com/tr?id=0000000000000000&ev=PageView&noscript=1" />
</noscript>


in Views\Checkout\Completed.cshtml=>

<script>
    !function (f, b, e, v, n, t, s) {
        if (f.fbq) return; n = f.fbq = function () {
            n.callMethod ?
            n.callMethod.apply(n, arguments) : n.queue.push(arguments)
        }; if (!f._fbq) f._fbq = n;
        n.push = n; n.loaded = !0; n.version = '2.0'; n.queue = []; t = b.createElement(e); t.async = !0;
        t.src = v; s = b.getElementsByTagName(e)[0]; s.parentNode.insertBefore(t, s)
    }(window,
    document, 'script', '//connect.facebook.net/en_US/fbevents.js');

    fbq('init', '0000000000000000');
    fbq('track', 'PageView');
    fbq('track', 'Purchase', { value: '1.00', currency: 'USD' });
</script>
<noscript>
    <img height="1" width="1" style="display:none"
         src="https://www.facebook.com/tr?id=0000000000000000&ev=PageView&noscript=1" />
</noscript>


Views\Customer\RegisterResult.cshtml=>
<script>
    !function (f, b, e, v, n, t, s) {
        if (f.fbq) return; n = f.fbq = function () {
            n.callMethod ?
            n.callMethod.apply(n, arguments) : n.queue.push(arguments)
        }; if (!f._fbq) f._fbq = n;
        n.push = n; n.loaded = !0; n.version = '2.0'; n.queue = []; t = b.createElement(e); t.async = !0;
        t.src = v; s = b.getElementsByTagName(e)[0]; s.parentNode.insertBefore(t, s)
    }(window,
    document, 'script', '//connect.facebook.net/en_US/fbevents.js');

    fbq('init', '0000000000000000');
    fbq('track', 'PageView');
    fbq('track', 'CompleteRegistration');
</script>
<noscript>
    <img height="1" width="1" style="display:none"
         src="https://www.facebook.com/tr?id=0000000000000000&ev=PageView&noscript=1" />
</noscript>


Views\ShoppingCart\Cart.cshtml=>

<script>
!function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n;
n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0;
t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window,
document,'script','//connect.facebook.net/en_US/fbevents.js');

fbq('init', '0000000000000000');
fbq('track', 'PageView');
fbq('track', 'AddToCart');
</script>
<noscript>
    <img height="1" width="1" style="display:none"
         src="https://www.facebook.com/tr?id=0000000000000000&ev=PageView&noscript=1" />
</noscript>
8 anni tempo fa
Thanks a lot. Please find this task here
8 anni tempo fa
Hi i have question. If I paste pixel code in ver 3.70 pixel code (only for conversion) to the "analytics ecommerce" place, is this should work ?
8 anni tempo fa
Zyje_sobie wrote:
Hi i have question. If I paste pixel code in ver 3.70 pixel code (only for conversion) to the "analytics ecommerce" place, is this should work ?


Sorry. Do you want to paste pixel in Nop.Plugin.Widgets.GoogleAnalytics plugin?

If you want it ..the answer is No. You don't. You can add it directly in required pages. See the Mr. Anik reply https://www.nopcommerce.com/boards/t/39868/facebook-pixel.aspx#159511
8 anni tempo fa
Zyje_sobie wrote:
Hi i have question. If I paste pixel code in ver 3.70 pixel code (only for conversion) to the "analytics ecommerce" place, is this should work ?

No It will not work. There is no plugin availsble also. You have to change source code. So check this link.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.