Jump to content

Adwords conversion tracking (ROI tracking)


Recommended Posts

I red many topics to understand how to track the ROI of Adwords.
I have a couple of adwords campaigns online and a Google Analytics account.
From what I understand, I have to place a snipet code in javascript that Google give me on orders-confirm.tpl (where??)

From what I understand here is how the tracking works: when a customer click on an adword Google puts a cookie on him. When the customer orders something and arrives on the payment confirmation page of the shop the info is sent to Google.

The problem is with Paypal and probably other payment modules the customer does not come back automatically to the confirmation page but has to click on a link on Paypal.
That's annoying for two reasons:
- The customer might not find the link to come back to the shop, it's always better to automatically redirect the customer to the shop after the payment.
- If a customer comes through an adword and pays through Paypal but does not click on the Paypal link to go back to the shop, the conversion tracking will not be sent.

Did anyone find a way to solve this problem? It says in the back office that we should put auto return to Off for Paypal module. That's a shame! Does anyone tried to activate the auto return on Paypal?

Basically does anyone find a way to use Adwords conversion tracking with Prestashop and especially using Paypal?

Thanks !

Link to comment
Share on other sites

  • 3 weeks later...

Hi,

I ve been trying to implement the Google conversion code for adwords, no success so far neither. Among the different posts, I red that the code had to be included in order-confirmation.tpl or in history.tpl

No success so far ?

Has anybody succeeded in implemented Google conversion code for adwords ?

Thanks for help,

Link to comment
Share on other sites

Just paste it into the top of order-payment.tpl. When generating the code with adwords ensure the "Choose text format" is set to none if you don't want it to mess up the look of your page.

Also, to include the value of the order you'll need to change the following line in the google code from:

var google_conversion_value = ;



to

var google_conversion_value = {convertPrice price=$total_price};



Of course, the assumption here is that once on the final order page the customer is going to place the order.

Link to comment
Share on other sites

Does this also work if you use the FastLaneCheckoutmodule?

OR do I need to implement the code on two different files?

one for people that make an account
one for people that go via Fastlanecheckout

does anyone know?

I'm trying to set this up , but unfortunately haven't succeded yet...

Link to comment
Share on other sites

  • 4 months later...
  • 5 weeks later...

Generate as many tracking codes as you wish within adwords.
Place this code in the page you want to track. Remember that it takes up to 24 hours or more until the measurable results are visible in Adwords and Analytics.

Frequently used pages:

* Order confirmation page. (as described above)
* Customer registration
* Newsletter Subscription confirmation pages
* Etc..

it is just what you want to measure within Adwords. You can also create experiments to test pages with this code implemented.

Link to comment
Share on other sites

  • 1 month later...
  • 9 months later...
  • 2 months later...

Any update so far? I'd searched the whole forum but still no solution!!

Come on' , Adwords ROI Tracking is extremely important for Advertist and Ecommerce Merchant.

 

Prestashop should include the official module for their next updates! (OF COURSE IN FREE)

 

It just a common sense to run Adwords for your new store online. I can't believe no one able to 100% confirm is it working on the latest Prestashop (1.4.7+).

 

If someone did it successfully, I really wish you can write an article and explain step-by-step how to do it. This will solve lots of Prestashop user, you know what? Currently if people ask us what shopping cart they should use, we won't recommend Prestashop because it can't do this basic stuff, which is tracking your ROI in the world's largest advertising company - Google!

 

I really disappointed into this and I wish you all like this and let Prestashop developer know they MUST integrate this feature at their next updates! (Probably ver.1.5 Final)

 

THank You.

  • Like 2
Link to comment
Share on other sites

  • 4 weeks later...
  • 1 month later...

Any update so far? I'd searched the whole forum but still no solution!!

Come on' , Adwords ROI Tracking is extremely important for Advertist and Ecommerce Merchant.

 

Prestashop should include the official module for their next updates! (OF COURSE IN FREE)

 

It just a common sense to run Adwords for your new store online. I can't believe no one able to 100% confirm is it working on the latest Prestashop (1.4.7+).

 

If someone did it successfully, I really wish you can write an article and explain step-by-step how to do it. This will solve lots of Prestashop user, you know what? Currently if people ask us what shopping cart they should use, we won't recommend Prestashop because it can't do this basic stuff, which is tracking your ROI in the world's largest advertising company - Google!

 

I really disappointed into this and I wish you all like this and let Prestashop developer know they MUST integrate this feature at their next updates! (Probably ver.1.5 Final)

 

THank You.

 

wanted to echo this sentiment.

Link to comment
Share on other sites

  • 2 weeks later...

Any update so far? I'd searched the whole forum but still no solution!!

Come on' , Adwords ROI Tracking is extremely important for Advertist and Ecommerce Merchant.

 

Prestashop should include the official module for their next updates! (OF COURSE IN FREE)

 

