Post by greenspaceyoga » Mon May 20, 2013 3:37 pm

Hi,
I would like to place a html tracking code from Quantcast in my eshop for tracking and statistics. Normally Quantcast advise to place the code just before the </body> tag and any other measurement tags in your html page.

Opencart has a index.php where the index.html would normally be. I am not a php expert so I am not sure how to integrate this html tracking code into opencart.

Here is the example:-

https://www.quantcast.com/wp-content/up ... ement2.png

Could someone tell me how I can intergrate the tracking code, where to integrate, and code changes or additions if necessary?

Thanks

http://www.greenspacestore.com
Last edited by greenspaceyoga on Wed May 22, 2013 11:44 pm, edited 1 time in total.


Posts

Joined
Tue Apr 30, 2013 4:23 pm

Post by esefrsv » Mon May 20, 2013 4:07 pm

You should put the code before the </body> tag in your "catalog/view/theme/default/template/common/footer.tpl".
Obviously change "default" to whatever theme you're using.

Single-handedly supporting the ambidextrous


User avatar
New member

Posts

Joined
Sat May 28, 2011 11:03 pm
Location - Stockholm, Sweden

Post by greenspaceyoga » Mon May 20, 2013 4:46 pm

Hi,
Thanks for the feedback. Please can you detail more?

1. I am using a modified theme template (Multistore responsive theme), you said I should put the code before the </body> tag in your "catalog/view/theme/default/template/common/footer.tpl". Should I still use the default theme folder or should I use the theme folder that I am using ""catalog/view/theme/multistore/template/common/footer.tpl"?

2. I would just like to check that this is correct - I can see there is one </body> tag at the end of the footer.tpl. Should I put it there, just before it (and after the lines "Please donate via PayPal to donate@opencart.com
//--></div>")

Code: Select all

<div id="footer">
  <?php if ($informations) { ?>
  <div class="column">
    <h3><?php echo $text_information; ?></h3>
    <ul>
      <?php foreach ($informations as $information) { ?>
      <li><a href="<?php echo $information['href']; ?>"><?php echo $information['title']; ?></a></li>
      <?php } ?>
    </ul>
  </div>
  <?php } ?>
  <div class="column">
    <h3><?php echo $text_service; ?></h3>
    <ul>
      <li><a href="<?php echo $contact; ?>"><?php echo $text_contact; ?></a></li>
      <li><a href="<?php echo $return; ?>"><?php echo $text_return; ?></a></li>
      <li><a href="<?php echo $sitemap; ?>"><?php echo $text_sitemap; ?></a></li>
    </ul>
  </div>
  <div class="column">
    <h3><?php echo $text_extra; ?></h3>
    <ul>
      <li><a href="<?php echo $manufacturer; ?>"><?php echo $text_manufacturer; ?></a></li>
      <li><a href="<?php echo $voucher; ?>"><?php echo $text_voucher; ?></a></li>
      <li><a href="<?php echo $affiliate; ?>"><?php echo $text_affiliate; ?></a></li>
      <li><a href="<?php echo $special; ?>"><?php echo $text_special; ?></a></li>
    </ul>
  </div>
  <div class="column">
    <h3><?php echo $text_account; ?></h3>
    <ul>
      <li><a href="<?php echo $account; ?>"><?php echo $text_account; ?></a></li>
      <li><a href="<?php echo $order; ?>"><?php echo $text_order; ?></a></li>
      <li><a href="<?php echo $wishlist; ?>"><?php echo $text_wishlist; ?></a></li>
      <li><a href="<?php echo $newsletter; ?>"><?php echo $text_newsletter; ?></a></li>
    </ul>
  </div>
</div>
<!--
OpenCart is open source software and you are free to remove the powered by OpenCart if you want, but its generally accepted practise to make a small donation.
Please donate via PayPal to donate@opencart.com
//-->
<div id="powered"><?php echo $powered; ?></div>
<!--
OpenCart is open source software and you are free to remove the powered by OpenCart if you want, but its generally accepted practise to make a small donation.
Please donate via PayPal to donate@opencart.com
//-->
</div>
</body></html>
Thanks again for any help

Much appreciated

http://www.greenspacestore.com


Posts

Joined
Tue Apr 30, 2013 4:23 pm

Post by esefrsv » Mon May 20, 2013 8:29 pm

1 yes
and
2 yes

:)

Single-handedly supporting the ambidextrous


User avatar
New member

Posts

Joined
Sat May 28, 2011 11:03 pm
Location - Stockholm, Sweden

Post by greenspaceyoga » Mon May 20, 2013 8:49 pm

Thanks so much for the help.

I put the code between </div> and </body> on the file located at catalog/view/theme/default/template/common/footer.tpl

Hopefully it is all correct and the tracker is recognised.

Thanks again


Posts

Joined
Tue Apr 30, 2013 4:23 pm

Post by esefrsv » Mon May 20, 2013 10:22 pm

I don't think I read your previous post right...
You should put the code in the footer.tpl of the theme you're using.
So, not the default, but the multistore...

Sorry.

Single-handedly supporting the ambidextrous


User avatar
New member

Posts

Joined
Sat May 28, 2011 11:03 pm
Location - Stockholm, Sweden

Post by greenspaceyoga » Wed May 22, 2013 11:44 pm

thanks for the help, it sorted it out. (On the custom template)


Posts

Joined
Tue Apr 30, 2013 4:23 pm
Who is online

Users browsing this forum: No registered users and 17 guests