Das xt_ga4 Plugin unterstützt folgende Events über den im Plugin integrierten Data layer (Version 2).
Event | |
---|---|
view_item | Artikelseite |
view_cart | Warenkorb |
begin_checkout | Page checkout shipping |
add_shipping_info | Page checkout payment |
add_payment_info | Page checkout confirmation |
purchase | Page checkout success |
...
Code Block |
---|
{literal} <script type="text/javascript"> document.addEventListener("DOMContentLoaded", function(event) { $('.btn-cart').click(function() { var data = {} data.qty = $(this).find('[name="qty"]').attr('value'); data.productId = $(this).find('[name="product"]').attr('value'); dataLayer.push({ event:'add_to_cart', ecommerce:{items:[{item_id:data.productId, quantity:data.qty}]} }); }); }); </script> {/literal} |
Events
view_item
...
view_cart
...
begin_checkout
...
add_shipping_info
...
Value für Parameter shipping_tier ecommerce.shipping_tier
add_payment_info
...
Value für Parameter payment_type: ecommerce.payment_type
purchase
...
Value für Parameter
transaction_id: ecommerce.transaction_id
value: ecommerce.value
tax: ecommerce.tax
shipping: ecommerce.shipping
currency: ecommerce.currency
affiliation: ecommerce.affiliation
Adwords Conversiontracking über xt_ga4 Plugin
...