Skip to content
This repository has been archived by the owner on Apr 28, 2022. It is now read-only.

ga() function undefined in ready callback #652

Open
kochis opened this issue Dec 14, 2020 · 1 comment
Open

ga() function undefined in ready callback #652

kochis opened this issue Dec 14, 2020 · 1 comment

Comments

@kochis
Copy link

kochis commented Dec 14, 2020

I'm trying to add a ga('require', '...') call as part of our Google Analytics integration, but having trouble access the function when GA is being loaded with segment (works fine when loaded via script tag). This is what I have

window.analytics.ready(function() {
  ga('require', 'Clearbit', { ... });
});

But ga is always undefined in this context. I'm following the docs here: https://segment.com/docs/connections/destinations/catalog/google-analytics/#multiple-trackers

Is there another way to access the underlying ga function? Or something that needs to be changed about the way GA is loaded / configured? Also apologies if this isn't the best place for these types of questions.

@akonwi
Copy link

akonwi commented Sep 8, 2021

I've started seeing this in my application as well since enabling Analytics 2.0

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants