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

Conflict between analytics.js-integration-google-adwords-new and analytics.js-integration-google-analytics-4 #687

Open
ayeletcohen opened this issue Jul 18, 2022 · 0 comments

Comments

@ayeletcohen
Copy link

When using both integrations on the same website, they override each other's window.gtag, so the latter loaded script will override the first one, and the events of the first one will not be reported to the destination.

From analytics.js-integration-google-analytics-4/lib/index.js:

window.gtag = function () {
        window.ga4DataLayer.push(arguments);
    };

From analytics.js-integration-google-adwords-new/lib/index.js:

window.gtag = function() {
    window.dataLayer.push(arguments);
  };
@ayeletcohen ayeletcohen changed the title analytics.js-integration-google-adwords-new and analytics.js-integration-google-analytics-4 conflict Conflict between analytics.js-integration-google-adwords-new and analytics.js-integration-google-analytics-4 Jul 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant