add_payment_info
This event signifies a user has submitted their payment information.
Parameters
There are no parameters for this event.
add_to_cart
This event signifies that an item was added to a cart for purchase.
Parameters
Name | Type | Required | Example Value | Description |
---|---|---|---|---|
currency |
string |
No | USD | Currency of the items associated with the event, in 3-letter ISO 4217 format. |
items |
Array<Item> |
No | The items for the event. | |
value |
number |
No | 29.98 | The monetary value of the event. |
Item Parameters
Name | Type | Required | Example Value | Description |
---|---|---|---|---|
id |
string |
Yes* | P12345 |
The ID of an item. *One of |
name |
string |
Yes* | Android Warhol T-Shirt |
The name of an item. *One of |
brand |
string |
No | The brand of the item. | |
category |
string |
No | Apparel/T-Shirts |
The category to which the item belongs.
Use |
coupon |
string |
No | SUMMER_DISCOUNT | The coupon code associated with an item. |
list_name |
string |
No | Search Results | The name of the list the item appeared in. |
list_position |
number |
No | 1 | The item's position in a list or collection. |
price |
number |
No | 14.99 | The price of the item. |
quantity |
number |
No | 2 | The quantity of the item. |
variant |
string |
No | Black | The variant of the item. |
Example
gtag('event', 'add_to_cart', {
currency: 'USD',
items: [{
id: "P12345",
name: "Android Warhol T-Shirt",
brand: "Google",
category: "Apparel/T-Shirts",
coupon: "SUMMER_DISCOUNT",
list_name: "Search Results",
list_position: 1,
price: 14.99,
quantity: 2,
variant: "Black"
}],
value: 29.98
});
add_to_wishlist
The event signifies that an item was added to a wishlist. Use this event to identify popular gift items in your app.
Parameters
Name | Type | Required | Example Value | Description |
---|---|---|---|---|
currency |
string |
No | USD | Currency of the items associated with the event, in 3-letter ISO 4217 format. |
items |
Array<Item> |
No | The items for the event. | |
value |
number |
No | 22 | The monetary value of the event. |
Item Parameters
Name | Type | Required | Example Value | Description |
---|---|---|---|---|
id |
string |
Yes* | P12345 |
The ID of an item. *One of |
name |
string |
Yes* | Android Warhol T-Shirt |
The name of an item. *One of |
brand |
string |
No | The brand of the item. | |
category |
string |
No | Apparel/T-Shirts |
The category to which the item belongs.
Use |
coupon |
string |
No | SUMMER_DISCOUNT | The coupon code associated with an item. |
list_name |
string |
No | Search Results | The name of the list the item appeared in. |
list_position |
number |
No | 1 | The item's position in a list or collection. |
price |
number |
No | 14.99 | The price of the item. |
quantity |
number |
No | 2 | The quantity of the item. |
variant |
string |
No | Black | The variant of the item. |
Example
gtag('event', 'add_to_wishlist', {
currency: 'USD',
items: [{
id: "P12345",
name: "Android Warhol T-Shirt",
brand: "Google",
category: "Apparel/T-Shirts",
coupon: "SUMMER_DISCOUNT",
list_name: "Search Results",
list_position: 1,
price: 14.99,
quantity: 2,
variant: "Black"
}],
value: 29.98
});
begin_checkout
This event signifies that a user has begun a checkout.
Parameters
Name | Type | Required | Example Value | Description |
---|---|---|---|---|
coupon |
string |
No | SUMMER_FUN | Coupon code used for a purchase. |
currency |
string |
No | USD | Currency of the items associated with the event, in 3-letter ISO 4217 format. |
items |
Array<Item> |
No | The items for the event. | |
value |
number |
No | 29.98 | The monetary value of the event. |
Item Parameters
Name | Type | Required | Example Value | Description |
---|---|---|---|---|
id |
string |
Yes* | P12345 |
The ID of an item. *One of |
name |
string |
Yes* | Android Warhol T-Shirt |
The name of an item. *One of |
brand |
string |
No | The brand of the item. | |
category |
string |
No | Apparel/T-Shirts |
The category to which the item belongs.
Use |
coupon |
string |
No | SUMMER_DISCOUNT | The coupon code associated with an item. |
list_name |
string |
No | Search Results | The name of the list the item appeared in. |
list_position |
number |
No | 1 | The item's position in a list or collection. |
price |
number |
No | 14.99 | The price of the item. |
quantity |
number |
No | 2 | The quantity of the item. |
variant |
string |
No | Black | The variant of the item. |
Example
gtag("event", "begin_checkout", {
value: 29.98,
coupon: "SUMMER_DISCOUNT",
currency: "USD",
items: [
{
id: "P12345",
name: "Android Warhol T-Shirt",
list_name: "Search Results",
brand: "Google",
category: "Apparel/T-Shirts",
coupon: "SUMMER_DISCOUNT",
variant: "Black",
list_position: 1,
quantity: 2,
price: 14.99
}
]
});
checkout_progress
Parameters
Name | Type | Required | Example Value | Description |
---|---|---|---|---|
coupon |
string |
No | SUMMER_DISCOUNT | Coupon code used for a purchase. |
currency |
string (ISO 4217) |
No | USD | Currency of the purchase or items associated with the event, in 3-letter ISO 4217 format. |
checkout_option |
string |
No | Google Pay | Selected payment method. |
checkout_step |
number |
No | 1 | A number representing a step in the checkout process. |
value |
number |
No | 22 | The monetary value of the event, in units of the specified currency parameter. |
items |
Array<Item> |
No | The items for the event. |
Item Parameters
Name | Type | Required | Example Value | Description |
---|---|---|---|---|
id |
string |
Yes* | P12345 |
The ID of an item. *One of |
name |
string |
Yes* | Android Warhol T-Shirt |
The name of an item. *One of |
brand |
string |
No | The brand of the item. | |
category |
string |
No | Apparel/T-Shirts |
The category to which the item belongs.
Use |
coupon |
string |
No | SUMMER_DISCOUNT | The coupon code associated with an item. |
list_name |
string |
No | Search Results | The name of the list the item appeared in. |
list_position |
number |
No | 1 | The item's position in a list or collection. |
price |
number |
No | 14.99 | The price of the item. |
quantity |
number |
No | 2 | The quantity of the item. |
variant |
string |
No | Black | The variant of the item. |
Example
gtag("event", "checkout_progress", {
coupon: "SUMMER_DISCOUNT",
currency: "USD",
checkout_option: "Google Pay",
checkout_step: 1,
value: 29.98,
items: [
{
id: "P12345",
name: "Android Warhol T-Shirt",
brand: "Google",
category: "Apparel/T-Shirts",
coupon: "SUMMER_DISCOUNT",
list_name: "Search Results",
list_position: 1,
price: 14.99,
quantity: 2,
variant: "Black"
}
]
});
exception
An exception event is logged when the normal flow of an app's execution is interrupted.
Parameters
Name | Type | Required | Example Value | Description |
---|---|---|---|---|
description |
string |
No | Missing required field. | The description of the exception that occurred. |
fatal |
boolean |
No | true |
Whether or not the exception was a fatal one. |
Example
gtag('event', 'exception', {
description: 'Missing required field.',
fatal: true
});
generate_lead
Log this event when a lead has been generated to understand the efficacy of your re-engagement campaigns.
Name | Type | Required | Example Value | Description |
---|---|---|---|---|
currency |
string |
No | USD | The currency of the lead, in 3-letter ISO 4217 format. |
value |
string |
No | 99.99 | The value of the lead. |
Example
gtag('event', 'generate_lead', {
currency: 'USD',
value: 99.99
});
login
Send this event to signify that a user has logged in.
Parameters
Name | Type | Required | Example | Description |
---|---|---|---|---|
method |
string |
No | The method used to login. |
Example
gtag('event', 'login', {
method: 'Google'
});
page_view
This event signifies a user has viewed a page.
Name | Type | Required | Example Value | Description |
---|---|---|---|---|
page_location |
string |
No | https://example.com | The URL of the page. |
page_path |
string |
No | /about | The path to the page. This value must start with a / |
page_title |
string |
No | About | The title of the page. |
Example
gtag('event', 'page_view', {
page_location: 'https://example.com/about',
page_path: '/about',
page_title: 'About'
});
purchase
This event signifies when one or more items is purchased by a user.
Parameters
Name | Type | Required | Example Value | Description |
---|---|---|---|---|
affiliation |
string |
No | Google Store | A product affiliation to designate a supplying company or brick and mortar store location. |
coupon |
string |
No | SUMMER_DISCOUNT | Coupon code used for a purchase. |
currency |
string (ISO 4217) |
No | USD | Currency of the purchase or items associated with the event, in 3-letter ISO 4217 format. |
shipping |
number |
No | 5.99 | Shipping cost associated with a transaction. |
tax |
number |
No | 2.43 | Tax cost associated with a transaction. |
transaction_id |
string |
No | T12345 | The unique identifier of a transaction |
value |
number |
No | 22 | The monetary value of the event, in units of the specified currency parameter. |
items |
Array<Item> |
No | The items for the event. |
Item Parameters
Name | Type | Required | Example Value | Description |
---|---|---|---|---|
id |
string |
Yes* | P12345 |
The ID of an item. *One of |
name |
string |
Yes* | Android Warhol T-Shirt |
The name of an item. *One of |
brand |
string |
No | The brand of the item. | |
category |
string |
No | Apparel/T-Shirts |
The category to which the item belongs.
Use |
coupon |
string |
No | SUMMER_DISCOUNT | The coupon code associated with an item. |
list_name |
string |
No | Search Results | The name of the list the item appeared in. |
list_position |
number |
No | 1 | The item's position in a list or collection. |
price |
number |
No | 14.99 | The price of the item. |
quantity |
number |
No | 2 | The quantity of the item. |
variant |
string |
No | Black | The variant of the item. |
Example
gtag("event", "purchase", {
affiliation: "Google online store",
coupon: "SUMMER_DISCOUNT",
currency: "USD",
shipping: 5.55,
tax: 3.33,
transaction_id: "T_1",
value: 28.86,
items: [
{
id: "P12345",
name: "Android Warhol T-Shirt",
coupon: "P12345_coupon",
list_name: "Search Results",
brand: "Google",
category: "Apparel/T-Shirts",
variant: "Black",
list_position: 3,
quantity: 1,
price: 9.99
},
{
id: "P12346",
name: "Flame challenge TShirt",
coupon: "P12346_coupon",
list_name: "Search Results",
brand: "MyBrand",
category: "Apparel/T-Shirts",
variant: "Red",
list_position: 5,
quantity: 1,
price: 9.99
}
]
});
refund
This event signifies a refund was issued.
Parameters
Name | Type | Required | Example Value | Description |
---|---|---|---|---|
coupon |
string |
No | SUMMER_FUN | Coupon code used for a purchase. |
currency |
string (ISO 4217) |
No | USD | Currency of the purchase or items associated with the event, in 3-letter ISO 4217 format. |
shipping |
number |
No | 5.99 | Shipping cost associated with a transaction. |
tax |
number |
No | 2.43 | Tax cost associated with a transaction. |
transaction_id |
string |
No | T12345 | The unique identifier of a transaction |
value |
number |
No | 22 | The monetary value of the event, in units of the specified currency parameter. |
items |
Array<Item> |
No | The items for the event. |
Item Parameters
Name | Type | Required | Example Value | Description |
---|---|---|---|---|
id |
string |
Yes* | P12345 |
The ID of an item. *One of |
name |
string |
Yes* | Android Warhol T-Shirt |
The name of an item. *One of |
brand |
string |
No | The brand of the item. | |
category |
string |
No | Apparel/T-Shirts |
The category to which the item belongs.
Use |
coupon |
string |
No | SUMMER_DISCOUNT | The coupon code associated with an item. |
list_name |
string |
No | Search Results | The name of the list the item appeared in. |
list_position |
number |
No | 1 | The item's position in a list or collection. |
price |
number |
No | 14.99 | The price of the item. |
quantity |
number |
No | 2 | The quantity of the item. |
variant |
string |
No | Black | The variant of the item. |
Example
gtag('event', 'refund', {
coupon: "SUMMER_DISCOUNT",
currency: "USD",
shipping: 5.55,
tax: 3.33,
transaction_id: "T_12345",
value: 28.86,
items: [
{
id: "P12345",
coupon: "P12345_coupon",
name: "Android Warhol T-Shirt",
list_name: "Search Results",
brand: "Google",
category: "Apparel/T-Shirts",
variant: "Black",
list_position: 3,
quantity: 1,
price: 9.99
},
{
id: "P12346",
coupon: "P12346_coupon",
name: "Flame challenge TShirt",
list_name: "Search Results",
brand: "MyBrand",
category: "Apparel/T-Shirts",
variant: "Red",
list_position: 5,
quantity: 1,
price: 9.99
}
]
});
remove_from_cart
This event signifies that an item was removed from a cart.
Parameters
Name | Type | Required | Example Value | Description |
---|---|---|---|---|
currency |
string |
No | USD | Currency of the items associated with the event, in 3-letter ISO 4217 format. |
items |
Array<Item> |
No | The items for the event. | |
value |
number |
No | 29.98 | The monetary value of the event. |
Item Parameters
Name | Type | Required | Example Value | Description |
---|---|---|---|---|
id |
string |
Yes* | P12345 |
The ID of an item. *One of |
name |
string |
Yes* | Android Warhol T-Shirt |
The name of an item. *One of |
brand |
string |
No | The brand of the item. | |
category |
string |
No | Apparel/T-Shirts |
The category to which the item belongs.
Use |
coupon |
string |
No | SUMMER_DISCOUNT | The coupon code associated with an item. |
list_name |
string |
No | Search Results | The name of the list the item appeared in. |
list_position |
number |
No | 1 | The item's position in a list or collection. |
price |
number |
No | 14.99 | The price of the item. |
quantity |
number |
No | 2 | The quantity of the item. |
variant |
string |
No | Black | The variant of the item. |
Example
gtag('event', 'remove_from_cart', {
currency: 'USD',
items: [{
id: "P12345",
name: "Android Warhol T-Shirt",
brand: "Google",
category: "Apparel/T-Shirts",
coupon: "SUMMER_DISCOUNT",
list_name: "Search Results",
list_position: 1,
price: 14.99,
quantity: 2,
variant: "Black"
}],
value: 29.98
});
screen_view
Parameters
Name | Type | Required | Example Value | Description |
---|---|---|---|---|
screen_name |
string |
No | About | The name of the screen. |
Example
gtag('event', 'screen_view', {
screen_name: 'About'
});
search
Use this event to contextualize search operations. This event can help you identify the most popular content in your app.
Parameters
Name | Type | Required | Example | Description |
---|---|---|---|---|
search_term |
string |
Yes | t-shirts | The term that was searched for. |
Example
gtag('event', 'search', {
search_term: 't-shirts'
});
select_content
This event signifies that a user has selected some content of a certain type. This event can help you identify popular content and categories of content in your app.
Parameters
Name | Type | Required | Example Value | Description |
---|---|---|---|---|
content_type |
string |
No | product | The type of selected content. |
items |
Array<Item> |
No |
The items for the event. Only one of items or
promotions should be sent.
|
|
promotions |
Array<Promotion> |
No |
The promotions for the event. Only one of items or
promotions should be sent.
|
Item Parameters
Name | Type | Required | Example Value | Description |
---|---|---|---|---|
id |
string |
Yes* | P12345 |
The ID of an item. *One of |
name |
string |
Yes* | Android Warhol T-Shirt |
The name of an item. *One of |
brand |
string |
No | The brand of the item. | |
category |
string |
No | Apparel/T-Shirts |
The category to which the item belongs.
Use |
coupon |
string |
No | SUMMER_DISCOUNT | The coupon code associated with an item. |
list_name |
string |
No | Search Results | The name of the list the item appeared in. |
list_position |
number |
No | 1 | The item's position in a list or collection. |
price |
number |
No | 14.99 | The price of the item. |
quantity |
number |
No | 2 | The quantity of the item. |
variant |
string |
No | Black | The variant of the item. |
Promotion Parameters
Name | Type | Required | Example Value | Description |
---|---|---|---|---|
id |
string |
Yes* | P_12345 |
The ID of the promotion. *One of |
name |
string |
Yes* | Summer Sale |
The name of the promotion. *One of |
creative_name |
string |
No | summer_banner_2 | The name of the creative. |
creative_slot |
string |
No | banner_slot_1 | The name of the creative slot. |
Example
Sending items
gtag('event', 'select_content', {
content_type: "product",
items: [
{
id: "P12345",
name: "Android Warhol T-Shirt",
list_name: "Search Results",
brand: "Google",
category: "Apparel/T-Shirts",
coupon: "SUMMER_SALE",
variant: "Black",
list_position: 1,
quantity: 2,
price: 2
}
]
});
Sending promotions
gtag('event', 'select_content', {
content_type: "product",
promotions: [
{
id: 'P_12345' ,
name: 'Summer Sale',
creative_name: 'summer_banner_2',
creative_slot: 'banner_slot_1'
}
]
});
set_checkout_option
Parameters
Name | Type | Required | Example Value | Description |
---|---|---|---|---|
checkout_step |
number |
No | 1 | A number representing a step in the checkout process. |
checkout_option |
string |
No | Google Pay | Checkout option information, such as selected payment method. |
value |
number |
No | 3 | The value of the checkout option. |
Example
gtag('event', 'set_checkout_option', {
checkout_step: 1,
checkout_option: 'Google Pay',
value: 3
});
share
Use this event to identify viral content.
Parameters
Name | Type | Required | Example | Description |
---|---|---|---|---|
method |
string |
No | The method in which the content is shared. | |
content_type |
string |
No | image | The type of shared content. |
content_id |
string |
No | C_12345 | The ID of the shared content. |
Example
gtag("event", "share", {
content_type: 'image',
item_id: 'C_12345',
method: 'Twitter'
});
sign_up
This event indicates that a user has signed up for an account. Use this event to understand the different behaviors of logged in and logged out users.
Parameters
Name | Type | Required | Example | Description |
---|---|---|---|---|
method |
string |
No | The method used for sign up. |
Example
gtag("event", "sign_up", {
method: 'Google'
});
timing_complete
Parameters
Name | Type | Required | Example Value | Description |
---|---|---|---|---|
name |
string |
No | load | A name to identify the variable being recorded. |
value |
number |
No | 3549 | The number of milliseconds in elapsed time to report to Google Analytics. |
Example
gtag("event", "timing_complete", {
name: 'load',
value: 3549
});
view_item
This event signifies that some content was shown to the user. Use this event to discover the most popular items viewed.
Parameters
Name | Type | Required | Example Value | Description |
---|---|---|---|---|
items |
Array<Item> |
No | The items for the event. |
Item Parameters
Name | Type | Required | Example Value | Description |
---|---|---|---|---|
id |
string |
Yes* | P12345 |
The ID of an item. *One of |
name |
string |
Yes* | Android Warhol T-Shirt |
The name of an item. *One of |
brand |
string |
No | The brand of the item. | |
category |
string |
No | Apparel/T-Shirts |
The category to which the item belongs.
Use |
coupon |
string |
No | SUMMER_DISCOUNT | The coupon code associated with an item. |
list_name |
string |
No | Search Results | The name of the list the item appeared in. |
list_position |
number |
No | 1 | The item's position in a list or collection. |
price |
number |
No | 14.99 | The price of the item. |
quantity |
number |
No | 2 | The quantity of the item. |
variant |
string |
No | Black | The variant of the item. |
Example
gtag('event', 'view_item', {
items: [{
id: "P12345",
name: "Android Warhol T-Shirt",
brand: "Google",
category: "Apparel/T-Shirts",
coupon: "SUMMER_DISCOUNT",
list_name: "Search Results",
list_position: 1,
price: 14.99,
quantity: 2,
variant: "Black"
}]
});
view_item_list
Log this event when the user has been presented with a list of items of a certain category.
Parameters
Name | Type | Required | Example Value | Description |
---|---|---|---|---|
items |
Array<Item> |
No | The items for the event. |
Item Parameters
Name | Type | Required | Example Value | Description |
---|---|---|---|---|
id |
string |
Yes* | P12345 |
The ID of an item. *One of |
name |
string |
Yes* | Android Warhol T-Shirt |
The name of an item. *One of |
brand |
string |
No | The brand of the item. | |
category |
string |
No | Apparel/T-Shirts |
The category to which the item belongs.
Use |
coupon |
string |
No | SUMMER_DISCOUNT | The coupon code associated with an item. |
list_name |
string |
No | Search Results | The name of the list the item appeared in. |
list_position |
number |
No | 1 | The item's position in a list or collection. |
price |
number |
No | 14.99 | The price of the item. |
quantity |
number |
No | 2 | The quantity of the item. |
variant |
string |
No | Black | The variant of the item. |
Example
gtag('event', 'view_item_list', {
items: [{
id: "P12345",
name: "Android Warhol T-Shirt",
brand: "Google",
category: "Apparel/T-Shirts",
coupon: "SUMMER_DISCOUNT",
list_name: "Search Results",
list_position: 1,
price: 14.99,
quantity: 2,
variant: "Black"
}]
});
view_promotion
This event signifies an promotion was viewed from a list.
Parameters
Name | Type | Required | Example Value | Description |
---|---|---|---|---|
promotions |
Array<Promotion> |
No | The promotions for the event. |
Promotion Parameters
Name | Type | Required | Example Value | Description |
---|---|---|---|---|
id |
string |
Yes* | P_12345 |
The ID of the promotion. *One of |
name |
string |
Yes* | Summer Sale |
The name of the promotion. *One of |
creative_name |
string |
No | summer_banner_2 | The name of the creative. |
creative_slot |
string |
No | banner_slot_1 | The name of the creative slot. |
Example
gtag('event', 'view_promotion', {
promotions: [{
id: 'P_12345' ,
name: 'Summer Sale',
creative_name: 'summer_banner_2',
creative_slot: 'banner_slot_1'
}]
});
view_search_results
Log this event when the users has been presented with the results of a search.
Parameters
Name | Type | Required | Example | Description |
---|---|---|---|---|
search_term |
string |
No | Clothing | The term used for the search. |
items |
Array<Item> |
No | The items for the event. |
Item Parameters
Name | Type | Required | Example Value | Description |
---|---|---|---|---|
item_id |
string |
Yes* | SKU_12345 |
Item ID (context-specific).
*One of |
item_name |
string |
Yes* | jeggings |
Item Name (context-specific).
*One of |
quantity |
number |
No | 1 |
Item quantity. |
affiliation |
string |
No | Google Store | A product affiliation to designate a supplying company or brick and mortar store location. |
coupon |
string |
No | SUMMER_FUN | Coupon code used for a purchase. |
discount |
number |
No | 2.22 | Monetary value of discount associated with a purchase. |
index |
number |
No | 5 | The index of the item in a list. |
item_brand |
string |
No | Gucci | Item brand |
item_category |
string |
No | pants |
Item Category (context-specific). item_category2 through
item_category5 can also be used if the item has many
categories.
|
item_list_name |
string |
No | Related products | The name of the list in which the item was presented to the user. |
item_list_id |
string |
No | related_products | The ID of the list in which the item was presented to the user. | item_variant |
string |
No | Black | The variant of the item. |
price |
number |
No | 9.99 | The monetary price of the item, in units of the specified currency parameter. |
currency |
string |
No | USD | The currency, in 3-letter ISO 4217 format. |
Example
gtag('event', 'view_search_results', {
search_term: 'Clothing'
});