Skip to content

Commit

Permalink
screen_view & ad_impression are no longer reserved event names
Browse files Browse the repository at this point in the history
  • Loading branch information
ikuleshov committed Jan 13, 2025
1 parent 1a1f6a9 commit c4f3c3f
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 34 deletions.
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

0 comments on commit c4f3c3f

Please sign in to comment.