Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
1 Beantwoorden
9745 Weergaven

Hi all,


We would like to add some conversion analytics to our webstore. The whole ads/analytics are based on yahoo ads.

If I follow the manual provided by yahoo, Odoo HTML editor won´t accept the changes. For example, on the "web layout" page I wanted to add the specific scrip after the "head" tag - but Odoo won´t let me save my changes.

In general, I only want to add the "site general tag"  and later the "complementary feature tag".

\https://ads-help.yahoo.co.jp/yahooads/ss/articledetail?lan=en&aid=20442#c06

Does anyone have an idea how to accomplish this? We use Odoo SaaS V13.


Thanks and regards,

Mike

Avatar
Annuleer
Beste antwoord

HI Michael Reinhardt

Please use as below.

<template id="website.tshop" name="Tshop" inherit_id="website.theme" priority="1">

    <t t-set="head">

        <!-- Add your JS or CSS here for this particular page. -->

    </t>

</template>

Try it too in case if above one not work.

<template id="layout_inherit" inherit_id="website.layout">
        <xpath expr="//div[@id='wrapwrap']" position="after">
            <script type="text/javascript" id="script-loader" async defer src="//domain.tld/script.js"></script>
        </xpath>
    </template>
Avatar
Annuleer
Auteur

Hi Muhammad,

Many thanks, I will try this.

Regards,

Michael

You Are Most Welcome Sir any time if you happy with my answer accept it as a best answer Thanks.

Auteur

Hi Muhammad,

Thanks again for your help.

I tried but didn´t get it work.

My general approach would be to "web layout" page.

I would like to add the following code (sample):

<script async src="https://s.yimg.jp/images/listing/tool/cv/ytag.js"></script>

<script>

window.yjDataLayer = window.yjDataLayer || [];

function ytag() { yjDataLayer.push(arguments); }

ytag({"type":"ycl_cookie"});

</script>

Now, if I insert it, Odoo doesn´t recognize this part:

<script async src="https://s.yimg.jp/images/listing/tool/cv/ytag.js"></script>

Do you have any idea how my code have to look?

Thank you and regards,

Michael