Post by dazthephot » Thu Apr 19, 2012 8:38 pm

hi all,
i've been working at integrating my store with a Google Adwords Program. I need to monitor my sales conversions and i've been sent the tracking code to insert into a "thank you for shopping with us" page or similar page that comes up at the end of a successful transaction.

My question is which would be the most effective page?

regards
daz
http://khinteriorsltd.co.uk/ocart/

New member

Posts

Joined
Tue Jul 05, 2011 6:31 pm

Post by Avvici » Fri Apr 20, 2012 1:40 pm

Most SEO firms that are hired to run conversion statistics on Open Cart insert there code in one of what could be many different SUCCESS tpl's I would recommend putting it at the bottom of this page:
catalog/view/theme/your_theme/template/common/success.tpl

User avatar
Expert Member

Posts

Joined
Tue Apr 05, 2011 12:09 pm
Location - Asheville, NC

Post by dazthephot » Fri Apr 20, 2012 6:44 pm

Thank you.
I was slightly confused by the fact that an adword campaign that was targeted to a particular product would be able to differentiate the actual product sold on my Ocart store.
I am still not convinced that the code snippet for adwords tracking can do this but i'll give it a go.

New member

Posts

Joined
Tue Jul 05, 2011 6:31 pm

Post by storm-cloud » Mon Jul 23, 2012 7:26 pm

Avvici,

This was my thought as to the solution for this also (inserting the tracking code into catalog/view/theme/*/common/success.tpl).

However, recently I have noticed some discrepancies with the reporting statistics. I have now just realised that the success page can be loaded for more than just completing checkout. For example, after a message is submitted through the contact form. I would guess that there a few more occasions when this page is loaded also?

This would cause problems in that if a visitor still has an active cookie after being referred by AdWords, they then fill out a contact form (or other "successful" activities) and this would count as a conversion.

Is there any way to have this script load only after checkout? Perhaps in a controller file?

Here is an example of the required script...

Code: Select all

<!-- Google Code for Purchase Conversion Page -->
  <script type="text/javascript"> 
  /* <![CDATA[ */
  var google_conversion_id = 1234567890;
  var google_conversion_language = "en_US";
  var google_conversion_format = "1";
  var google_conversion_color = "666666";
  var google_conversion_label = "Purchase";
  if (10.0) {
  var google_conversion_value = 10.0
  }
  /* ]]> */ 
  </script>
  <script type="text/javascript" 
  src="http://www.googleadservices.com/pagead/
  conversion.js">
  </script>
  <noscript>
  <img height=1 width=1 border=0 
  src="http://www.googleadservices.com/pagead/
  conversion/1234567890/
  ?value=10.0&label=Purchase&script=0">
  </noscript>

Active Member

Posts

Joined
Wed Feb 22, 2012 8:07 am

Post by aals » Fri Aug 10, 2012 7:03 pm

Exactly like i want to track the success of a sign-up & not an order so where to add the respective code.

Thx & Rgrds,
Aals
http://trendzystreet.com


Newbie

Posts

Joined
Tue Aug 16, 2011 6:09 pm

Post by storm-cloud » Wed Aug 29, 2012 9:53 am

I finally worked out a solution for this.

In the file catalog/view/theme/*/template/common/success.tpl

I simply wrapped the respective tracking code with a PHP if statement...

Code: Select all

<?php if (isset($this->request->get['route']) && $this->request->get['route'] == 'checkout/success') { ?>

<!-- tracking code goes here -->

<?php } ?>
aals, if you would like to track account creation you would need to change this to...

Code: Select all

<?php if (isset($this->request->get['route']) && $this->request->get['route'] == 'account/success') { ?>

<!-- tracking code goes here -->

<?php } ?>
This can be applied to any success page by changing the route above. This way, the tracking code will only appear when the specified route is triggered avoiding any false conversion reporting.

Active Member

Posts

Joined
Wed Feb 22, 2012 8:07 am

Post by trader » Thu Nov 08, 2012 6:46 pm

Hey Storm-Cloud,

Thanks for the info on this. I inserted your code as follows but for some reason it is not working. Can you see if anything is wrong with my code please? I inserted it into the success.tpl file after the footer code and at the bottom of the page. I made some sales yesterday but the conversions were not tracked.

<?php if (isset($this->request->get['route']) && $this->request->get['route'] == 'checkout/success') { ?>

<!-- Google Code for PPC Success Conversion Page -->
<script type="text/javascript">
/* <![CDATA[ */
var google_conversion_id = 1004433338;
var google_conversion_language = "en";
var google_conversion_format = "2";
var google_conversion_color = "ffffff";
var google_conversion_label = "AIbqCN6f1gMQut_53gM";
var google_conversion_value = 0;
/* ]]> */
</script>
<script type="text/javascript" src="http://www.googleadservices.com/pagead/conversion.js">
</script>
<noscript>
<div style="display:inline;">
<img height="1" width="1" style="border-style:none;" alt="" src="http://www.googleadservices.com/pagead/ ... N&script=0"/>
</div>
</noscript>
<?php } ?>

