Next.js Discord

Discord Forum

@next/third-parties: GA has not been initialized

Unanswered
Yacare Caiman posted this in #help-forum
Open in Discord
Yacare CaimanOP
I was trying to use GTM but when I try to trigger an event I get the error above:
 sendGTMEvent({
      event: "booking",
      id,
      date,
    });

I also added this in the _app.js (i'm using next with pages)

      <GoogleTagManager gtmId={process.env.NEXT_PUBLIC_GTM_ID} />

0 Replies