It just a common sense to run Adwords for your new store online. I can't believe no one able to 100% confirm is it working on the latest Prestashop (1.4.7+).

 

If someone did it successfully, I really wish you can write an article and explain step-by-step how to do it. This will solve lots of Prestashop user, you know what? Currently if people ask us what shopping cart they should use, we won't recommend Prestashop because it can't do this basic stuff, which is tracking your ROI in the world's largest advertising company - Google!

 

I really disappointed into this and I wish you all like this and let Prestashop developer know they MUST integrate this feature at their next updates! (Probably ver.1.5 Final)

 

THank You.

 

Me too. I want to echo strongly.

Link to comment
Share on other sites

  • 1 month later...

I'm going to try this

http://www.analytics...-analytics.html

 

I don't like the idea of messing up with prestashop code, I will create a thank-you page with wordpress and I will put the analitics code into it along with some "post sale" marketing stuff.

 

Yes but this will (maybe) only work for paypal transactions, while the order-confirmation page is always called regardless the payment method.

Link to comment
Share on other sites

  • 9 months later...
  • 1 year later...

Hi,

 

Did you get this sorted in the end, if not below is how I managed to get it to work (its a bit of a bodge job but it was very easy and worked a treat on my PrestaShop™ 1.5.2.0)

 

  1. Ensure you have the Prestashop Google Analytics Module installed (my version was - Version : 1.8.1)
  2. Now Find the following file: /modules/ganalytics/views/templates/hook/header.tpl
  3. Open the header.tpl file in your preferred editor (see appendix 1 below for a view of my file before it was edited)
  4. Login to your adwords account and generate your custom conversion tracking code.
  5. Paste your Adwords conversion code at the bottom below the closing analytics script tag. (See my example - appendix 2)
  6. Change this parameter within your adwords conversion tracking code: var google_conversion_value = {$trans.total};
  7. Save and push the file live
  8. Do a test transaction to make sure you haven't made a fatal error
  9. Watch the data appear in your adwords account (It takes about an hour from when your first order was placed.

Hope that helps (Please note: im a bodger, not a developer)

 

 

Appendix 1

 

{*
* 2007-2014 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 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:
* http://opensource.org/licenses/afl-3.0.php
* 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 PrestaShop SA <[email protected]>
*  @copyright  2007-2014 PrestaShop SA
*  @license    http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
*  International Registered Trademark & Property of PrestaShop SA
*}
<script type="text/javascript">
    {if $universal_analytics eq true}
    {literal}
    (function (i, s, o, g, r, a, m) {
        i['GoogleAnalyticsObject'] = r;
        i[r] = i[r] || function () {
            (i[r].q = i[r].q || []).push(arguments)
        }, i[r].l = 1 * new Date();
        a = s.createElement(o),
                m = s.getElementsByTagName(o)[0];
        a.async = 1;
        a.src = g;
        m.parentNode.insertBefore(a, m)
    })(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
    {/literal}

    ga('create', '{$ganalytics_id|escape:'htmlall':'UTF-8'}'{if isset($pageTrack)}, '{$pageTrack|escape:'htmlall':'UTF-8'}'{/if});

    {if $isOrder eq true}
    ga('require', 'ecommerce', 'ecommerce.js');
    {else}
    ga('send', 'pageview');
    {/if}

    {if $isOrder eq true}
    ga('ecommerce:addTransaction', {
        'id': '{$trans.id|escape:'htmlall':'UTF-8'}',
        'affiliation': '{$trans.store|escape:'htmlall':'UTF-8'}',
        'revenue': '{$trans.total|escape:'htmlall':'UTF-8'}',
        'tax': '{$trans.tax|escape:'htmlall':'UTF-8'}',
        'shipping': '{$trans.shipping|escape:'htmlall':'UTF-8'}',
        'city': '{$trans.city|escape:'htmlall':'UTF-8'}',
        'state': '{$trans.state|escape:'htmlall':'UTF-8'}',
        'country': '{$trans.country|escape:'htmlall':'UTF-8'}',
        'currency': '{$trans.currency|escape:'htmlall':'UTF-8'}'
    });

    {foreach from=$items item=item}
    ga('ecommerce:addItem', {
        'id': '{$item.OrderId|escape:'htmlall':'UTF-8'}',
        'sku': '{$item.SKU|escape:'htmlall':'UTF-8'}',
        'name': '{$item.Product|escape:'htmlall':'UTF-8'}',
        'category': '{$item.Category|escape:'htmlall':'UTF-8'}',
        'price': '{$item.Price|escape:'htmlall':'UTF-8'}',
        'quantity': '{$item.Quantity|escape:'htmlall':'UTF-8'}'
    });
    {/foreach}
    {literal}
    (function() {
        {/literal}{if $isOrder eq true}{literal}
            var key = 'ga_trans';
            var idtrans = {/literal}{$trans.id|intval}{literal};
            if (!!$.prototype.totalStorage)
                var view_ga_trans = parseInt($.totalStorage(key));
            else if (typeof localStorage !== 'undefined' && localStorage)
                var view_ga_trans = parseInt(localStorage.getItem(key));

            if (typeof view_ga_trans !== 'undefined' &&  view_ga_trans > 0 && idtrans == view_ga_trans )
                return false;

            if (!!$.prototype.totalStorage)
                $.totalStorage(parseInt(key, idtrans));
            else if (typeof localStorage !== 'undefined' && localStorage)
                localStorage.setItem(key, parseInt(idtrans));
        {/literal}{/if}{literal}
        ga('ecommerce:send');
    })();
    {/literal}
    {/if}
    {else}
    var _gaq = _gaq || [];
    _gaq.push(['_setAccount', '{$ganalytics_id|escape:'htmlall':'UTF-8'}']);
    // Recommended value by Google doc and has to before the trackPageView
    _gaq.push(['_setSiteSpeedSampleRate', 5]);

    _gaq.push(['_trackPageview'{if isset($pageTrack)}, '{$pageTrack|escape:'htmlall':'UTF-8'}'{/if}]);

    {if $isOrder eq true}            {* If it's an order we need more data for stats *}
    _gaq.push(['_addTrans',
        '{$trans.id|escape:'htmlall':'UTF-8'}', {* order ID - required *}
        '{$trans.store|escape:'htmlall':'UTF-8'}', {* affiliation or store name *}
        '{$trans.total|escape:'htmlall':'UTF-8'}', {* total - required *}
        '{$trans.tax|escape:'htmlall':'UTF-8'}', {* tax *}
        '{$trans.shipping|escape:'htmlall':'UTF-8'}', {* shipping *}
        '{$trans.city|escape:'htmlall':'UTF-8'}', {* city *}
        '{$trans.state|escape:'htmlall':'UTF-8'}', {* state or province *}
        '{$trans.country|escape:'htmlall':'UTF-8'}' {* country *}
    ]);

    {foreach from=$items item=item}
    _gaq.push(['_addItem',
        '{$item.OrderId|escape:'htmlall':'UTF-8'}', {* order ID - required *}
        '{$item.SKU|escape:'htmlall':'UTF-8'}', {* SKU/code - required *}
        '{$item.Product|escape:'htmlall':'UTF-8'}', {* product name *}
        '{$item.Category|escape:'htmlall':'UTF-8'}', {* category or variation *}
        '{$item.Price|escape:'htmlall':'UTF-8'}', {* unit price - required *}
        '{$item.Quantity|escape:'htmlall':'UTF-8'}' {* quantity - required *}
    ]);
    {/foreach}
    {* submits transaction to the Analytics servers *}
    {literal}
    _gaq.push(['_trackTrans']);
    {/literal}
    {/if}
    {literal}
    (function() {
        {/literal}{if $isOrder eq true}{literal}
            var key = 'ga_trans';
            var idtrans = {/literal}{$trans.id|intval}{literal};
            if (!!$.prototype.totalStorage)
                var view_ga_trans = parseInt($.totalStorage(key));
            else if (typeof localStorage !== 'undefined' && localStorage)
                var view_ga_trans = parseInt(localStorage.getItem(key));

            if (typeof view_ga_trans !== 'undefined' &&  view_ga_trans > 0 && idtrans == view_ga_trans )
                return false;

            if (!!$.prototype.totalStorage)
                $.totalStorage(parseInt(key, idtrans));
            else if (typeof localStorage !== 'undefined' && localStorage)
                localStorage.setItem(key, parseInt(idtrans));
        {/literal}{/if}{literal}

        var ga = document.createElement('script');
        ga.type = 'text/javascript';
        ga.async = true;
        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
        var s = document.getElementsByTagName('script')[0];
        s.parentNode.insertBefore(ga, s);
    })();
    {/literal}
    {/if}
</script>

 

 

 

 

Appendix 2: (My adwords code with my ID's removed)

<!-- START Google Code for Order Conf Conversion Page -->
<script type="text/javascript">
/* <![CDATA[ */
var google_conversion_id = YOUR ID HERE;
var google_conversion_language = "en";
var google_conversion_format = "3";
var google_conversion_color = "ffffff";
var google_conversion_label = "YOUR LABEL HERE";
var google_conversion_value = {$trans.total};
var google_conversion_currency = "GBP";
var google_remarketing_only = false;
/* ]]> */
</script>
<script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js">
</script>
<noscript>
<div style="display:inline;">
<img height="1" width="1" style="border-style:none;" alt="" src="//www.googleadservices.com/pagead/conversion/YOURVALUE/?value=0.00&currency_code=GBP&label=YOURLABEL&guid=ON&script=0"/>
</div>
</noscript>
<!-- END Google Adwords Code for Order Conf Conversion Page -->
 

Link to comment
Share on other sites

×
×
  • Create New...