-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ce5bd23
commit 453e515
Showing
37 changed files
with
331 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package event | ||
|
||
import ( | ||
"github.com/foomo/sesamy-go" | ||
"github.com/foomo/sesamy-go/event/params" | ||
) | ||
|
||
type Click sesamy.Event[params.Click] | ||
|
||
func NewClick(p params.Click) Click { | ||
return Click(sesamy.NewEvent(sesamy.EventNameClick, p)) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package event | ||
|
||
import ( | ||
"github.com/foomo/sesamy-go" | ||
"github.com/foomo/sesamy-go/event/params" | ||
) | ||
|
||
type FileDownload sesamy.Event[params.FileDownload] | ||
|
||
func NewFileDownload(p params.FileDownload) FileDownload { | ||
return FileDownload(sesamy.NewEvent(sesamy.EventNameFileDownload, p)) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package event | ||
|
||
import ( | ||
"github.com/foomo/sesamy-go" | ||
"github.com/foomo/sesamy-go/event/params" | ||
) | ||
|
||
type FormStart sesamy.Event[params.FormStart] | ||
|
||
func NewFormStart(p params.FormStart) FormStart { | ||
return FormStart(sesamy.NewEvent(sesamy.EventNameFormStart, p)) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package event | ||
|
||
import ( | ||
"github.com/foomo/sesamy-go" | ||
"github.com/foomo/sesamy-go/event/params" | ||
) | ||
|
||
type FormSubmit sesamy.Event[params.FormSubmit] | ||
|
||
func NewFormSubmit(p params.FormSubmit) FormSubmit { | ||
return FormSubmit(sesamy.NewEvent(sesamy.EventNameFormSubmit, p)) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,14 @@ | ||
package params | ||
|
||
import ( | ||
"github.com/foomo/gostandards/iso4217" | ||
) | ||
|
||
// AddPaymentInfo https://developers.google.com/analytics/devguides/collection/protocol/ga4/reference/events | ||
type AddPaymentInfo[Item any] struct { | ||
Currency string `json:"currency,omitempty"` | ||
Value float64 `json:"value,omitempty"` | ||
Coupon string `json:"coupon,omitempty"` | ||
PaymentType string `json:"payment_type,omitempty"` | ||
Items []Item `json:"items,omitempty"` | ||
Currency iso4217.Currency `json:"currency,omitempty"` | ||
Value float64 `json:"value,omitempty"` | ||
Coupon string `json:"coupon,omitempty"` | ||
PaymentType string `json:"payment_type,omitempty"` | ||
Items []Item `json:"items,omitempty"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,14 @@ | ||
package params | ||
|
||
import ( | ||
"github.com/foomo/gostandards/iso4217" | ||
) | ||
|
||
// AddShippingInfo https://developers.google.com/analytics/devguides/collection/protocol/ga4/reference/events#add_shipping_info | ||
type AddShippingInfo[Item any] struct { | ||
Currency string `json:"currency,omitempty"` | ||
Value float64 `json:"value,omitempty"` | ||
Coupon string `json:"coupon,omitempty"` | ||
ShippingTier string `json:"shipping_tier,omitempty"` | ||
Items []Item `json:"items,omitempty"` | ||
Currency iso4217.Currency `json:"currency,omitempty"` | ||
Value float64 `json:"value,omitempty"` | ||
Coupon string `json:"coupon,omitempty"` | ||
ShippingTier string `json:"shipping_tier,omitempty"` | ||
Items []Item `json:"items,omitempty"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,12 @@ | ||
package params | ||
|
||
import ( | ||
"github.com/foomo/gostandards/iso4217" | ||
) | ||
|
||
// AddToCart https://developers.google.com/analytics/devguides/collection/protocol/ga4/reference/events#add_to_cart | ||
type AddToCart[Item any] struct { | ||
Currency string `json:"currency,omitempty"` | ||
Value float64 `json:"value,omitempty"` | ||
Items []Item `json:"items,omitempty"` | ||
Currency iso4217.Currency `json:"currency,omitempty"` | ||
Value float64 `json:"value,omitempty"` | ||
Items []Item `json:"items,omitempty"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,12 @@ | ||
package params | ||
|
||
import ( | ||
"github.com/foomo/gostandards/iso4217" | ||
) | ||
|
||
// AddToWishlist https://developers.google.com/analytics/devguides/collection/protocol/ga4/reference/events#add_to_wishlist | ||
type AddToWishlist[Item any] struct { | ||
Currency string `json:"currency,omitempty"` | ||
Value float64 `json:"value,omitempty"` | ||
Items []Item `json:"items,omitempty"` | ||
Currency iso4217.Currency `json:"currency,omitempty"` | ||
Value float64 `json:"value,omitempty"` | ||
Items []Item `json:"items,omitempty"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,15 @@ | ||
package params | ||
|
||
import ( | ||
"github.com/foomo/gostandards/iso4217" | ||
) | ||
|
||
// AdImpression https://developers.google.com/analytics/devguides/collection/protocol/ga4/reference/events#ad_impression | ||
type AdImpression struct { | ||
AdPlatform string `json:"ad_platform,omitempty" mapstructure:"ad_platform"` | ||
AdSource string `json:"ad_source,omitempty" mapstructure:"ad_source"` | ||
AdFormat string `json:"ad_format,omitempty" mapstructure:"ad_format"` | ||
AdUnitName string `json:"ad_unit_name,omitempty" mapstructure:"ad_unit_name"` | ||
Currency string `json:"currency,omitempty" mapstructure:"currency"` | ||
AdPlatform string `json:"ad_platform,omitempty"` | ||
AdSource string `json:"ad_source,omitempty"` | ||
AdFormat string `json:"ad_format,omitempty"` | ||
AdUnitName string `json:"ad_unit_name,omitempty"` | ||
Currency iso4217.Currency `json:"currency,omitempty"` | ||
Value float64 `json:"value,omitempty"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,13 @@ | ||
package params | ||
|
||
import ( | ||
"github.com/foomo/gostandards/iso4217" | ||
) | ||
|
||
// BeginCheckout https://developers.google.com/analytics/devguides/collection/protocol/ga4/reference/events#begin_checkout | ||
type BeginCheckout[Item any] struct { | ||
Currency string `json:"currency,omitempty"` | ||
Value float64 `json:"value,omitempty"` | ||
Coupon string `json:"coupon,omitempty"` | ||
Items []Item `json:"items,omitempty"` | ||
Currency iso4217.Currency `json:"currency,omitempty"` | ||
Value float64 `json:"value,omitempty"` | ||
Coupon string `json:"coupon,omitempty"` | ||
Items []Item `json:"items,omitempty"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package params | ||
|
||
type Click struct { | ||
LinkClasses string `json:"link_classes,omitempty"` | ||
LinkDomain string `json:"link_domain,omitempty"` | ||
LinkID string `json:"link_id,omitempty"` | ||
LinkURL string `json:"link_url,omitempty"` | ||
Outbound bool `json:"outbound,omitempty"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package params | ||
|
||
type FileDownload struct { | ||
FileExtension string `json:"file_extension,omitempty"` | ||
FileName string `json:"file_name,omitempty"` | ||
LinkClasses string `json:"link_classes,omitempty"` | ||
LinkID string `json:"link_id,omitempty"` | ||
LinkText string `json:"link_text,omitempty"` | ||
LinkURL string `json:"link_url,omitempty"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package params | ||
|
||
type FormStart struct { | ||
FormID string `json:"form_id,omitempty"` | ||
FormName string `json:"form_name,omitempty"` | ||
FormDestination string `json:"form_destination,omitempty"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package params | ||
|
||
type FormSubmit struct { | ||
FormID string `json:"form_id,omitempty"` | ||
FormName string `json:"form_name,omitempty"` | ||
FormDestination string `json:"form_destination,omitempty"` | ||
FormSubmitText string `json:"form_submit_text,omitempty"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,11 @@ | ||
package params | ||
|
||
import ( | ||
"github.com/foomo/gostandards/iso4217" | ||
) | ||
|
||
// GenerateLead https://developers.google.com/analytics/devguides/collection/protocol/ga4/reference/events#generate_lead | ||
type GenerateLead struct { | ||
Currency string `json:"currency,omitempty"` | ||
Value float64 `json:"value,omitempty"` | ||
Currency iso4217.Currency `json:"currency,omitempty"` | ||
Value float64 `json:"value,omitempty"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,16 @@ | ||
package params | ||
|
||
import ( | ||
"github.com/foomo/gostandards/iso4217" | ||
) | ||
|
||
// Purchase https://developers.google.com/analytics/devguides/collection/protocol/ga4/reference/events#purchase | ||
type Purchase[Item any] struct { | ||
Currency string `json:"currency,omitempty"` | ||
Value float64 `json:"value,omitempty"` | ||
TransactionID string `json:"transaction_id,omitempty"` | ||
Coupon string `json:"coupon,omitempty"` | ||
Shipping float64 `json:"shipping,omitempty"` | ||
Tax float64 `json:"tax,omitempty"` | ||
Items []Item `json:"items,omitempty"` | ||
Currency iso4217.Currency `json:"currency,omitempty"` | ||
Value float64 `json:"value,omitempty"` | ||
TransactionID string `json:"transaction_id,omitempty"` | ||
Coupon string `json:"coupon,omitempty"` | ||
Shipping float64 `json:"shipping,omitempty"` | ||
Tax float64 `json:"tax,omitempty"` | ||
Items []Item `json:"items,omitempty"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,16 @@ | ||
package params | ||
|
||
import ( | ||
"github.com/foomo/gostandards/iso4217" | ||
) | ||
|
||
// Refund https://developers.google.com/analytics/devguides/collection/protocol/ga4/reference/events#refund | ||
type Refund[Item any] struct { | ||
Currency string `json:"currency,omitempty"` | ||
Value float64 `json:"value,omitempty"` | ||
TransactionID string `json:"transaction_id,omitempty"` | ||
Coupon string `json:"coupon,omitempty"` | ||
Shipping float64 `json:"shipping,omitempty"` | ||
Tax float64 `json:"tax,omitempty"` | ||
Items []Item `json:"items,omitempty"` | ||
Currency iso4217.Currency `json:"currency,omitempty"` | ||
Value float64 `json:"value,omitempty"` | ||
TransactionID string `json:"transaction_id,omitempty"` | ||
Coupon string `json:"coupon,omitempty"` | ||
Shipping float64 `json:"shipping,omitempty"` | ||
Tax float64 `json:"tax,omitempty"` | ||
Items []Item `json:"items,omitempty"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,12 @@ | ||
package params | ||
|
||
import ( | ||
"github.com/foomo/gostandards/iso4217" | ||
) | ||
|
||
// RemoveFromCart https://developers.google.com/analytics/devguides/collection/protocol/ga4/reference/events#remove_from_cart | ||
type RemoveFromCart[Item any] struct { | ||
Currency string `json:"currency,omitempty"` | ||
Value float64 `json:"value,omitempty"` | ||
Items []Item `json:"items,omitempty"` | ||
Currency iso4217.Currency `json:"currency,omitempty"` | ||
Value float64 `json:"value,omitempty"` | ||
Items []Item `json:"items,omitempty"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package params | ||
|
||
type Scroll struct { | ||
EngagementTimeMsec int64 `json:"engagement_time_msec,omitempty"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
package params | ||
|
||
type SessionStart struct{} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
package params | ||
|
||
// UnlockArchievement https://developers.google.com/analytics/devguides/collection/protocol/ga4/reference/events#unlock_achievement | ||
type UnlockArchievement struct { | ||
ArchievementName string `json:"archievement_name"` | ||
// UnlockAchievement https://developers.google.com/analytics/devguides/collection/protocol/ga4/reference/events#unlock_achievement | ||
type UnlockAchievement struct { | ||
ArchievementID string `json:"achievement_id"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package params | ||
|
||
type UserEngagement struct { | ||
EngagementTimeMsec int64 `json:"engagement_time_msec,omitempty"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package params | ||
|
||
type VideoComplete struct { | ||
VideoCurrentTime int64 `json:"video_current_time,omitempty"` | ||
VideoDuration int64 `json:"video_duration,omitempty"` | ||
VideoPercent int64 `json:"video_percent,omitempty"` | ||
VideoProvider string `json:"video_provider,omitempty"` | ||
VideoTitle string `json:"video_title,omitempty"` | ||
VideoURL string `json:"video_url,omitempty"` | ||
Visible bool `json:"visible,omitempty"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package params | ||
|
||
type VideoProgress struct { | ||
VideoCurrentTime int64 `json:"video_current_time,omitempty"` | ||
VideoDuration int64 `json:"video_duration,omitempty"` | ||
VideoPercent int64 `json:"video_percent,omitempty"` | ||
VideoProvider string `json:"video_provider,omitempty"` | ||
VideoTitle string `json:"video_title,omitempty"` | ||
VideoURL string `json:"video_url,omitempty"` | ||
Visible bool `json:"visible,omitempty"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package params | ||
|
||
type VideoStart struct { | ||
VideoCurrentTime int64 `json:"video_current_time,omitempty"` | ||
VideoDuration int64 `json:"video_duration,omitempty"` | ||
VideoPercent int64 `json:"video_percent,omitempty"` | ||
VideoProvider string `json:"video_provider,omitempty"` | ||
VideoTitle string `json:"video_title,omitempty"` | ||
VideoURL string `json:"video_url,omitempty"` | ||
Visible bool `json:"visible,omitempty"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,12 @@ | ||
package params | ||
|
||
import ( | ||
"github.com/foomo/gostandards/iso4217" | ||
) | ||
|
||
// ViewCart https://developers.google.com/analytics/devguides/collection/protocol/ga4/reference/events#view_cart | ||
type ViewCart[Item any] struct { | ||
Currency string `json:"currency,omitempty"` | ||
Value float64 `json:"value,omitempty"` | ||
Items []Item `json:"items,omitempty"` | ||
Currency iso4217.Currency `json:"currency,omitempty"` | ||
Value float64 `json:"value,omitempty"` | ||
Items []Item `json:"items,omitempty"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,12 @@ | ||
package params | ||
|
||
import ( | ||
"github.com/foomo/gostandards/iso4217" | ||
) | ||
|
||
// ViewItem https://developers.google.com/analytics/devguides/collection/protocol/ga4/reference/events#view_item | ||
type ViewItem[Item any] struct { | ||
Currency string `json:"currency,omitempty"` | ||
Value float64 `json:"value,omitempty"` | ||
Items []Item `json:"items,omitempty"` | ||
Currency iso4217.Currency `json:"currency,omitempty"` | ||
Value float64 `json:"value,omitempty"` | ||
Items []Item `json:"items,omitempty"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package event | ||
|
||
import ( | ||
"github.com/foomo/sesamy-go" | ||
"github.com/foomo/sesamy-go/event/params" | ||
) | ||
|
||
type Scroll sesamy.Event[params.Scroll] | ||
|
||
func NewScroll(p params.Scroll) Scroll { | ||
return Scroll(sesamy.NewEvent(sesamy.EventNameScroll, p)) | ||
} |
Oops, something went wrong.