Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[🐞] GTM doesnt work #608

Closed
musashiM82 opened this issue Jul 17, 2024 · 3 comments
Closed

[🐞] GTM doesnt work #608

musashiM82 opened this issue Jul 17, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@musashiM82
Copy link

musashiM82 commented Jul 17, 2024

Describe the bug

Hi
google tag mananger doesn't work from yesterday.
below you can find code that I used from two years and tag injection doesnt work from yesterday.
I dont see any tag (pixel, analytics or custom) in the DOM.

what is the problem?

thanks

Reproduction

Steps to reproduce

<script type="text/javascript">
        partytown = {
            forward: ["dataLayer.push","fbq"],
            resolveUrl: function (url, location, type) {
                var proxyMap = {"static.ads-twitter.com":{"hostname":"*******","pathname":"/twitter"},"connect.facebook.net":{"hostname":"*********","pathname":"/facebook"}}
                if (type === 'script' && proxyMap[url.hostname]) {
                    url.pathname = proxyMap[url.hostname].pathname + url.pathname
                    url.hostname = proxyMap[url.hostname].hostname;
                }
                return url;
            },
        };
    </script>
<script src="/30/~partytown/partytown.js?v_=5"></script>
    <script type="text/partytown">(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
              new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
              j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
              'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
              })(window,document,'script','dataLayer','********');
    </script>

Browser Info

chrome firefox

Additional Information

using @builder.io/partytown 0.7.2

No response

@musashiM82 musashiM82 added the bug Something isn't working label Jul 17, 2024
@musashiM82
Copy link
Author

solved upgrading partytown

@dathacky
Copy link

dathacky commented Sep 4, 2024

+1
version 0.10.2

@dathacky
Copy link

dathacky commented Sep 4, 2024

What version are you using? @musashiM82

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants