If you want to install the Divvit script via Google Tag manager, you first have to make sure that you/your developer have set up a Data Layer containing the essential information we need for Divvit to work correctly. They are listed below:

  • Order ID (essential)
  • Total transaction value (essential)
  • Shipping (optional)
  • Currency (optional)
  • Payment method (optional)
  • Voucher code (optional)
  • Voucher discount (optional)
  • Customer ID (optional but preferred)
  • Products bought (essential)

By default, we have named the variables the exact same way as Google Analytics does for their enhanced e-commerce plugin. If you already have these variables set up, but with different names, you can replace then name of the variable in the Divvit script.

Below is a short step-by-step guide on how to set up variables according to Googles own guide.

  1. Navigate to your Google Tag Manager account and click on "Variables" on the left side menu.
  2. Put a name on your variable. Please note that this has to be the exactly the same as we have defined in our guide at https://divvit.com/tags/gtm.
  3. Make sure you have the correct name for your variable!
  4. Click the middle where it says "Choose a variable type to begin set-up.." and choose Data Layer Variable
  5. Enter the Data Layer Variable Name. We have listed those at the bottom of the page. Please note that these Data Layer Variable Names could differ, depending on how you/your developer have done the Data Layer implementation, but our variable names are following Googles standard.

One minute video on how to add variables:

Images on how to add variables:

Divvit variable names and Data Layer Variables

Below are the default Divvit variable names (to the left) and the default Data Layer names (to the right). Please note that your Data Layer might use different names, if the person implemented it chose to do so. In most cases, below should work.

transactionId = ecommerce.purchase.actionField.id
transactionTotal = ecommerce.purchase.actionField.revenue
transactionShipping = ecommerce.purchase.actionField.shipping
transactionCurrency = ecommerce.currencyCode
transactionPaymentMethod =  ecommerce.purchase.actionField.paymentMethod
transactionDiscount = ecommerce.purchase.actionField.couponDiscount
transactionDiscountCode = ecommerce.purchase.actionField.coupon
transactionCustomerId = Depending on how you/your developer set it up
transactionProducts = ecommerce.purchase.products

We would love to help you. Email us at support@divvit.com and we will assist with your installation. 🙌

Did this answer your question?