event

package
v0.1.25 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 12, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddPaymentInfo

type AddPaymentInfo 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"`
}

AddPaymentInfo https://developers.google.com/tag-platform/gtagjs/reference/events#add_payment_info

gtag('event', 'add_payment_info', {
	currency: 'USD',
	value: 30.03,
	coupon: 'SUMMER_FUN',
	payment_type: 'Credit Card',
	items: [
		{
			item_id: 'SKU_12345',
			item_name: 'Stan and Friends Tee',
			affiliation: 'Google Store',
			coupon: 'SUMMER_FUN',
			discount: 2.22,
			index: 5,
			item_brand: 'Google',
			item_category: 'Apparel',
			item_category2: 'Adult',
			item_category3: 'Shirts',
			item_category4: 'Crew',
			item_category5: 'Short sleeve',
			item_list_id: 'related_products',
			item_list_name: 'Related products',
			item_variant: 'green',
			location_id: 'ChIJIQBpAG2ahYAR_6128GcTUEo',
			price: 10.01,
			quantity: 3
		}
	]
});

Query: v=2&tid=G-123456&gtm=45je42t1v9177778896z89175355532za200&_p=1709325262551&gcd=13l3l3l3l1&npa=0&dma_cps=sypham&dma=1&cid=1220643501.1708014725&ul=en-us&sr=3840x1600&_fplc=0&ur=DE-BY&uaa=arm&uab=64&uafvl=Chromium%3B122.0.6261.69%7CNot(A%253ABrand%3B24.0.0.0%7CGoogle%2520Chrome%3B122.0.6261.69&uamb=0&uam=&uap=macOS&uapv=14.3.1&uaw=0&are=1&pscdl=noapi&_eu=IA&sst.uc=DE&sst.etld=google.de&sst.gcsub=region1&sst.gcd=13l3l3l3l1&sst.tft=1709325262551&_s=5&cu=USD&sid=1709445696&sct=8&seg=0&dl=https%3A%2F%2Fsniffer.local.bestbytes.net%2F&dt=Server%20Side%20Tracking%20Prototype%20(codename%3A%20sniffer)&en=add_payment_info&_ss=1&pr1=idSKU_12345~nmStan%20and%20Friends%20Tee~afGoogle%20Store~cpSUMMER_FUN~ds2.22~lp5~brGoogle~caApparel~c2Adult~c3Shirts~c4Crew~c5Short%20sleeve~lirelated_products~lnRelated%20products~vagreen~loChIJIQBpAG2ahYAR_6128GcTUEo~pr10.01~qt3&epn.value=30.03&ep.coupon=SUMMER_FUN&ep.payment_type=Credit%20Card&tfd=120434230&richsstsse

func (*AddPaymentInfo) MarshalMPv2 added in v0.1.8

func (e *AddPaymentInfo) MarshalMPv2() (*mpv2.Event, error)

type AddShippingInfo

type AddShippingInfo 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"`
}

AddShippingInfo https://developers.google.com/tag-platform/gtagjs/reference/events#add_shipping_info

gtag('event', 'add_payment_info', {
	currency: 'USD',
	value: 30.03,
	coupon: 'SUMMER_FUN',
	shipping_tier: 'Ground',
	items: [
		{
			item_id: 'SKU_12345',
			item_name: 'Stan and Friends Tee',
			affiliation: 'Google Store',
			coupon: 'SUMMER_FUN',
			discount: 2.22,
			index: 5,
			item_brand: 'Google',
			item_category: 'Apparel',
			item_category2: 'Adult',
			item_category3: 'Shirts',
			item_category4: 'Crew',
			item_category5: 'Short sleeve',
			item_list_id: 'related_products',
			item_list_name: 'Related products',
			item_variant: 'green',
			location_id: 'ChIJIQBpAG2ahYAR_6128GcTUEo',
			price: 10.01,
			quantity: 3
		}
	]
});

Query: v=2&tid=G-PZ5ELRCR31&gtm=45je42t1v9177778896z89175355532za220&_p=1709357665402&_dbg=1&gcd=13l3l3l3l1&npa=0&dma_cps=sypham&dma=1&cid=1220643501.1708014725&ul=en-us&sr=3840x1600&_fplc=0&ur=DE-BY&uaa=arm&uab=64&uafvl=Chromium%3B122.0.6261.69%7CNot(A%253ABrand%3B24.0.0.0%7CGoogle%2520Chrome%3B122.0.6261.69&uamb=0&uam=&uap=macOS&uapv=14.3.1&uaw=0&are=1&pscdl=noapi&_eu=IA&sst.uc=DE&sst.etld=google.de&sst.gcsub=region1&sst.gcd=13l3l3l3l1&sst.tft=1709357665402&_s=10&cu=USD&sid=1709529821&sct=9&seg=0&dl=https%3A%2F%2Fsniffer.local.bestbytes.net%2F%3Fgtm_debug%3D1709357665301&dr=https%3A%2F%2Ftagassistant.google.com%2F&dt=Server%20Side%20Tracking%20Prototype%20(codename%3A%20sniffer)&en=add_payment_info&_ss=1&pr1=idSKU_12345~nmStan%20and%20Friends%20Tee~afGoogle%20Store~cpSUMMER_FUN~ds2.22~lp5~brGoogle~caApparel~c2Adult~c3Shirts~c4Crew~c5Short%20sleeve~lirelated_products~lnRelated%20products~vagreen~loChIJIQBpAG2ahYAR_6128GcTUEo~pr10.01~qt3&epn.value=30.03&ep.coupon=SUMMER_FUN&ep.shipping_tier=Ground&tfd=137238301&richsstsse

func (*AddShippingInfo) MarshalMPv2 added in v0.1.8

func (e *AddShippingInfo) MarshalMPv2() (*mpv2.Event, error)

type AddToCart

type AddToCart struct {
	Currency string  `json:"currency,omitempty"`
	Value    float64 `json:"value,omitempty"`
	Items    []*Item `json:"items,omitempty"`
}

AddToCart https://developers.google.com/tag-platform/gtagjs/reference/events#add_to_cart

gtag('event', 'add_to_cart', {
	currency: 'USD',
	value: 30.03,
	items: [
		{
			item_id: 'SKU_12345',
			item_name: 'Stan and Friends Tee',
			affiliation: 'Google Store',
			coupon: 'SUMMER_FUN',
			discount: 2.22,
			index: 5,
			item_brand: 'Google',
			item_category: 'Apparel',
			item_category2: 'Adult',
			item_category3: 'Shirts',
			item_category4: 'Crew',
			item_category5: 'Short sleeve',
			item_list_id: 'related_products',
			item_list_name: 'Related products',
			item_variant: 'green',
			location_id: 'ChIJIQBpAG2ahYAR_6128GcTUEo',
			price: 10.01,
			quantity: 3
		}
	]
});

Query: v=2&tid=G-PZ5ELRCR31&gtm=45je42t1v9177778896z89175355532za200&_p=1709325262551&gcd=13l3l3l3l1&npa=0&dma_cps=sypham&dma=1&cid=1220643501.1708014725&ul=en-us&sr=3840x1600&_fplc=0&ur=DE-BY&uaa=arm&uab=64&uafvl=Chromium%3B122.0.6261.69%7CNot(A%253ABrand%3B24.0.0.0%7CGoogle%2520Chrome%3B122.0.6261.69&uamb=0&uam=&uap=macOS&uapv=14.3.1&uaw=0&are=1&pscdl=noapi&_eu=IA&sst.uc=DE&sst.etld=google.de&sst.gcsub=region1&sst.gcd=13l3l3l3l1&sst.tft=1709325262551&_s=3&cu=USD&sid=1709324719&sct=6&seg=1&dl=https%3A%2F%2Fsniffer.local.bestbytes.net%2F&dt=Server%20Side%20Tracking%20Prototype%20(codename%3A%20sniffer)&en=add_to_cart&pr1=idSKU_12345~nmStan%20and%20Friends%20Tee~afGoogle%20Store~cpSUMMER_FUN~ds2.22~lp5~brGoogle~caApparel~c2Adult~c3Shirts~c4Crew~c5Short%20sleeve~lirelated_products~lnRelated%20products~vagreen~loChIJIQBpAG2ahYAR_6128GcTUEo~pr10.01~qt3&epn.value=30.03&_et=3187&tfd=11387&richsstsse

func (*AddToCart) MarshalMPv2 added in v0.1.8

func (e *AddToCart) MarshalMPv2() (*mpv2.Event, error)

type AddToWishlist

type AddToWishlist struct {
	Currency string  `json:"currency,omitempty"`
	Value    float64 `json:"value,omitempty"`
	Items    []*Item `json:"items,omitempty"`
}

AddToWishlist https://developers.google.com/tag-platform/gtagjs/reference/events#add_to_wishlist

gtag('event', 'add_to_wishlist', {
	currency: 'USD',
	value: 30.03,
	items: [
		{
			item_id: 'SKU_12345',
			item_name: 'Stan and Friends Tee',
			affiliation: 'Google Store',
			coupon: 'SUMMER_FUN',
			discount: 2.22,
			index: 5,
			item_brand: 'Google',
			item_category: 'Apparel',
			item_category2: 'Adult',
			item_category3: 'Shirts',
			item_category4: 'Crew',
			item_category5: 'Short sleeve',
			item_list_id: 'related_products',
			item_list_name: 'Related products',
			item_variant: 'green',
			location_id: 'ChIJIQBpAG2ahYAR_6128GcTUEo',
			price: 10.01,
			quantity: 3
		}
	]
});

Query: v=2&tid=G-PZ5ELRCR31&gtm=45je42t1v9177778896z89175355532za200&_p=1709325262551&gcd=13l3l3l3l1&npa=0&dma_cps=sypham&dma=1&cid=1220643501.1708014725&ul=en-us&sr=3840x1600&_fplc=0&ur=DE-BY&uaa=arm&uab=64&uafvl=Chromium%3B122.0.6261.69%7CNot(A%253ABrand%3B24.0.0.0%7CGoogle%2520Chrome%3B122.0.6261.69&uamb=0&uam=&uap=macOS&uapv=14.3.1&uaw=0&are=1&pscdl=noapi&_eu=IA&sst.uc=DE&sst.etld=google.de&sst.gcsub=region1&sst.gcd=13l3l3l3l1&sst.tft=1709325262551&_s=3&cu=USD&sid=1709324719&sct=6&seg=1&dl=https%3A%2F%2Fsniffer.local.bestbytes.net%2F&dt=Server%20Side%20Tracking%20Prototype%20(codename%3A%20sniffer)&en=add_to_wishlist&pr1=idSKU_12345~nmStan%20and%20Friends%20Tee~afGoogle%20Store~cpSUMMER_FUN~ds2.22~lp5~brGoogle~caApparel~c2Adult~c3Shirts~c4Crew~c5Short%20sleeve~lirelated_products~lnRelated%20products~vagreen~loChIJIQBpAG2ahYAR_6128GcTUEo~pr10.01~qt3&epn.value=30.03&_et=3187&tfd=11387&richsstsse

func (*AddToWishlist) MarshalMPv2 added in v0.1.8

func (e *AddToWishlist) MarshalMPv2() (*mpv2.Event, error)

type BeginCheckout

type BeginCheckout struct {
	Currency string  `json:"currency,omitempty"`
	Value    float64 `json:"value,omitempty"`
	Coupon   string  `json:"coupon,omitempty"`
	Items    []*Item `json:"items,omitempty"`
}

BeginCheckout https://developers.google.com/tag-platform/gtagjs/reference/events#begin_checkout

gtag('event', 'begin_checkout', {
	currency: 'USD',
	value: 30.03,
	coupon: 'SUMMER_FUN',
	items: [
		{
			item_id: 'SKU_12345',
			item_name: 'Stan and Friends Tee',
			affiliation: 'Google Store',
			coupon: 'SUMMER_FUN',
			discount: 2.22,
			index: 5,
			item_brand: 'Google',
			item_category: 'Apparel',
			item_category2: 'Adult',
			item_category3: 'Shirts',
			item_category4: 'Crew',
			item_category5: 'Short sleeve',
			item_list_id: 'related_products',
			item_list_name: 'Related products',
			item_variant: 'green',
			location_id: 'ChIJIQBpAG2ahYAR_6128GcTUEo',
			price: 10.01,
			quantity: 3
		}
	]
});

Query: v=2&tid=G-123456&gtm=45je42t1v9177778896z89175355532za200&_p=1709325262551&gcd=13l3l3l3l1&npa=0&dma_cps=sypham&dma=1&cid=1220643501.1708014725&ul=en-us&sr=3840x1600&_fplc=0&ur=DE-BY&uaa=arm&uab=64&uafvl=Chromium%3B122.0.6261.69%7CNot(A%253ABrand%3B24.0.0.0%7CGoogle%2520Chrome%3B122.0.6261.69&uamb=0&uam=&uap=macOS&uapv=14.3.1&uaw=0&are=1&pscdl=noapi&_eu=IA&sst.uc=DE&sst.etld=google.de&sst.gcsub=region1&sst.gcd=13l3l3l3l1&sst.tft=1709325262551&_s=5&cu=USD&sid=1709445696&sct=8&seg=0&dl=https%3A%2F%2Fsniffer.local.bestbytes.net%2F&dt=Server%20Side%20Tracking%20Prototype%20(codename%3A%20sniffer)&en=begin_checkout&_ss=1&pr1=idSKU_12345~nmStan%20and%20Friends%20Tee~afGoogle%20Store~cpSUMMER_FUN~ds2.22~lp5~brGoogle~caApparel~c2Adult~c3Shirts~c4Crew~c5Short%20sleeve~lirelated_products~lnRelated%20products~vagreen~loChIJIQBpAG2ahYAR_6128GcTUEo~pr10.01~qt3&epn.value=30.03&ep.coupon=SUMMER_FUN&tfd=120434230&richsstsse

func (*BeginCheckout) MarshalMPv2 added in v0.1.8

func (e *BeginCheckout) MarshalMPv2() (*mpv2.Event, error)

type Item

type Item struct {
	Affiliation   string  `json:"affiliation,omitempty"`
	Coupon        string  `json:"coupon,omitempty"`
	Discount      float64 `json:"discount,omitempty"`
	Index         int     `json:"index,omitempty"`
	ItemBrand     string  `json:"item_brand,omitempty"`
	ItemCategory  string  `json:"item_category,omitempty"`
	ItemCategory2 string  `json:"item_category2,omitempty"`
	ItemCategory3 string  `json:"item_category3,omitempty"`
	ItemCategory4 string  `json:"item_category4,omitempty"`
	ItemCategory5 string  `json:"item_category5,omitempty"`
	ItemID        string  `json:"item_id,omitempty"`
	ItemListName  string  `json:"item_list_name,omitempty"`
	ItemName      string  `json:"item_name,omitempty"`
	ItemVariant   string  `json:"item_variant,omitempty"`
	ItemListID    string  `json:"listId,omitempty"`
	LocationID    string  `json:"location_id,omitempty"`
	Price         string  `json:"price,omitempty"`
	Quantity      float64 `json:"quantity,omitempty"`
}

func (*Item) MarshalMPv2 added in v0.1.8

func (e *Item) MarshalMPv2() *mpv2.Item

type Login

type Login struct {
	Method string `json:"method,omitempty"`
}

Login - Send this event to signify that a user has logged in to your website or app.

gtag('event', 'login', {
	method: 'Google'
});

Reference: https://developers.google.com/tag-platform/gtagjs/reference/events#login

func (*Login) MarshalMPv2 added in v0.1.8

func (e *Login) MarshalMPv2() (*mpv2.Event, error)

type Purchase

type Purchase 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"`
}

Purchase https://developers.google.com/tag-platform/gtagjs/reference/events#purchase

gtag('event', 'purchase', {
	currency: 'USD',
	value: 30.03,
	transaction_id: 'T_12345',
	coupon: 'SUMMER_FUN',
	shipping: 3.33,
	tax: 1.11,
	items: [
		{
			item_id: 'SKU_12345',
			item_name: 'Stan and Friends Tee',
			affiliation: 'Google Store',
			coupon: 'SUMMER_FUN',
			discount: 2.22,
			index: 5,
			item_brand: 'Google',
			item_category: 'Apparel',
			item_category2: 'Adult',
			item_category3: 'Shirts',
			item_category4: 'Crew',
			item_category5: 'Short sleeve',
			item_list_id: 'related_products',
			item_list_name: 'Related products',
			item_variant: 'green',
			location_id: 'ChIJIQBpAG2ahYAR_6128GcTUEo',
			price: 10.01,
			quantity: 3
		}
	]
});

Query: v=2&tid=G-PZ5ELRCR31&gtm=45he42t1v9177778896z89175355532za220&_p=1709537217366&_dbg=1&gcd=13l3l3l3l1&npa=0&dma_cps=sypham&dma=1&cid=1220643501.1708014725&ul=en-us&sr=3840x1600&_fplc=0&ur=&uaa=arm&uab=64&uafvl=Chromium%3B122.0.6261.69%7CNot(A%253ABrand%3B24.0.0.0%7CGoogle%2520Chrome%3B122.0.6261.69&uamb=0&uam=&uap=macOS&uapv=14.3.1&uaw=0&are=1&pscdl=noapi&_eu=IA&sst.uc=&sst.gcd=13l3l3l3l1&sst.tft=1709537217366&_s=6&cu=USD&sid=1709534872&sct=10&seg=1&dl=https%3A%2F%2Fsniffer.local.bestbytes.net%2F%3Fgtm_debug%3D1709537217296&dr=https%3A%2F%2Ftagassistant.google.com%2F&dt=Server%20Side%20Tracking%20Prototype%20(codename%3A%20sniffer)&en=purchase&_c=1&pr1=idSKU_12345~nmStan%20and%20Friends%20Tee~afGoogle%20Store~cpSUMMER_FUN~ds2.22~lp5~brGoogle~caApparel~c2Adult~c3Shirts~c4Crew~c5Short%20sleeve~lirelated_products~lnRelated%20products~vagreen~loChIJIQBpAG2ahYAR_6128GcTUEo~pr10.01~qt3&epn.value=30.03&ep.transaction_id=T_12345&ep.coupon=SUMMER_FUN&epn.shipping=3.33&epn.tax=1.11&tfd=184622&richsstsse

func (*Purchase) MarshalMPv2 added in v0.1.8

func (e *Purchase) MarshalMPv2() (*mpv2.Event, error)

type Refund

type Refund 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"`
}

Refund https://developers.google.com/tag-platform/gtagjs/reference/events#refund

gtag('event', 'refund', {
	currency: 'USD',
	value: 30.03,
	transaction_id: 'T_12345',
	coupon: 'SUMMER_FUN',
	shipping: 3.33,
	tax: 1.11,
	items: [
		{
			item_id: 'SKU_12345',
			item_name: 'Stan and Friends Tee',
			affiliation: 'Google Store',
			coupon: 'SUMMER_FUN',
			discount: 2.22,
			index: 5,
			item_brand: 'Google',
			item_category: 'Apparel',
			item_category2: 'Adult',
			item_category3: 'Shirts',
			item_category4: 'Crew',
			item_category5: 'Short sleeve',
			item_list_id: 'related_products',
			item_list_name: 'Related products',
			item_variant: 'green',
			location_id: 'ChIJIQBpAG2ahYAR_6128GcTUEo',
			price: 10.01,
			quantity: 3
		}
	]
});

Query: v=2&tid=G-PZ5ELRCR31&gtm=45he42t1v9177778896z89175355532za220&_p=1709537217366&_dbg=1&gcd=13l3l3l3l1&npa=0&dma_cps=sypham&dma=1&cid=1220643501.1708014725&ul=en-us&sr=3840x1600&_fplc=0&ur=&uaa=arm&uab=64&uafvl=Chromium%3B122.0.6261.69%7CNot(A%253ABrand%3B24.0.0.0%7CGoogle%2520Chrome%3B122.0.6261.69&uamb=0&uam=&uap=macOS&uapv=14.3.1&uaw=0&are=1&pscdl=noapi&_eu=IA&sst.uc=&sst.gcd=13l3l3l3l1&sst.tft=1709537217366&_s=6&cu=USD&sid=1709534872&sct=10&seg=1&dl=https%3A%2F%2Fsniffer.local.bestbytes.net%2F%3Fgtm_debug%3D1709537217296&dr=https%3A%2F%2Ftagassistant.google.com%2F&dt=Server%20Side%20Tracking%20Prototype%20(codename%3A%20sniffer)&en=refund&_c=1&pr1=idSKU_12345~nmStan%20and%20Friends%20Tee~afGoogle%20Store~cpSUMMER_FUN~ds2.22~lp5~brGoogle~caApparel~c2Adult~c3Shirts~c4Crew~c5Short%20sleeve~lirelated_products~lnRelated%20products~vagreen~loChIJIQBpAG2ahYAR_6128GcTUEo~pr10.01~qt3&epn.value=30.03&ep.transaction_id=T_12345&ep.coupon=SUMMER_FUN&epn.shipping=3.33&epn.tax=1.11&tfd=184622&richsstsse

func (*Refund) MarshalMPv2 added in v0.1.8

func (e *Refund) MarshalMPv2() (*mpv2.Event, error)

type RemoveFromCart

type RemoveFromCart struct {
	Currency string  `json:"currency,omitempty"`
	Value    float64 `json:"value,omitempty"`
	Items    []*Item `json:"items,omitempty"`
}

RemoveFromCart https://developers.google.com/tag-platform/gtagjs/reference/events#remove_from_cart

gtag('event', 'remove_from_cart', {
	currency: 'USD',
	value: 30.03,
	items: [
		{
			item_id: 'SKU_12345',
			item_name: 'Stan and Friends Tee',
			affiliation: 'Google Store',
			coupon: 'SUMMER_FUN',
			discount: 2.22,
			index: 5,
			item_brand: 'Google',
			item_category: 'Apparel',
			item_category2: 'Adult',
			item_category3: 'Shirts',
			item_category4: 'Crew',
			item_category5: 'Short sleeve',
			item_list_id: 'related_products',
			item_list_name: 'Related products',
			item_variant: 'green',
			location_id: 'ChIJIQBpAG2ahYAR_6128GcTUEo',
			price: 10.01,
			quantity: 3
		}
	]
});

Query: v=2&tid=G-PZ5ELRCR31&gtm=45je42t1v9177778896z89175355532za200&_p=1709325262551&gcd=13l3l3l3l1&npa=0&dma_cps=sypham&dma=1&cid=1220643501.1708014725&ul=en-us&sr=3840x1600&_fplc=0&ur=DE-BY&uaa=arm&uab=64&uafvl=Chromium%3B122.0.6261.69%7CNot(A%253ABrand%3B24.0.0.0%7CGoogle%2520Chrome%3B122.0.6261.69&uamb=0&uam=&uap=macOS&uapv=14.3.1&uaw=0&are=1&pscdl=noapi&_eu=IA&sst.uc=DE&sst.etld=google.de&sst.gcsub=region1&sst.gcd=13l3l3l3l1&sst.tft=1709325262551&_s=3&cu=USD&sid=1709324719&sct=6&seg=1&dl=https%3A%2F%2Fsniffer.local.bestbytes.net%2F&dt=Server%20Side%20Tracking%20Prototype%20(codename%3A%20sniffer)&en=remove_from_cart&pr1=idSKU_12345~nmStan%20and%20Friends%20Tee~afGoogle%20Store~cpSUMMER_FUN~ds2.22~lp5~brGoogle~caApparel~c2Adult~c3Shirts~c4Crew~c5Short%20sleeve~lirelated_products~lnRelated%20products~vagreen~loChIJIQBpAG2ahYAR_6128GcTUEo~pr10.01~qt3&epn.value=30.03&_et=3187&tfd=11387&richsstsse

func (*RemoveFromCart) MarshalMPv2 added in v0.1.8

func (e *RemoveFromCart) MarshalMPv2() (*mpv2.Event, error)
type Search struct {
	SearchTerm string `json:"search_term,omitempty"`
}

Search https://developers.google.com/tag-platform/gtagjs/reference/events#search

gtag('event', 'search', {
	search_term: 't-shirts',
});

Query: v=2&tid=G-PZ5ELRCR31&gtm=45je42t1v9177778896z89175355532za200&_p=1709325262551&gcd=13l3l3l3l1&npa=0&dma_cps=sypham&dma=1&cid=1220643501.1708014725&ul=en-us&sr=3840x1600&_fplc=0&ur=DE-BY&uaa=arm&uab=64&uafvl=Chromium%3B122.0.6261.69%7CNot(A%253ABrand%3B24.0.0.0%7CGoogle%2520Chrome%3B122.0.6261.69&uamb=0&uam=&uap=macOS&uapv=14.3.1&uaw=0&are=1&pscdl=noapi&_eu=IA&sst.uc=DE&sst.etld=google.de&sst.gcsub=region1&sst.gcd=13l3l3l3l1&sst.tft=1709325262551&_s=3&cu=USD&sid=1709324719&sct=6&seg=1&dl=https%3A%2F%2Fsniffer.local.bestbytes.net%2F&dt=Server%20Side%20Tracking%20Prototype%20(codename%3A%20sniffer)&en=search&pr1=idSKU_12345~nmStan%20and%20Friends%20Tee~afGoogle%20Store~cpSUMMER_FUN~ds2.22~lp5~brGoogle~caApparel~c2Adult~c3Shirts~c4Crew~c5Short%20sleeve~lirelated_products~lnRelated%20products~vagreen~loChIJIQBpAG2ahYAR_6128GcTUEo~pr10.01~qt3&epn.value=30.03&_et=3187&tfd=11387&richsstsse

func (*Search) MarshalMPv2 added in v0.1.8

func (e *Search) MarshalMPv2() (*mpv2.Event, error)

type SignUp

type SignUp struct {
	Method string `json:"method,omitempty"`
}

SignUp - Send this event to signify that a user has logged in to your website or app.

gtag('event', 'sign_up', {
	method: 'Google'
});

Reference: https://developers.google.com/tag-platform/gtagjs/reference/events#sign_up

func (*SignUp) MarshalMPv2 added in v0.1.8

func (e *SignUp) MarshalMPv2() (*mpv2.Event, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL