Google Analytics 4 Events

add_payment_info

This event signifies a user has submitted their payment information.

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.
items Array<Item> No The items for the event.
payment_type string No Credit Card The chosen method of payment.
value number No 7.77 The monetary value of the event.

Item Parameters

Name Type Required Example Value Description
item_id string Yes* SKU_12345

Item ID (context-specific).

*One of item_id or item_name is required for product or impression data.

item_name string Yes* jeggings

Item Name (context-specific).

*One of item_id or item_name is required for product or impression data.

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
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_variant string No Black Item variant
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', 'add_payment_info', {
  coupon: 'SUMMER_FUN',
  currency: 'USD',
  items: [{
    item_id: 'SKU_12345',
    item_name: 'jeggings',
    coupon: 'SUMMER_FUN',
    discount: 2.22,
    affiliation: 'Google Store',
    item_brand: 'Gucci',
    item_category: 'pants',
    item_variant: 'black',
    price: 9.99,
    currency: 'USD'
  }],
  payment_type: 'Credit Card',
  value: 9.99
});

add_shipping_info

This event signifies a user has submitted their shipping information.

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.
items Array<Item> No The items for the event.
shipping_tier string No Ground The shipping tier (e.g. Ground, Air, Next-day) selected for delivery of the purchased item.
value number No 7.77 The monetary value of the event.

Item Parameters

Name Type Required Example Value Description
item_id string Yes* SKU_12345

Item ID (context-specific).

*One of item_id or item_name is required for product or impression data.

item_name string Yes* jeggings

Item Name (context-specific).

*One of item_id or item_name is required for product or impression data.

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
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_variant string No Black Item variant
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', 'add_shipping_info', {
  coupon: 'SUMMER_FUN',
  currency: 'USD',
  items: [{
    item_id: 'SKU_12345',
    item_name: 'jeggings',
    coupon: 'SUMMER_FUN',
    discount: 2.22,
    affiliation: "Google Store",
    item_brand: 'Gucci',
    item_category: 'pants',
    item_variant: 'Black',
    price: 9.99,
    currency: 'USD'
  }],
  shipping_tier: 'Ground',
  value: 7.77
});

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 7.77 The monetary value of the event.

Item Parameters

Name Type Required Example Value Description
item_id string Yes* SKU_12345

Item ID (context-specific).

*One of item_id or item_name is required for product or impression data.

item_name string Yes* jeggings

Item Name (context-specific).

*One of item_id or item_name is required for product or impression data.

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
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_variant string No Black Item variant
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', 'add_to_cart', {
  currency: 'USD',
  items: [{
    item_id: 'SKU_12345',
    item_name: 'jeggings',
    coupon: 'SUMMER_FUN',
    discount: 2.22,
    affiliation: 'Google Store',
    item_brand: 'Gucci',
    item_category: 'pants',
    item_variant: 'black',
    price: 9.99,
    currency: 'USD'
  }],
  value: 7.77
});

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 7.77 The monetary value of the event.

Item Parameters

Name Type Required Example Value Description
item_id string Yes* SKU_12345

Item ID (context-specific).

*One of item_id or item_name is required for product or impression data.

item_name string Yes* jeggings

Item Name (context-specific).

*One of item_id or item_name is required for product or impression data.

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
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_variant string No Black Item variant
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', 'add_to_wishlist', {
  currency: 'USD',
  items: [{
    item_id: 'SKU_12345',
    item_name: 'jeggings',
    coupon: 'SUMMER_FUN',
    discount: 2.22,
    affiliation: 'Google Store',
    item_brand: 'Gucci',
    item_category: 'pants',
    item_variant: 'black',
    price: 9.99,
    currency: 'USD'
  }],
  value: 9.99
});

begin_checkout

This event signifies that a user has begun the process of checkout out.

Parameters

name Type Required Example 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.
items Array<Item> No The items for the event.
value number No 7.77 The monetary value of the event.

Item Parameters

Name Type Required Example Value Description
item_id string Yes* SKU_12345

Item ID (context-specific).

*One of item_id or item_name is required for product or impression data.

item_name string Yes* jeggings

Item Name (context-specific).

*One of item_id or item_name is required for product or impression data.

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
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_variant string No Black Item variant
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', 'begin_checkout', {
  coupon: 'SUMMER_FUN',
  currency: 'USD',
  items: [{
    item_id: 'SKU_12345',
    item_name: 'jeggings',
    coupon: 'SUMMER_FUN',
    discount: 2.22,
    affiliation: 'Google Store',
    item_brand: 'Gucci',
    item_category: 'pants',
    item_variant: 'black',
    price: 9.99,
    currency: 'USD'
  }],
  value: 7.77
});

earn_virtual_currency

This event measures the awarding of virtual currency. Log this along with spend_virtual_currency to better understand your virtual economy.

Parameters

Name Type Required Example Description
virtual_currency_name string No Gems The name of the virtual currency.
value number No 5 The value of the virtual currency.

Example

gtag('event', 'earn_virtual_currency', {
  virtual_currency_name: 'Gems',
  value: 5
});

generate_lead

Log this event when a lead has been generated to understand the efficacy of your re-engagement campaigns.

Parameters

Name Type Required Example Description
currency string No USD The currency of the lead, in 3-letter ISO 4217 format.
value number No 99.99 The value of the lead.

Example

gtag('event', 'generate_lead', {
  currency: 'USD',
  value: 99.99,
  transaction_id: 'T_12345'
});

join_group

Log this event when a user joins a group such as a guild, team, or family. Use this event to analyze how popular certain groups or social features are.

Parameters

Name Type Required Example Description
group_id string No G_12345 The ID of the group.

Example

gtag('event', 'join_group', {
  group_id: 'G_12345'
});

level_end

This event signifies that a player has reached the end of a level.

Parameters

Name Type Required Example Description
level_name string No The journey begins... The name of the level.
success boolean No true Set to true if the level was completed successfully.

Example

gtag('event', 'level_end', {
  level_name: 'The journey begins...',
  success: true,
});

level_start

This event signifies that a player has started a level.

Parameters

Name Type Required Example Description
level_name string No The journey begins... The name of the level.

Example

gtag('event', 'level_start', {
  level_name: 'The journey begins...'
});

level_up

This event signifies that a player has leveled up. Use it to gauge the level distribution of your userbase and identify levels that are difficult to complete.

Parameters

Name Type Required Example Description
level number No 5 The level of the character.
character string No Player 1 The character that leveled up.

Example

gtag('event', 'level_up', {
  level: 5,
  character: 'Player 1'
});

login

Send this event to signify that a user has logged in.

Parameters

Name Type Required Example Description
method string No Google The method used to login.

Example

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

post_score

Send this event when the user posts a score. Use this event to understand how users are performing in your game and correlate high scores with audiences or behaviors.

Parameters

Name Type Required Example Description
score number Yes 10000 The score to post.
level number No 5 The level for the score.
character string No Player 1 The character that achieved the score.

Example

gtag('event', 'post_score', {
  score: 10000,
  level: 5,
  character: 'Player 1'
});

purchase

This event signifies when one or more items is purchased by a user.

Parameters

Name Type Required Example Description
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.
currency string (ISO 4217) No USD Currency of the purchase or items associated with the event, in 3-letter ISO 4217 format.
items Array<Item> No The items for the event.
transaction_id string No T_12345 The unique identifier of a transaction
shipping number No 3.33 Shipping cost associated with a transaction.
tax number No 1.11 Tax cost associated with a transaction.
value number No 12.21 The monetary value of the event, in units of the specified currency parameter.

Item Parameters

Name Type Required Example Value Description
item_id string Yes* SKU_12345

Item ID (context-specific).

*One of item_id or item_name is required for product or impression data.

item_name string Yes* jeggings

Item Name (context-specific).

*One of item_id or item_name is required for product or impression data.

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
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_variant string No Black Item variant
tax number No 1.11 Tax cost associated with a transaction
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', 'purchase', {
  affiliation: 'Google Store',
  coupon: 'SUMMER_FUN',
  currency: 'USD',
  items: [{
    item_id: 'SKU_12345',
    item_name: 'jeggings',
    coupon: 'SUMMER_FUN',
    discount: 2.22,
    affiliation: 'Google Store',
    item_brand: 'Gucci',
    item_category: 'pants',
    item_variant: 'black',
    price: 9.99,
    currency: 'USD'
  }],
  transaction_id: 'T_12345',
  shipping: 3.33,
  value: 12.21,
  tax: 1.11
})

refund

This event signifies a refund was issued.

Parameters

Name Type Required Example Description
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.
currency string (ISO 4217) No USD Currency of the purchase or items associated with the event, in 3-letter ISO 4217 format.
items Array<Item> No The items for the event.
transaction_id string No T_12345 The unique identifier of a transaction.
shipping number No 3.33 Shipping cost associated with a transaction.
tax number No 1.11 Tax cost associated with a transaction.
value number No 12.21 The monetary value of the event, in units of the specified currency parameter.

Item Parameters

Name Type Required Example Value Description
item_id string Yes* SKU_12345

Item ID (context-specific).

*One of item_id or item_name is required for product or impression data.

item_name string Yes* jeggings

Item Name (context-specific).

*One of item_id or item_name is required for product or impression data.

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
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_variant string No Black Item variant
tax number No 1.11 Tax cost associated with a transaction
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', 'refund', {
  affiliation: 'Google Store',
  coupon: 'SUMMER_FUN',
  currency: 'USD',
  items: [{
    item_id: 'SKU_12345',
    item_name: 'jeggings',
    coupon: 'SUMMER_FUN',
    discount: 2.22,
    affiliation: 'Google Store',
    item_brand: 'Gucci',
    item_category: 'pants',
    item_variant: 'black',
    price: 9.99,
    currency: 'USD'
  }],
  transaction_id: 'T_12345',
  shipping: 3.33,
  value: 12.21,
  tax: 1.11
});

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 7.77 The monetary value of the event.

Item Parameters

Name Type Required Example Value Description
item_id string Yes* SKU_12345

Item ID (context-specific).

*One of item_id or item_name is required for product or impression data.

item_name string Yes* jeggings

Item Name (context-specific).

*One of item_id or item_name is required for product or impression data.

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
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_variant string No Black Item variant
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', 'remove_from_cart', {
  currency: 'USD',
  items: [{
    item_id: 'SKU_12345',
    item_name: 'jeggings',
    coupon: 'SUMMER_FUN',
    discount: 2.22,
    affiliation: 'Google Store',
    item_brand: 'Gucci',
    item_category: 'pants',
    item_variant: 'black',
    price: 9.99,
    currency: 'USD'
  }],
  value: 7.77
});

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.
item_id string No I_12345 An identifier for the item that was selected.

Example

gtag('event', 'select_content', {
  content_type: 'product',
  item_id: 'I_12345'
});

select_item

This event signifies an item was selected from a list.

Parameters

Name Type Required Example Value Description
items Array<Item> No The items for the event.
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 IL_12345 The ID of the list in which the item was presented to the user.

Item Parameters

Name Type Required Example Value Description
item_id string Yes* SKU_12345

Item ID (context-specific).

*One of item_id or item_name is required for product or impression data.

item_name string Yes* jeggings

Item Name (context-specific).

*One of item_id or item_name is required for product or impression data.

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 IL_12345 The ID of the list in which the item was presented to the user
item_variant string No Black Item variant
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', 'select_item', {
  items: [{
    item_id: 'SKU_12345',
    item_name: 'jeggings',
    coupon: 'SUMMER_FUN',
    discount: 2.22,
    index: 5,
    item_list_name: "Related Products",
    item_list_id: "IL_12345",
    affiliation: 'Google Store',
    item_brand: 'Gucci',
    item_category: 'pants',
    item_variant: 'black',
    price: 9.99,
    currency: 'USD'
  }],
  item_list_name: 'Related products',
  item_list_id: 'related_products'
});

select_promotion

This event signifies an promotion was selected from a list.

Parameters

Name Type Required Example Value Description
items Array<Item> No The items for the event.
promotion_id string No P_12345 The ID of a product promotion.
promotion_name string No Summer Sale The name of a product promotion.
creative_name string No Summer Banner The name of a creative used in a promotional spot.
creative_slot string No featured_app_1 The name of the creative slot.
location_id string No L_12345 The ID of the location.

Item Parameters

Name Type Required Example Value Description
item_id string Yes* SKU_12345

Item ID (context-specific).

*One of item_id or item_name is required for product or impression data.

item_name string Yes* jeggings

Item Name (context-specific).

*One of item_id or item_name is required for product or impression data.

promotion_id string Yes* P_12345 The ID of a product promotion. One of promotion_id or promotion name is required.
promotion_name string Yes* Summer Sale The name of a product promotion. One of promotion_id or promotion name is required.
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
creative_slot string No featured_app_1 The name of a creative slot
discount number No 2.22 Monetary value of discount associated with a purchase
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_variant string No Black Item variant
location_id string No L_12345 The location associated with the event. Preferred to be the Google Place ID that corresponds to the associated item but could be overridden to a custom location ID string.
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', 'select_promotion', {
  coupon: 'SUMMER_FUN',
  currency: 'USD',
  items: [{
    item_id: 'SKU_12345',
    item_name: 'jeggings',
    coupon: 'SUMMER_FUN',
    discount: 2.22,
    promotion_id: "P_12345",
    promotion_name: "Summer Sale",
    creative_name: "Summer Banner",
    creative_slot: "featured_app_1",
    location_id: "L_12345",
    affiliation: "Google Store",
    item_brand: 'Gucci',
    item_category: 'pants',
    item_variant: 'Black',
    price: 9.99,
    currency: 'USD'
  }],
  promotion_id: "P_12345",
  promotion_name: "Summer Sale"
  creative_name: "Summer Banner",
  creative_slot: "featured_app_1",
  location_id: "L_12345"
});

share

Use this event to identify viral content.

Parameters

Name Type Required Example Description
method string No Twitter 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', {
  method: 'Twitter',
  content_type: 'image',
  content_id: 'C_12345',
});

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 Google The method used for sign up.

Example

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

spend_virtual_currency

This event measures the sale of virtual goods in your app and helps you identify which virtual goods are the most popular.

Parameters

Name Type Required Example Description
item_name string No Starter Boost The name of the item the virtual currency is being used for.
virtual_currency_name string Yes Gems The name of the virtual currency.
value number Yes 5 The value of the virtual currency.

Example

gtag('event', 'spend_virtual_currency', {
  item_name: 'Starter Boost',
  virtual_currency_name: 'Gems',
  value: 5
});

tutorial_begin

This event signifies the start of the on-boarding process. Use this in a funnel with tutorial_complete to understand how many users complete the tutorial.

Parameters

There are no parameters for this event.

Example

gtag('event', 'tutorial_begin');

tutorial_complete

This event signifies the user's completion of your on-boarding process. Use this in a funnel with tutorial_begin to understand how many users complete the tutorial.

Parameters

No parameters are suggested for this event.

Example

gtag('event', 'tutorial_complete');

unlock_achievement

Log this event when the user has unlocked an achievement. This event can help you understand how users are experiencing your game.

Parameters

Name Type Required Example Description
achievement_id string Yes A_12345 The id of the achievement that was unlocked.

Example

gtag('event', 'unlock_achievement', {
  achievement_id: 'A_12345'
});

view_cart

This event signifies that a user viewed their 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 7.77 The monetary value of the event.

Item Parameters

Name Type Required Example Value Description
item_id string Yes* SKU_12345

Item ID (context-specific).

*One of item_id or item_name is required for product or impression data.

item_name string Yes* jeggings

Item Name (context-specific).

