# Tracking code causes prestashop blank front page (mistake in copy/paste?)

**URL:** <https://forum.mautic.org/t/tracking-code-causes-prestashop-blank-front-page-mistake-in-copy-paste/8193>\
**Category:** Product Support\
**Created:** [April 12, 2017, 10:15am UTC](https://forum.mautic.org/t/tracking-code-causes-prestashop-blank-front-page-mistake-in-copy-paste/8193 "2017-04-12T10:15:30Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![annafjmorris](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/annafjmorris/32/561_2.png) [@annafjmorris](https://forum.mautic.org/u/annafjmorris)\
**Post date:** [April 12, 2017, 10:15am UTC](https://forum.mautic.org/t/tracking-code-causes-prestashop-blank-front-page-mistake-in-copy-paste/8193/1 "2017-04-12T10:15:30Z")

</div>

Hi, I have tried a few times now to add the mautic JS tracking code to my store, as a temporary measure I need to do it manually. My store platform is out of date, when I upgrade in a few months I will be able to use a plugin. The problem I have is that it causes my products to vanish from my home page, usually this is caused by a missing or } or something.  
  
  
  
This is what my site usually looks like  
  
  
  
 ![problem-1.png](http://www.ethical-pets.co.uk/themes/ethicalpets/add_images/problem-1.png)  
  
  
  
This is the code I added in (bottom left)  
  
  
  
 ![problem-2.png](http://www.ethical-pets.co.uk/themes/ethicalpets/add_images/problem-2.png)  
  
  
  
This is the outcome.  
  
  
  
 ![problem-3.png](http://www.ethical-pets.co.uk/themes/ethicalpets/add_images/problem-3.png)  
  
  
  
Last time I tried I tried a few other things but result was always the same. My knowledge of php and html is low, however I am used to adding tracking codes (google/facebook etc)

---

<div class="post-metadata">

**Author:** ![annafjmorris](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/annafjmorris/32/561_2.png) [@annafjmorris](https://forum.mautic.org/u/annafjmorris)\
**Post date:** [April 12, 2017, 10:15am UTC](https://forum.mautic.org/t/tracking-code-causes-prestashop-blank-front-page-mistake-in-copy-paste/8193/2 "2017-04-12T10:15:30Z")

</div>

Hi, I have tried a few times now to add the mautic JS tracking code to my store, as a temporary measure I need to do it manually. My store platform is out of date, when I upgrade in a few months I will be able to use a plugin. The problem I have is that it causes my products to vanish from my home page, usually this is caused by a missing or } or something.

This is what my site usually looks like

![](http://www.ethical-pets.co.uk/themes/ethicalpets/add_images/problem-1.png)

This is the code I added in (bottom left)

![](http://www.ethical-pets.co.uk/themes/ethicalpets/add_images/problem-2.png)

This is the outcome.

![](http://www.ethical-pets.co.uk/themes/ethicalpets/add_images/problem-3.png)

Last time I tried I tried a few other things but result was always the same. My knowledge of php and html is low, however I am used to adding tracking codes (google/facebook etc)

---

<div class="post-metadata">

**Author:** ![redneckbob](https://avatars.discourse-cdn.com/v4/letter/r/73ab20/32.png) [@redneckbob](https://forum.mautic.org/u/redneckbob)\
**Post date:** [April 13, 2017, 12:26am UTC](https://forum.mautic.org/t/tracking-code-causes-prestashop-blank-front-page-mistake-in-copy-paste/8193/3 "2017-04-13T00:26:15Z")

</div>

Can you make a copy of that page, insert the tracking script, verify that it is broken, and then post a link here?

We can look directly at the HTML and check out the page with some of the web development tools.

---

<div class="post-metadata">

**Author:** ![annafjmorris](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/annafjmorris/32/561_2.png) [@annafjmorris](https://forum.mautic.org/u/annafjmorris)\
**Post date:** [April 13, 2017, 8:23am UTC](https://forum.mautic.org/t/tracking-code-causes-prestashop-blank-front-page-mistake-in-copy-paste/8193/4 "2017-04-13T08:23:36Z")

</div>

Hi, sure, I will need a little guidance on doing that. I tried opening the page in my browser, doing right click view page source and saving that as a html file, however, it comes out without a lot of formatting. The index page I view/edit in using my ftp client is a .tpl file. Can you let me know how I should proceed. Thanks for your help.

---

<div class="post-metadata">

**Author:** ![annafjmorris](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/annafjmorris/32/561_2.png) [@annafjmorris](https://forum.mautic.org/u/annafjmorris)\
**Post date:** [April 13, 2017, 8:23am UTC](https://forum.mautic.org/t/tracking-code-causes-prestashop-blank-front-page-mistake-in-copy-paste/8193/5 "2017-04-13T08:23:52Z")

</div>

The page is [www.ethical-pets.co.uk](http://www.ethical-pets.co.uk), if that helps

---

<div class="post-metadata">

**Author:** ![redneckbob](https://avatars.discourse-cdn.com/v4/letter/r/73ab20/32.png) [@redneckbob](https://forum.mautic.org/u/redneckbob)\
**Post date:** [April 14, 2017, 5:56am UTC](https://forum.mautic.org/t/tracking-code-causes-prestashop-blank-front-page-mistake-in-copy-paste/8193/6 "2017-04-14T05:56:42Z")

</div>

Kind of surprised your page works at all, for some odd reason you have a HTML page in the middle of a HTML page. Not sure how it got there, but everything in bold needs to be removed.

Could be when you copy-paste in the Mautic tracking code you’re grabbing more than just the tracking code.

-RB

[b]

 Test [/b]

` 

[![](http://ethical-pets.co.uk/themes/ethicalpets/add_images/logo_small_crop.png)](http://gingerling-design.co.uk/)

[![ethical web hosting](http://www.ethical-pets.co.uk/themes/ethicalpets/add_images/GreenNet_logo_rgb.png)](https://www.greennet.org.uk/)

```
</div>

```

[b]

[/b]

---

<div class="post-metadata">

**Author:** ![annafjmorris](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/annafjmorris/32/561_2.png) [@annafjmorris](https://forum.mautic.org/u/annafjmorris)\
**Post date:** [April 25, 2017, 6:25pm UTC](https://forum.mautic.org/t/tracking-code-causes-prestashop-blank-front-page-mistake-in-copy-paste/8193/7 "2017-04-25T18:25:45Z")

</div>

Hi, I really can’t thank you enough for showing me this issue, I suspect a) it’s been like that for a while and b) it’s been the cause of various issues. that have annoyed me. I am not sure how it got like that, I may have done it a while ago myself and not realised it was an issue, I don’t know much about php and tpl files etc. I fixed the issue as you described. Anyway, it turns out the place I needed to put the code was actually in the footer.tpl and now it’s working fine!

So, for future reference for anyone who wants to know

To embed a mautic tracking code in a prestashop page either

a) use a plugin or  
b) manually paste it below the tag in the footer.tpl file (found in themes \> your theme)
