Documentation You are here: start » v » 2.0 » analytics

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
v:2.0:analytics [2024/01/16 18:27] – [Consent Mode] adamv:2.0:analytics [2024/12/05 09:11] (current) – [Supported Events] adam
Line 61: Line 61:
  
 If there are any other events that you want to track, these will need to be handled yourself manually. If there are any other events that you want to track, these will need to be handled yourself manually.
 +
 +For any events that include a ''value'', the total item price is used. For the ''purchase'' event, shipping and taxes are also passed as separate attributes in the event payload.
  
 === * "add_to_cart" event === === * "add_to_cart" event ===
Line 74: Line 76:
  
 You can see [[https://developers.google.com/analytics/devguides/collection/ga4/ecommerce?client_type=gtag#view_item_details|details on the ''view_item'' event on the GA4 documentation here]]. You can see [[https://developers.google.com/analytics/devguides/collection/ga4/ecommerce?client_type=gtag#view_item_details|details on the ''view_item'' event on the GA4 documentation here]].
 +
 +=== Item data ===
  
 As a reference, for the Foxy integration, we pass the following attributes for ''items'' in GA4 ecommerce event calls: As a reference, for the Foxy integration, we pass the following attributes for ''items'' in GA4 ecommerce event calls:
Line 82: Line 86:
   * ''quantity''   * ''quantity''
   * ''item_id'' (if the item has a ''code'' attribute)   * ''item_id'' (if the item has a ''code'' attribute)
 +
 +It is possible to override some of these values, or pass additional data to GA4 within the item data, by passing special reserved product options that are prefixed with ''_ga_'' in your add to carts. You can [[v:2.0:cheat_sheet#https://wiki.foxycart.com/v/2.0/cheat_sheet#special_product_options|see more information on the supported options here]].
  
 ==== Google Tag Manager ==== ==== Google Tag Manager ====
Line 119: Line 125:
 Our gtag.js integration is able to account for this as we can maintain the users session as part of the cart session and use it when initialising the session on the cart/checkout/receipt. For GTM though, we aren't able to force a specific client/session ID to be used by GA from our side. Our gtag.js integration is able to account for this as we can maintain the users session as part of the cart session and use it when initialising the session on the cart/checkout/receipt. For GTM though, we aren't able to force a specific client/session ID to be used by GA from our side.
  
-If you make use of a custom subdomain for your store which matches your website domain, then it's no longer cross-domain tracking, so it will be able to read the cookies fine.+If you make use of [[v:2.0:custom_domain|a custom subdomain]] for your store which matches your website domain, then it's no longer cross-domain tracking, so it will be able to read the cookies fine.
  
 ==== Consent Mode ==== ==== Consent Mode ====

Site Tools