Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

New Facebook Pixel Integration Rate Topic   - - - - -

 
  • fleaffair
  • Senior Member
  • Members
  • Join Date: 11-Jun 14
  • 537 posts

Posted 28 February 2016 - 08:14 PM #1

Hi,

 

With the new facebook pixel launched how do we integrate it with the cs-cart pages. Where will each of these codes be added in cs-cart (filenames).

Website action	Standard event code
Key page view	fbq('track', 'ViewContent');
Search	fbq('track', 'Search');
Add to cart	fbq('track', 'AddToCart');
Add to wishlist	fbq('track', 'AddToWishlist');
Initiate checkout	fbq('track', 'InitiateCheckout');
Add payment info	fbq('track', 'AddPaymentInfo');
Make purchase	fbq('track', 'Purchase', {value: '0.00', currency: 'USD'});
Lead	fbq('track', 'Lead');
Complete registration	fbq('track', 'CompleteRegistration');

Warm Regards,
Admin | MVE: 4.2.4

 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 19593 posts

Posted 29 February 2016 - 08:38 AM #2

May be this answer will help you:

 

http://forum.cs-cart...facebook-pixel/


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • fleaffair
  • Senior Member
  • Members
  • Join Date: 11-Jun 14
  • 537 posts

Posted 29 February 2016 - 12:37 PM #3

May be this answer will help you:

 

http://forum.cs-cart...facebook-pixel/

 

Thanks Ecom but I wanted to know the filenames for configuring all the above actions when triggered.


Warm Regards,
Admin | MVE: 4.2.4

 
  • fleaffair
  • Senior Member
  • Members
  • Join Date: 11-Jun 14
  • 537 posts

Posted 22 March 2016 - 09:55 AM #4

How to add the FB code to Add to cart event ?

 

Add to cart    fbq('track', 'AddToCart');

 

Just need the file name 


Warm Regards,
Admin | MVE: 4.2.4

 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 19593 posts

Posted 22 March 2016 - 12:55 PM #5

Try this:

 

design/themes/YOUR_THEME/templates/buttons/add_to_cart.tpl


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • fleaffair
  • Senior Member
  • Members
  • Join Date: 11-Jun 14
  • 537 posts

Posted 22 March 2016 - 03:04 PM #6

Try this:

 

design/themes/YOUR_THEME/templates/buttons/add_to_cart.tpl

 

Shouldnt this be on a file where the event press code of Add to Cart button is written , since the tpl code will run everywhere the button is loaded on ui .

 

Not sure 


Warm Regards,
Admin | MVE: 4.2.4

 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 19593 posts

Posted 22 March 2016 - 03:23 PM #7

Shouldnt this be on a file where the event press code of Add to Cart button is written , since the tpl code will run everywhere the button is loaded on ui .

 

Not sure 

 

Actually I did not integrate Facebook Pixel and did not see their docs. I just provided you with the file where the Add to cart button is displayed


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • Alt-team
  • CS-Cart Developer
  • Authorized Reseller
  • Join Date: 18-Jan 11
  • 2686 posts

Posted 23 March 2016 - 08:51 AM #8

Hello,

 

We already integrated Facebook pixel for one of our clients. To add the "fbq('track', 'AddToCart');" tracker you need make changes in the design/themes/YOUR_THEME/templates/buttons/add_to_cart.tpl file.

 

Thank you.


ADD-ONS  Web development service  | CS-Cart dedicated developers

Buy MULTIVENDOR - USD 1250 (14% off)   Buy CS-CART LICENCE - USD 345 (13% off)

 Email - manager@alt-team.com | Skype - Altteam    


 
  • fleaffair
  • Senior Member
  • Members
  • Join Date: 11-Jun 14
  • 537 posts

Posted 28 March 2016 - 07:40 AM #9

Hello,

 

We already integrated Facebook pixel for one of our clients. To add the "fbq('track', 'AddToCart');" tracker you need make changes in the design/themes/YOUR_THEME/templates/buttons/add_to_cart.tpl file.

 

Thank you.

 

could you please let me know how this will get implemented since the fb code should be only be called when the Add to Cart button is pressed rather than on the page where the button is displayed. any pointers would be helpful. Thanks.


