Created
October 14, 2018 16:52
-
-
Save marcusRB/e7f1ef540c3e12d5e28e8d1b03223a71 to your computer and use it in GitHub Desktop.
ProductPurchase as custom Event for Google Tag Manager
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
/* ProductPurchase as custom Event for Google Tag Manager - Update 10.2018 MR//PD | |
Trigger: tag fire when customEvent 'transaction' or similar purchase event, populate dataLayer at the end of transaction (after payment gateway or on thank you page) | |
Remember: Set Tag Sequencing load before main pageView FBads tag | |
*/ | |
<!--Product Purchase from Hybris only - Update 09.2018 MR//PD --> | |
<script> | |
fbq('track', 'Purchase', { | |
value: {{EE - Revenue}}, //purchase revenue as FLOAT | |
currency: 'EUR', | |
contents: {{dlv - EEC ecommerce.purchase.products}}, //shows array of purchase | |
content_type: 'product', | |
product_catalog_id: '{{FB ads - product_catalog_id}}', | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment