项目作者: webmasterjunkie

项目描述 :
This is the enhanced eCommerce tracking tag for Partnerize. This is used to send your purchase marketing events to Partnerize.
高级语言: Smarty
项目地址: git://github.com/webmasterjunkie/partnerize-gtm-enhanced-ecommerce.git
创建时间: 2019-10-15T18:07:05Z
项目社区:https://github.com/webmasterjunkie/partnerize-gtm-enhanced-ecommerce

开源协议:Apache License 2.0

下载


Google Tag Manager Enhanced eCommerce Tag

This tag utilizes Google Tag Manager’s dataLayer to populate a formatted Partnerize purchase event tracking tag.

dataLayer Format

The Enhanced Ecommerce Developer Guide lists the required formatted for the dataLayer as it relates to this tag. You can view the specific requirements under the Measuring Purchases header.

Example

  1. <script>
  2. // Send transaction data with a pageview if available
  3. // when the page loads. Otherwise, use an event when the transaction
  4. // data becomes available.
  5. dataLayer.push({
  6. ecommerce’: {
  7. purchase’: {
  8. actionField’: {
  9. id’: T12345’, // Transaction ID. Required for purchases and refunds.
  10. affiliation’: Online Store’,
  11. revenue’: 35.43’, // Total transaction value (incl. tax and shipping)
  12. tax’:’4.90’,
  13. shipping’: 5.99’,
  14. coupon’: SUMMER_SALE
  15. },
  16. products’: [{ // List of productFieldObjects.
  17. name’: Triblend Android T-Shirt’, // Name or ID is required.
  18. id’: 12345’,
  19. price’: 15.25’,
  20. brand’: Google’,
  21. category’: Apparel’,
  22. variant’: Gray’,
  23. quantity’: 1,
  24. coupon’: ‘’ // Optional fields may be omitted or set to empty string.
  25. },
  26. {
  27. name’: Donut Friday Scented T-Shirt’,
  28. id’: 67890’,
  29. price’: 33.75’,
  30. brand’: Google’,
  31. category’: Apparel’,
  32. variant’: Black’,
  33. quantity’: 1
  34. }]
  35. }
  36. }
  37. });
  38. </script>