Warm Regards,
Admin | MVE: 4.2.4

 
  • Alt-team
  • CS-Cart Developer
  • Authorized Reseller
  • Join Date: 18-Jan 11
  • 2686 posts

Posted 28 March 2016 - 10:52 AM #10

Try use below changes in the design/themes/YOUR_THEME/templates/buttons/add_to_cart.tpl file:
 

        {assign var="fp_code" value="fbq('track', 'AddToCart');"}

        {include file="buttons/button.tpl" but_id=$but_id but_text=$but_text|default:__("add_to_cart") but_name=$but_name but_onclick="`$fp_code` `$but_onclick`" but_href=$but_href but_target=$but_target but_role=$but_role|default:"text" but_meta="ty-btn__primary ty-btn__big ty-btn__add-to-cart cm-form-dialog-closer"}

instead:

        {include file="buttons/button.tpl" but_id=$but_id but_text=$but_text|default:__("add_to_cart") but_name=$but_name but_onclick=$but_onclick but_href=$but_href but_target=$but_target but_role=$but_role|default:"text" but_meta="ty-btn__primary ty-btn__big ty-btn__add-to-cart cm-form-dialog-closer"}

Please note: better to create separate module with override the "buttons:add_to_cart" hook.


ADD-ONS  Web development service  | CS-Cart dedicated developers

Buy MULTIVENDOR - USD 1250 (14% off)   Buy CS-CART LICENCE - USD 345 (13% off)

 Email - manager@alt-team.com | Skype - Altteam    


 
  • fleaffair
  • Senior Member
  • Members
  • Join Date: 11-Jun 14
  • 537 posts

Posted 15 April 2016 - 02:03 PM #11

 

Try use below changes in the design/themes/YOUR_THEME/templates/buttons/add_to_cart.tpl file:
 

        {assign var="fp_code" value="fbq('track', 'AddToCart');"}

        {include file="buttons/button.tpl" but_id=$but_id but_text=$but_text|default:__("add_to_cart") but_name=$but_name but_onclick="`$fp_code` `$but_onclick`" but_href=$but_href but_target=$but_target but_role=$but_role|default:"text" but_meta="ty-btn__primary ty-btn__big ty-btn__add-to-cart cm-form-dialog-closer"}

instead:

        {include file="buttons/button.tpl" but_id=$but_id but_text=$but_text|default:__("add_to_cart") but_name=$but_name but_onclick=$but_onclick but_href=$but_href but_target=$but_target but_role=$but_role|default:"text" but_meta="ty-btn__primary ty-btn__big ty-btn__add-to-cart cm-form-dialog-closer"}

Please note: better to create separate module with override the "buttons:add_to_cart" hook.

 

 

We are in MVE 4.2.4 is this the block you are talking about to change since there are lot many similar lines.

{hook name="buttons:add_to_cart"}
    {assign var="c_url" value=$config.current_url|escape:url}
    {if ($settings.General.allow_anonymous_shopping == "allow_shopping" || $auth.user_id) && $show_vs_icon_buttons}
        {if ($product.avail_since > $smarty.const.TIME)}
        {*Product coming soon with add to cart*}
            {assign var="date" value=$avail_date|date_format:$settings.Appearance.date_format}
            {assign var="vs_coming_soon" value=__("product_coming_soon_add", ["[avail_date]" => $date])}
            {include file="buttons/button.tpl" 
                but_text=$but_text|default:$vs_coming_soon
                but_id=$but_id 
                but_href=$but_href 
                but_role="vs_icon"
                but_target=$but_target 
                but_name=$but_name 
                but_onclick=$but_onclick 
                vs_icon="vs-icon-coming-soon"
                but_extra_class="vs-add-to-cart"}
        {else}
            {include file="buttons/button.tpl" 
                but_text=$but_text|default:__("add_to_cart") 
                but_id=$but_id 
                but_href=$but_href 
                but_role="vs_icon"
                but_target=$but_target 
                but_name=$but_name 
                but_onclick=$but_onclick 
                vs_icon="vs-icon-grid-add-to-cart"
                but_extra_class="vs-add-to-cart"}
        {/if}

    {elseif $settings.General.allow_anonymous_shopping == "allow_shopping" || $auth.user_id}
        {if $details_page || $show_vs_atc}
            {include file="buttons/button.tpl" 
                but_id=$but_id 
                but_text=$but_text|default:__("add_to_cart") 
                but_name=$but_name 
                but_onclick=$but_onclick 
                but_href=$but_href 
                but_target=$but_target 
                but_role="vs_atc"}
        {else}
            {include file="buttons/button.tpl" but_id=$but_id but_text=$but_text|default:__("add_to_cart") but_name=$but_name but_onclick=$but_onclick but_href=$but_href but_target=$but_target but_role=$but_role|default:"text"}

        {/if}
    {else}

        {if $runtime.controller == "auth" && $runtime.mode == "login_form"}
            {assign var="login_url" value=$config.current_url}
        {else}
            {assign var="login_url" value="auth.login_form?return_url=`$c_url`"}
        {/if}

        {include file="buttons/button.tpl" but_id=$but_id but_text=__("sign_in_to_buy") but_href=$login_url but_role=$but_role|default:"text" but_name=""}
        <p>{__("text_login_to_add_to_cart")}</p>
    {/if}
{/hook}


