Jump to content

[Solved] Help to setup Plausible analytics


WebWeber

Recommended Posts

I've been trying to setup Plausible.io but fail in integrating it 😂

There is a documentation and the whole magic should be to insert this snippet:

<script async defer data-domain="my-prestashop.de" src="https://plausible.io/js/plausible.js"></script>

into

Quote

the Header (<head>) section of your site. Place the tracking script within the <head> … </head> tags.

I tried to add it into

/themes/classic/templates/_partials/head.tpl and

/themes/classic/templates/_partials/header.tpl

but didn't succeed. Somehow they both don't contain a clear <head>-section.

Can anyone hint me where to add this code?

Edited by WebWeber (see edit history)
Link to comment
Share on other sites

Hi,

you should add it at the end of /themes/classic/templates/_partials/head.tpl  , as last lines as the following :

{literal}
<script async defer data-domain="my-prestashop.de" src="https://plausible.io/js/plausible.js"></script>
{/literal}

In a standard prestashop 1.7, the <head> ... </head> section is in the themes/classic/templates/layouts/layout-both-columns.tpl , which includes in the head the head.tpl , so if in your classic theme's head.tpl and header.tpl there is a clear <head>... </head> section, that means that there is something wrong there.

You can paste or attach here your head.tpl file's content just to be sure that there is nothing wrong.

Kind regards, Leo

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...