Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
3ead415
Add the global context object of the GA4 ecommerce demo
ikuleshov Dec 15, 2021
5b6a7b3
Wrap every page using a StoreProvider object used by eCommerce demo.
ikuleshov Feb 16, 2022
a3a55cf
Add CSS variables used by eCommerce demo.
ikuleshov Feb 16, 2022
73d77d2
Add dependencies for eCommerce demo app.
ikuleshov Feb 16, 2022
10270cb
Add "Go to Cart" button component.
ikuleshov Feb 16, 2022
cc368f4
Add "Navigation bar" component.
ikuleshov Feb 16, 2022
3967d5f
Add "header" component.
ikuleshov Feb 16, 2022
aab3e53
Add "footer" component.
ikuleshov Feb 16, 2022
c0715cd
Add "Google Analytics Console" component which displays all ecommerce…
ikuleshov Feb 16, 2022
d32d667
Do not lint CSS
ikuleshov Feb 16, 2022
6e77834
Add support for CSS modules
ikuleshov Feb 16, 2022
33d0ffd
Address type check errors by introducing interfaces.
ikuleshov Feb 17, 2022
6c85156
Address type check errors by introducing interfaces.
ikuleshov Feb 17, 2022
5b5e678
Merge remote-tracking branch 'origin/main'
ikuleshov Feb 17, 2022
f605743
add EOF
ikuleshov Feb 17, 2022
71a02b4
Merge branch 'main' into main
ikuleshov Feb 17, 2022
fc38f1d
Add the product data and images.
ikuleshov Feb 18, 2022
e0a0895
Add "add to cart" button component (does not support choosing product…
ikuleshov Feb 18, 2022
0804264
Add "Numeric input" component which is used to specify the product qu…
ikuleshov Feb 18, 2022
e18fad1
Add "product card" component which displays the product details.
ikuleshov Feb 18, 2022
2317086
Add "product listing" component which displays the grid of products.
ikuleshov Feb 18, 2022
4a4078c
declare external interfaces
ikuleshov Feb 18, 2022
c761d2f
add Product Details page
ikuleshov Feb 18, 2022
3f2a87b
Add the main product gallery page
ikuleshov Feb 18, 2022
6bc27c9
Merge remote-tracking branch 'upstream/main'
ikuleshov Feb 18, 2022
6c217f3
remove unused images
ikuleshov Feb 18, 2022
6e30c7c
Merge pull request #1 from googleanalytics/main
ikuleshov Jan 9, 2023
5951ff8
Remove the option to add an access token to the API query URL.
ikuleshov Feb 9, 2023
57f0a21
Do not specify access token.
ikuleshov Apr 27, 2023
b4e6ac3
Merge branch 'main' of github.com:googleanalytics/ga-dev-tools into g…
ikuleshov Apr 27, 2023
753ea1a
Merge branch 'googleanalytics-main'
ikuleshov Apr 27, 2023
13727c6
Upgrade all dependencies to the latest version.
ikuleshov May 25, 2023
7339a33
Upgrade all dependencies to the latest version.
ikuleshov May 25, 2023
aac26a1
Upgrade all dependencies to the latest version.
ikuleshov Jun 21, 2023
21eefac
Merge remote-tracking branch 'origin/main'
ikuleshov Jun 21, 2023
6468d7a
Upgrade all dependencies to the latest version.
ikuleshov Jul 6, 2023
e8d5aae
Upgrade all dependencies to the latest version. Migrate to MUI5.
ikuleshov Jul 6, 2023
d9b484b
Address check-types errors
ikuleshov Nov 16, 2023
bb75561
Upgrade all dependencies to the latest version.
ikuleshov Nov 16, 2023
f4fffb0
address check-types issues
ikuleshov Nov 16, 2023
aa388cd
Upgrade all dependencies to the latest version.
ikuleshov Nov 16, 2023
d439aa3
Merge upstream changes
ikuleshov Nov 17, 2023
2c4e63e
Upgrade all dependencies to the latest version.
ikuleshov Nov 30, 2023
5b2022b
Set GA4 version by default
ikuleshov Dec 14, 2023
4706499
Add screen_view, ad_impression, campaign_details events to EventBuilder
ikuleshov Apr 25, 2024
f0fc2db
Merge branch 'main' of github.com:ikuleshov/ga-dev-tools
ikuleshov Jan 16, 2025
9bc35c3
screen_view & ad_impression are no longer reserved event names
ikuleshov Jan 16, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
// Event and required property mapping

export const eventDefinitions = {
"ad_impression": [],
"add_payment_info": ["value", "items"],
"add_shipping_info": ["value", "items"],
"add_to_cart": ["value", "items"],
"add_to_wishlist": ["value", "items"],
"begin_checkout": ["value", "items"],
"campaign_details": [],
"earn_virtual_currency": [],
"generate_lead": ["value"],
"join_group": [],
Expand Down
30 changes: 0 additions & 30 deletions src/components/ga4/EventBuilder/event.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,19 +50,6 @@ const eventFor = (

const custom_event = eventFor(EventType.CustomEvent, [Category.Custom], [], [])

const ad_impression = eventFor(
EventType.AdImpression,
[Category.AllApps],
[
stringParam("ad_platform", "MoPub"),
stringParam("ad_source", "AdColony"),
stringParam("ad_format", "Banner"),
stringParam("ad_unit_name", "Banner_03"),
stringParam("currency", "USD"),
numberParam("value", 3.99),
]
)

const add_payment_info = eventFor(
EventType.AddPaymentInfo,
[Category.RetailEcommerce],
Expand Down Expand Up @@ -172,19 +159,6 @@ const begin_checkout = eventFor(
]
)

const campaign_details = eventFor(
EventType.CampaignDetails,
[Category.AllApps],
[
stringParam("campaign_id", "SUMMER_FUN"),
stringParam("campaign", "Summer_fun"),
stringParam("source", "google"),
stringParam("medium", "cpc"),
stringParam("term", "summer+travel"),
stringParam("content", "logolink"),
]
)

const earn_virtual_currency = eventFor(
EventType.EarnVirtualCurrency,
[Category.AllApps],
Expand Down Expand Up @@ -524,8 +498,6 @@ export const suggestedEventFor = (eventType: EventType): Event2 => {
case EventType.CustomEvent:
return custom_event

case EventType.AdImpression:
return ad_impression
case EventType.AddPaymentInfo:
return add_payment_info
case EventType.AddShippingInfo:
Expand All @@ -536,8 +508,6 @@ export const suggestedEventFor = (eventType: EventType): Event2 => {
return add_to_wishlist
case EventType.BeginCheckout:
return begin_checkout
case EventType.CampaignDetails:
return campaign_details
case EventType.EarnVirtualCurrency:
return earn_virtual_currency
case EventType.GenerateLead:
Expand Down
2 changes: 0 additions & 2 deletions src/components/ga4/EventBuilder/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,11 @@ export enum Category {

export enum EventType {
CustomEvent = "custom_event",
AdImpression = "ad_impression",
AddPaymentInfo = "add_payment_info",
AddShippingInfo = "add_shipping_info",
AddToCart = "add_to_cart",
AddToWishlist = "add_to_wishlist",
BeginCheckout = "begin_checkout",
CampaignDetails = "campaign_details",
EarnVirtualCurrency = "earn_virtual_currency",
GenerateLead = "generate_lead",
JoinGroup = "join_group",
Expand Down
Loading