forked from coreshop/CoreShop
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
coreshop#1613 TagManagerEnhancedEcommerce
fixing some of the listed issues in the ticket Fixed: - trackCheckoutComplete - Rename total to revenue - trackProductImpression - remove quantity, brand, position, attribute - trackCartAdd - quantity is hardcoded to 1. Use $quantity instead Template issues - product_impression.js.twig - product_view.js.twig - checkout.js.twig - checkout_complete.js.twig Not fixed: - trackProductImpression - submit impression as multi- instead of single-array - trackCartAdd - price attribute: I'm not sure about that but I think we need to use the cart item price instead of product price (which often can't be determinate (because of complex variant structure etc.) - trackCartRemove
- Loading branch information
Showing
5 changed files
with
6 additions
and
10 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
src/CoreShop/Bundle/TrackingBundle/Resources/views/Tracking/gtm/enhanced/checkout.js.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
dataLayer.push({ 'event': 'csCheckout', 'checkout': {{ actionData|json_encode()|raw }} }); | ||
dataLayer.push({'event': 'csCheckout', 'ecommerce': {'checkout': {{ actionData|json_encode()|raw }} }}); |
2 changes: 1 addition & 1 deletion
2
...hop/Bundle/TrackingBundle/Resources/views/Tracking/gtm/enhanced/checkout_complete.js.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
dataLayer.push({'ecommerce' : { 'purchase' : {{ actionData|json_encode()|raw }} } }); | ||
dataLayer.push({'event': 'csPurchase', 'ecommerce' : { 'purchase' : {{ actionData|json_encode()|raw }} } }); |
2 changes: 1 addition & 1 deletion
2
...op/Bundle/TrackingBundle/Resources/views/Tracking/gtm/enhanced/product_impression.js.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
dataLayer.push({'ecommerce' : {{ actionData|json_encode()|raw }} }); | ||
dataLayer.push({'event': 'csProductImpressions', 'ecommerce' : {{ actionData|json_encode()|raw }} }); |
2 changes: 1 addition & 1 deletion
2
...CoreShop/Bundle/TrackingBundle/Resources/views/Tracking/gtm/enhanced/product_view.js.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
dataLayer.push({'ecommerce': {'detail': {{ actionData|json_encode()|raw }} }}); | ||
dataLayer.push({'event': 'csProductDetailImpressions', 'ecommerce': {'detail': {{ actionData|json_encode()|raw }} }}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters