GoodDollar / GoodDAPP

GoodDollar.org Wallet is the simplest access point to Claim your daily G$. It Is based on web3 and React native web.
good-dapp.vercel.app
MIT License
101 stars 52 forks source link

Adjustments in GA4 events in the Wallet ( only web ) #4207

Closed drptiago closed 4 months ago

drptiago commented 5 months ago

Description

We changed the events from GA universal to GA4 in July.

Everything worked until December, when something broke with the web events.

We did a fix in December and this started to send the "standard" GA4 events ( Page view). This event is triggered by the gtag

gtag("event", "page_view", {
  page_location: "https://wallet.gooddollar.org/AppNavigation/Dashboa" +
                 "rd/Send/Amount?route=Home",
  page_referrer: "https://wallet.gooddollar.org/AppNavigation/Dashboa" +
                 "rd/Home?gtm_debug=1706185703594",
  send_to: "G-94ZZEM10YJ"
})

But the other events (claims, transactions, etc) are sending using datalayer:

dataLayer.push({
  event: "SEND_AMOUNT",
  chainId: 42220,
  token: "4f2b83cfbd3457fb6933c3f3c186540b",
  gtm.uniqueEventId: 8
})

As we are not using Google Tag Manager in the wallet, we must to send the events directly:

gtag("event", "SEND_AMOUNT", {
  "chainId": 42220,
  "token": "4f2b83cfbd3457fb6933c3f3c186540b"
});

Supporting data

This is only about the web events, the events from Android still working properly.

Related: https://github.com/GoodDollar/GoodDAPP/issues/4013 https://github.com/GoodDollar/GoodDAPP/pull/4014

L03TJ3 commented 5 months ago

@patpedrosa this in sprint?

L03TJ3 commented 5 months ago

@drptiago this can be verified and tested on prod

drptiago commented 4 months ago

Fixed on production