logEvent method

The ‘developer documentation’* to implement GA4 Retail/Ecommerce events only has examples using the gtag method (sample below).

However the ‘Expo FirebaseAnalytics documentation’** recommends to use the logEvent method instead.

Could you hence please suggest if there is any GA4 developer documentation using logEvent method instead? I am simply not getting now to use the logEvent syntax.

EXAMPLE (referred in point 1)
gtag(‘event’, ‘add_to_cart’, {
currency: ‘USD’,
items: [{
item_id: ‘SKU_12345’,
item_name: ‘jeggings’,
coupon: ‘SUMMER_FUN’,
discount: 2.22,
affiliation: ‘Google Store’,
item_brand: ‘Gucci’,
item_category: ‘pants’,
item_variant: ‘black’,
price: 9.99,
currency: ‘USD’,
quantity: 1
value: 7.77

Please let me know.


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.