Jump to content

Place Facebook Pixel After Checkout


cristianfpg

Recommended Posts

If you mean the page after payment accepted its call order-confirmation and it can be either the main order-confirmation.tpl in your theme folder or most likely an override of the used payment method.

So you should probably look for the order confirmation tpl file inside the payment module.

Link to comment
Share on other sites

ok, i found the directories

 

in paypalusa/views/templates/front:

 

- errors-messages.tpl

- express-checkout-messages.tpl *

- index.php

 

in payulatam/views/templates/front:

 

- error.tpl

- index.php

- redirect.tpl

- response.tpl *

- validation.tpl

- warning.tpl

 

i think that the code should be in the * files

Link to comment
Share on other sites

Try to compare the text you are getting on the order confirmation page with one of the tpl files.

You can also look inside hook folder not only front.

 

How do you know that the pixel is not loading on the order confirmation page? Did you check the page source to see? maybe it's loading ok but you have different issue with the tracking code?

Link to comment
Share on other sites

{*

* 2014 PAYU LATAM

*

* NOTICE OF LICENSE

*

* This source file is subject to the Open Software License (OSL 3.0)

* that is bundled with this package in the file LICENSE.txt.

* It is also available through the world-wide-web at this URL:


* If you did not receive a copy of the license and are unable to

* obtain it through the world-wide-web, please send an email

* to [email protected] so we can send you a copy immediately.

*

* DISCLAIMER

*

* Do not edit or add to this file if you wish to upgrade PrestaShop to newer

* versions in the future. If you wish to customize PrestaShop for your

* needs please refer to http://www.prestashop.com for more information.

*

*  @author    PAYU LATAM <[email protected]>

*  @copyright 2014 PAYU LATAM

*  @license   http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)

*}

<link rel="stylesheet" href="{$css_dir}global.css" type="text/css" media="all">

<link href="{$css|escape:'htmlall':'UTF-8'}payu.css" rel="stylesheet" type="text/css">

{if $valid}

<center>

<table class="table-response">

<tr align="center">

<th colspan="2"><h1 class="md-h1">{l s='Purchase Data' mod='payulatam'}</h1></th>

</tr>

<tr align="left">

<td>{l s='Transaction State' mod='payulatam'}</td>

<td>{$estadoTx|escape:'htmlall':'UTF-8'}</td>

</tr>

<tr align="left">

<td>{l s='Transaction ID' mod='payulatam'}</td>

<td>{$transactionId|escape:'htmlall':'UTF-8'}</td>

</tr>

<tr align="left">

<td>{l s='Purchase Reference' mod='payulatam'}</td>

<td>{$reference_pol|escape:'htmlall':'UTF-8'}</td>

</tr>

<tr align="left">

<td>{l s='Transaction Reference' mod='payulatam'}</td>

<td>{$referenceCode|escape:'htmlall':'UTF-8'}</td>

</tr>

{if $pseBank!=null}

<tr align="left">

<td>CUS</td>

<td>{$cus|escape:'htmlall':'UTF-8'}</td>

</tr>

<tr align="left">

<td>{l s='Bank' mod='payulatam'}</td>

<td>{$pseBank|escape:'htmlall':'UTF-8'}</td>

</tr>

{/if}

<tr align="left">

<td>{l s='Total Value' mod='payulatam'}</td>

<td>${$value|escape:'htmlall':'UTF-8'}</td>

</tr>

<tr align="left">

<td>{l s='Currency' mod='payulatam'}</td>

<td>{$currency|escape:'htmlall':'UTF-8'}</td>

</tr>

<tr align="left">

<td>{l s='Description' mod='payulatam'}</td>

<td>{$description|escape:'htmlall':'UTF-8'}</td>

</tr>

<tr align="left">

<td>{l s='Entity' mod='payulatam'}</td>

<td>{$lapPaymentMethod|escape:'htmlall':'UTF-8'}</td>

</tr>

</table>

<p/>

<h1>{$messageApproved|escape:'htmlall':'UTF-8'}</h1>

</center>

{else}

<h1><center>{l s='The request is incorrect! There is an error in the digital signature.' mod='payulatam'}</center></h1>

{/if}

{literal}

<!-- 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', '155791794779885');

fbq('track', "PageView");

fbq('track', 'Purchase', {value: '0.00', currency: 'COP'});

</script>

<noscript><img height="1" width="1" style="display:none"


/></noscript>

<!-- End Facebook Pixel Code -->

{/literal}

Link to comment
Share on other sites

Look for {if $valid) and {else}, this part will load if the order is approved so you should put the pixel code between {if $valid} and {else} to tell the pixel that the order is confirm.

 

Between {else} and {/if} is when the order has failed so if you want to trigger a different pixel for unapproved orders you can place a different pixel in that area.

Link to comment
Share on other sites

  • 3 weeks later...
  • 6 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...