Git Product home page Git Product logo

Comments (9)

migliori avatar migliori commented on August 18, 2024

Hello,

I tried Partytown with Tawk.to too, but without success.

Here's the tawk.to script with Partytown:

    // xxxx is my id, can't share it here
    var Tawk_API = Tawk_API || {},
        Tawk_LoadStart = new Date();
    (function() {
        var s1 = document.createElement("script"),
            s0 = document.getElementsByTagName("script")[0];
        s1.async = true;
        s1.src = 'https://embed.tawk.to/xxxxxx/default';
        s1.charset = 'UTF-8';
        s1.setAttribute('crossorigin', '*');
        s0.parentNode.insertBefore(s1, s0);
    })();
</script>

And here's the browser console (with Partytown debug enabled)

image

Thanks for your help

from partytown.

jesse-deboer avatar jesse-deboer commented on August 18, 2024

Hi! This may be because of a variable '$this' in the script which is being replaced by Partytown.

Could you try it with the version from my PR and see if that helps? #134

from partytown.

migliori avatar migliori commented on August 18, 2024

@jesse-deboer Thanks for trying to help.

It didn't work, but I searched in twk-chunk-common.js to find out what code was involved in the error and found that the problem seems to come from the "navigator", which is not recognized:

for(e=0,t=navigator.plugins.length;e<t;e++) {...}

from partytown.

steve8708 avatar steve8708 commented on August 18, 2024

hey @GaspardC - we've just created an issue template, could you update your issue here to provide all the information the template asks for? it'll help us look into your issue https://github.com/BuilderIO/partytown/issues/new?assignees=&labels=&template=bug_report.md&title=

pasting below to make things easier:


Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Reproduction link
Please include a link to a Stackblitz or Codesandbox reproducing the issue. We will need to see the issue reproduced with hand-written code - we can't debug giant minified third party scripts directly. If you do not include a clean and simple reproduction of your issue, we won't be able to look into it until you do.

Expected behavior
A clear and concise description of what you expected to happen.

Partytown version
What version of Partytown you are using, e.g. 0.0.1

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.

from partytown.

dragansmlinus avatar dragansmlinus commented on August 18, 2024

@steve8708 would you be able to provide a simples example how to integrate partytown and GTM to nextjs app. So far, I'm getting a plenty of CORS issues: Access to fetch at '<URL>' from origin '<URL>' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

from partytown.

steve8708 avatar steve8708 commented on August 18, 2024

@dragansmlinus for CORS issues see this: https://partytown.builder.io/proxying-requests

from partytown.

adamdbradley avatar adamdbradley commented on August 18, 2024

Closing for now as this issue may be dated. Please create a new issue with a repo case for any specific issues. Thanks

from partytown.

ZeldOcarina avatar ZeldOcarina commented on August 18, 2024

Hi! This is still not working today! Do I really need to create a new issue?

from partytown.

tagperfect avatar tagperfect commented on August 18, 2024

Hello,

I tried Partytown with Tawk.to too, but without success.

Here's the tawk.to script with Partytown:

    // xxxx is my id, can't share it here
    var Tawk_API = Tawk_API || {},
        Tawk_LoadStart = new Date();
    (function() {
        var s1 = document.createElement("script"),
            s0 = document.getElementsByTagName("script")[0];
        s1.async = true;
        s1.src = 'https://embed.tawk.to/xxxxxx/default';
        s1.charset = 'UTF-8';
        s1.setAttribute('crossorigin', '*');
        s0.parentNode.insertBefore(s1, s0);
    })();
</script>

And here's the browser console (with Partytown debug enabled)

image

Thanks for your help

Same here, tried different approaches and this helped me to get rid of this error:

<script type="text/partytown"> window.navigator.plugins = window.navigator.plugins || []; </script>

But anyway, chat is not loading

from partytown.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.