Jump to content

SOLVED - Tracking snippet


Recommended Posts

  • 3 weeks later...

Hi :)

add this code in footer.tpl before the closing </body> tag

{if $page_name == 'index'} YOUR TRACKING CODE HERE {/if}

This will add the code to the homepage,

if you want to tack all pages, just add the code without the {if}

 

Cheers :)

Link to comment
Share on other sites

Here os the code of footer. I don't see even begining of code <body> or <html>

 

{if !$content_only}

</div>

<!-- Right -->

<div id="right_column" class="column">{$HOOK_RIGHT_COLUMN}</div>

<div class="clearblock"></div>

</div>

<!-- Footer -->

<div id="footer_wrapper">

<div id="footer">

{$HOOK_FOOTER}

<!-- [[%FOOTER_LINK]] -->

</div>

</div>

</div>

</div>

</div>

{/if}

</body>

</html>

Link to comment
Share on other sites

Hi,

as I thought, you need to learn few things about prestashop and smarty.

In this perticular case, you need to know that the "main" html structure of the preastashop template, consist out of 2 files -header.tpl and footer.tpl . All the hooks are basically placed in these files, and the <body> tag is opened in the header.tpl and closed in the footer.tpl, as you can see:

</div>

</div>

</body>

</html>

 

 

To achive what you want, just do what I told you, place this code in footer.tpl before the closing </body> tag

 

{if $page_name == 'index'} *YOUR TRACKING CODE HERE* {/if}

 

I believe that this topic is now [sOLVED]. If you have any questions, feel free to PM me.

 

I'll be happy if you "like" my post, if it was helpfull to you. Thanks ! :)

Link to comment
Share on other sites

Thank you for you reply. I did what you said, but it still does now work. I paste it without if statemnt.

 

{if !$content_only}

</div>

<!-- Right -->

<div id="right_column" class="column">{$HOOK_RIGHT_COLUMN}</div>

<div class="clearblock"></div>

</div>

<!-- Footer -->

<div id="footer_wrapper">

<div id="footer">

{$HOOK_FOOTER}

<!-- [[%FOOTER_LINK]] -->

</div>

</div>

</div>

</div>

</div>

{/if}

 

 

 

 

</body>

</html>

 

I don't see it in source code either.

Link to comment
Share on other sites

Hi,

it seems like you have another thing to learn about presta :) When you make changes to the tpl files, you need to recompile them, so the changes take effect.

Just make sure that the theme you currently use is in the folder /theme205/, and then turn force compile to on, to recompile the .tpl files.(Preferences->Performance)

 

After you do that, please post a link, so I can check if the code is there.

  • Like 1
Link to comment
Share on other sites

Hi :)

You also need to instal the module "RSS products feed", and get that url from it.

 

Let me know if this solves it for you.

 

If it does, dont forget to add [solved] in the topic name, and I'll be happy if you "like" my comments, if they were helpfull to you. Thanks !

  • Like 1
Link to comment
Share on other sites

Dont know why I thought that RSS Block will create a block for subscribeing to your feed, when actually this block displays rss feed, and obviously cant display feed from your site.

My mistake

 

What you actually wanna do, display some other feed or just add button for subscribing to your product rss feed ?

 

I think its not the first, because if it was, you was going to configure the module right away.

So if you wanna make the rss button for subscribing, then just find some nicelooking rss icon, put it somewhere in your design and add your product rss feed url as a link to it.

 

(p.s just in case you wanna display your feed on your site -

you dont need that, use new products block )

Link to comment
Share on other sites

×
×
  • Create New...