New member

Posts

Joined
Fri Apr 29, 2011 4:12 am

Post by Avvici » Thu Nov 08, 2012 11:59 pm

storm-cloud wrote:Avvici,

This was my thought as to the solution for this also (inserting the tracking code into catalog/view/theme/*/common/success.tpl).

However, recently I have noticed some discrepancies with the reporting statistics. I have now just realised that the success page can be loaded for more than just completing checkout. For example, after a message is submitted through the contact form. I would guess that there a few more occasions when this page is loaded also?

This would cause problems in that if a visitor still has an active cookie after being referred by AdWords, they then fill out a contact form (or other "successful" activities) and this would count as a conversion.

Is there any way to have this script load only after checkout? Perhaps in a controller file?

Here is an example of the required script...

Code: Select all

<!-- Google Code for Purchase Conversion Page -->
  <script type="text/javascript"> 
  /* <![CDATA[ */
  var google_conversion_id = 1234567890;
  var google_conversion_language = "en_US";
  var google_conversion_format = "1";
  var google_conversion_color = "666666";
  var google_conversion_label = "Purchase";
  if (10.0) {
  var google_conversion_value = 10.0
  }
  /* ]]> */ 
  </script>
  <script type="text/javascript" 
  src="http://www.googleadservices.com/pagead/
  conversion.js">
  </script>
  <noscript>
  <img height=1 width=1 border=0 
  src="http://www.googleadservices.com/pagead/
  conversion/1234567890/
  ?value=10.0&label=Purchase&script=0">
  </noscript>
No, you are correct. I forgot about that ! Just duplicate success.tpl and rename it to something like "succcess_one.tpl", and alter the control file to call it. That will fix your issue.

User avatar
Expert Member

Posts

Joined
Tue Apr 05, 2011 12:09 pm
Location - Asheville, NC

Post by ryan-isra » Tue Nov 13, 2012 5:17 pm

avvici wrote:
storm-cloud wrote:Avvici,

This was my thought as to the solution for this also (inserting the tracking code into catalog/view/theme/*/common/success.tpl).
No, you are correct. I forgot about that ! Just duplicate success.tpl and rename it to something like "succcess_one.tpl", and alter the control file to call it. That will fix your issue.
Hi, sorry, I'm newbie to OpenCart, but how do I call the success-one.tpl ?
Can anyone here provide the exact steps.

Best Regards
Ryan

Newbie

Posts

Joined
Tue Nov 13, 2012 5:15 pm


Post by masterp » Wed Nov 14, 2012 5:03 pm

Hey guys,

my custom theme doesn't have that success.tpl file in the folder only in "default" theme

I only see header.tpl, footer.tpl etc in the folder.

Where should I paste the conversion tracking code?

Newbie

Posts

Joined
Wed Nov 14, 2012 5:01 pm

Post by DVDL16 » Fri Dec 07, 2012 4:58 pm

storm-cloud wrote:I finally worked out a solution for this.

In the file catalog/view/theme/*/template/common/success.tpl

I simply wrapped the respective tracking code with a PHP if statement...

Code: Select all

<?php if (isset($this->request->get['route']) && $this->request->get['route'] == 'checkout/success') { ?>

<!-- tracking code goes here -->

<?php } ?>
aals, if you would like to track account creation you would need to change this to...

Code: Select all

<?php if (isset($this->request->get['route']) && $this->request->get['route'] == 'account/success') { ?>

<!-- tracking code goes here -->

<?php } ?>
This can be applied to any success page by changing the route above. This way, the tracking code will only appear when the specified route is triggered avoiding any false conversion reporting.
Thanks Storm Cloud! Your solution worked perfectly in my situation. I needed to add some customer satisfaction rating code to the success.tpl file, but only on the Order Confirmation page.

Thanks again!

Newbie

Posts

Joined
Sun Feb 26, 2012 6:17 pm

Post by vicky_vale_71 » Wed Feb 27, 2013 11:09 pm

Hi,
I have the same problem as Masterp, No success.tpl file in my custom theme. I considered duplicating the one from default theme and adding it into my theme folder, but I am a total newbie and not sure if this is a good idea - Can anyone advise - Please!
Thanks
Vicky

Newbie

Posts

Joined
Fri Jan 06, 2012 1:49 am

Post by alex1 » Sat Jul 27, 2013 2:19 am

Does this code:

<?php if (isset($this->request->get['route']) && $this->request->get['route'] == 'checkout/success') { ?>

work with 1.5.3? Just checking since this thread is from 2012.

Thanks

Active Member

Posts

Joined
Sat Oct 16, 2010 9:49 am

Post by chris.dempsey » Mon Nov 18, 2013 6:38 pm

Does this code: work with 1.5.3? Just checking since this thread is from 2012.
Old query I know but the code will work, also works with 1.5.4

If you are using VQmod with the default theme:

Code: Select all

    <file name="catalog/view/theme/default/template/common/success.tpl">
        <operation>
            <search position="before"><![CDATA[<?php echo $footer; ?>]]></search>
            <add><![CDATA[
                    <?php if (isset($this->request->get['route']) && $this->request->get['route'] == 'checkout/success') { ?>
                        <!-- tracking code goes here -->
                    <?php } ?>
                ]]></add>
        </operation>
    </file>

New member

Posts

Joined
Wed Apr 04, 2012 6:43 pm

Post by wagner.mrts » Thu Nov 21, 2013 1:47 am

Who wants that created this module adds the conversion code Google AdWords or Analytics page under Success OpenCart.
You can also put on other pages. Just add the route of the page in System -> Design -> Layout
Example routes: account / success
checkout / success

link: [url] http://www.opencart.com/index.php?route ... n_id=14703 [/ url]

Newbie

Posts

Joined
Thu Nov 21, 2013 1:37 am

Post by wagner.mrts » Thu Nov 21, 2013 1:50 am

Who wants that created this module adds the conversion code Google AdWords or Analytics page under Success OpenCart.
You can also put on other pages. Just add the route of the page in System -> Design -> Layout
Example routes: account / success
checkout / success

link: [url] http://www.opencart.com/index.php?route ... n_id=14703 [/ url]

Newbie

Posts

Joined
Thu Nov 21, 2013 1:37 am

Post by blingblingbob » Fri Dec 13, 2013 7:40 am

Will that module work for facebook pixel and can you have several pixels running or only 1?

http://www.streetnpark.com The experts in dialling scooters.


Newbie

Posts

Joined
Thu Aug 02, 2012 6:58 am
Location - Brisbane, Australia

Post by bobmartinusa » Fri Jul 11, 2014 3:04 pm

Hi,

I have made a vqmod for google conversion tracking its an xml file and should be placed in vqmod/xml/ folder.

You need to edit and add your google conversion tracking code from your adwords account to the xml file first, its mentioned in the file where to paste the code. After pasting your code save the file and upload to vqmod/xml/ folder.

Please post response after testing it takes about 24 hrs for results to show in google adwords

Attachments


New member

Posts

Joined
Sat Mar 16, 2013 5:39 pm

Post by surefireweb » Tue Sep 02, 2014 9:55 am

Thanks @bobmartinusa - I think this might help me out with other conversion pixels from affiliate programs like Lyoness as well.

Newbie

Posts

Joined
Mon Jul 28, 2014 4:50 am

Post by sunsys » Tue Feb 10, 2015 3:30 pm

storm-cloud wrote:I finally worked out a solution for this.

In the file catalog/view/theme/*/template/common/success.tpl......

......This can be applied to any success page by changing the route above. This way, the tracking code will only appear when the specified route is triggered avoiding any false conversion reporting.
@storm-cloud:
I very well understand your need to insert the code in the "success page" as you might have an up and running store but what will you advice a new store just starting to do and what will the best place to insert the google code as we will not have the kind of sales as your store. Please advice.

Thank You.

Regards,
Sun Systems
Industrial Electronics and Instrumentation


User avatar
Active Member

Posts

Joined
Tue Jan 27, 2015 5:19 am
Who is online

Users browsing this forum: No registered users and 199 guests