Warm Regards,
Admin | MVE: 4.2.4

 
  • fleaffair
  • Senior Member
  • Members
  • Join Date: 11-Jun 14
  • 537 posts

Posted 16 April 2016 - 08:52 AM #12

  {else}
            {include file="buttons/button.tpl" but_id=$but_id but_text=$but_text|default:__("add_to_cart") but_name=$but_name but_onclick=$but_onclick but_href=$but_href but_target=$but_target but_role=$but_role|default:"text"}

        {/if}
    {else}

Tried changing the above code as suggested by you but the event doesnt register in FB for Add to Cart , could you please help me on this.


Warm Regards,
Admin | MVE: 4.2.4

 
  • ahmed talaat
  • Advanced Member
  • Members
  • Join Date: 15-Feb 14
  • 51 posts

Posted 23 August 2017 - 07:32 PM #13

i'm using CS-Cart 4.6 Ultimate

i have multiple stores how to configure each store separately?

i installed the pixel base code by adding it in the header section on the default layout page for each store and it worked fine.

 

so how can i install the event codes for..

Search

 

 
 
 
 
 
 
 
View Content

 

 
 
 
 
 
 
 
 
Add to Cart

 

 
 
 
 
 
 
 
 
Add to Wishlist

 

 
 
 
 
 
 
 
 
Initiate Checkout

 

 
 
 
 
 
Add Payment Info

 

 
 
 
 
 
Purchase

 

 
 
 
 
 
 
 
 
Lead

 

 
 
 
 
 
 
 
 
Complete Registration

 

please help

Thanks



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 19593 posts

Posted 24 August 2017 - 05:44 AM #14

i'm using CS-Cart 4.6 Ultimate
i have multiple stores how to configure each store separately?
i installed the pixel base code by adding it in the header section on the default layout page for each store and it worked fine.
 
so how can i install the event codes for..

 

It is not trivial task. Please pay attention to ready to use solutions on the marketplace


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • Alt-team
  • CS-Cart Developer
  • Authorized Reseller
  • Join Date: 18-Jan 11
  • 2686 posts

Posted 24 August 2017 - 11:22 AM #15

Or you may contact to any CS-Cart developer and ask them to solve these issues for some money.


ADD-ONS  Web development service  | CS-Cart dedicated developers

Buy MULTIVENDOR - USD 1250 (14% off)   Buy CS-CART LICENCE - USD 345 (13% off)

 Email - manager@alt-team.com | Skype - Altteam    


 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 19593 posts

Posted 24 August 2017 - 01:14 PM #16

Our team is also at your service


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    CS-Cart RU                         24500 руб.
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      CS-Cart RU + UniTheme    36000 руб.


 
  • Irfan Ahmad
  • Advanced Member
  • Members
  • Join Date: 22-Feb 19
  • 57 posts

Posted 28 June 2019 - 07:01 AM #17

I understand it's an old thread, but hope my solution is helpful for someone who is searching for an answer.

 

You would want to put all the facebook pixel "fbq" code lines on the header of the default page. To accomplish this you would log on to the admin panel of your cs-cart; then go to layouts-> click the layout that is set as default-> click the cog (gear) icon on the layout's name. One the window that appears, scroll down to "Custom HTML code" and paste the pixel code provided by facebook. Make sure to click "Save" when you're done.

 


WWW.HALLROAD.ORG