*One of item_id or item_name is required for product or impression data.

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
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_variant string No Black Item variant
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_cart', {
  currency: 'USD',
  items: [{
    item_id: 'SKU_12345',
    item_name: 'jeggings',
    coupon: 'SUMMER_FUN',
    discount: 2.22,
    affiliation: 'Google Store',
    item_brand: 'Gucci',
    item_category: 'pants',
    item_variant: 'black',
    price: 9.99,
    currency: 'USD'
  }],
  value: 7.77
});

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 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 7.77 The monetary value of the event.

Item Parameters

Name Type Required Example Value Description
item_id string Yes* SKU_12345

Item ID (context-specific).

*One of item_id or item_name is required for product or impression data.

item_name string Yes* jeggings

Item Name (context-specific).

*One of item_id or item_name is required for product or impression data.

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
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_variant string No Black Item variant
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_item', {
  currency: 'USD',
  items: [{
    item_id: 'SKU_12345',
    item_name: 'jeggings',
    coupon: 'SUMMER_FUN',
    discount: 2.22,
    affiliation: 'Google Store',
    item_brand: 'Gucci',
    item_category: 'pants',
    item_variant: 'black',
    price: 9.99,
    currency: 'USD'
  }],
  value: 9.99
});

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 Description
items Array<Item> No The items for the event.
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 IL_12345 The ID of the list in which the item was presented to the user.

Item Parameters

Name Type Required Example Value Description
item_id string Yes* SKU_12345

Item ID (context-specific).

*One of item_id or item_name is required for product or impression data.

item_name string Yes* jeggings

Item Name (context-specific).

*One of item_id or item_name is required for product or impression data.

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 IL_12345 The ID of the list in which the item was presented to the user
item_variant string No Black Item variant
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_item_list', {
  items: [{
    item_id: 'SKU_12345',
    item_name: 'jeggings',
    coupon: 'SUMMER_FUN',
    discount: 2.22,
    index: 5,
    item_list_name: "Related Products",
    item_list_id: "IL_12345",
    affiliation: 'Google Store',
    item_brand: 'Gucci',
    item_category: 'pants',
    item_variant: 'black',
    price: 9.99,
    currency: 'USD'
  }],
  item_list_name: 'Related products',
  item_list_id: 'related_products'
});

view_promotion

This event signifies an promotion was viewed from a list.

Parameters

Name Type Required Example Value Description
items Array<Item> No The items for the event.
promotion_id string No P_12345 The ID of a product promotion.
promotion_name string No Summer Sale The name of a product promotion.
creative_name string No Summer Banner The name of a creative used in a promotional spot.
creative_slot string No featured_app_1 The name of the creative slot.
location_id string No L_12345 The ID of the location.

Item Parameters

Name Type Required Example Value Description
item_id string Yes* SKU_12345

Item ID (context-specific).

*One of item_id or item_name is required for product or impression data.

item_name string Yes* jeggings

Item Name (context-specific).

*One of item_id or item_name is required for product or impression data.

promotion_id string Yes* P_12345 The ID of a product promotion. One of promotion_id or promotion name is required.
promotion_name string Yes* Summer Sale The name of a product promotion. One of promotion_id or promotion name is required.
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
creative_slot string No featured_app_1 The name of a creative slot
discount number No 2.22 Monetary value of discount associated with a purchase
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_variant string No Black Item variant
location_id string No L_12345 The location associated with the event. Preferred to be the Google Place ID that corresponds to the associated item but could be overridden to a custom location ID string.
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_promotion', {
  coupon: 'SUMMER_FUN',
  currency: 'USD',
  items: [{
    item_id: 'SKU_12345',
    item_name: 'jeggings',
    coupon: 'SUMMER_FUN',
    discount: 2.22,
    promotion_id: "P_12345",
    promotion_name: "Summer Sale",
    creative_slot: "featured_app_1",
    location_id: "L_12345",
    affiliation: "Google Store",
    item_brand: 'Gucci',
    item_category: 'pants',
    item_variant: 'Black',
    price: 9.99,
    currency: 'USD'
  }],
  promotion_id: "P_12345",
  promotion_name: "Summer Sale",
  creative_name: "Summer Banner",
  creative_slot: "featured_app_1",
  location_id: "L_12345"
});