partytown icon indicating copy to clipboard operation
partytown copied to clipboard

Tracking Issues From GTM

Open taiducnguyen opened this issue 3 years ago • 2 comments

Hi team,

I'm trying to integrate with GTM and we found some issues as below: Here is my configuration:

<script>
    var partytown = {
        lib: '/ui/build/partytown/',
        forward: [
            'dataLayer.push',
            'fbq'
        ],
        resolveUrl(url, location) {
            if (
                url.hostname.includes('google-analytics') ||
                url.hostname.includes('connect.facebook.net')
            ) {
                const proxyUrl = new URL(self.location.origin + "/api/proxy-api/getexternal");
                console.log('proxyUrl', proxyUrl);
                console.log('url.href', url.href);
                console.log('url', url);

                proxyUrl.searchParams.append("url", url.href);
                return proxyUrl;
            }
            return url;
        },
        debug: true,
    };
</script>

<script src="~/ui/build/partytown/partytown.js"></script>

There are some issues I found:

  • trackVideo is not defined, this function is defined in GTM but throws the error, I don't know why image image
  • Pinterest issue when we do integrate via GTM image

Could you please take a look and give me suggestions to resolve those issues?

taiducnguyen avatar May 18 '22 04:05 taiducnguyen

hey @taiducnguyen - 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.

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

Additional context Add any other context about the problem here.

steve8708 avatar May 28 '22 19:05 steve8708

@taiducnguyen Did you fix it ? If you did can you share how please ?

ilkerunal avatar Dec 27 '22 13:12 ilkerunal