Google Analytics Transaction DataLayer - Self Manage and Duo Pro

Problem

Continuation from this related issue: https://gitlab.com/gitlab-org/customers-gitlab-com/-/issues/10047#note_2036152359

Expand Google Analytics transaction tracking for Duo Pro and Self Manage Premium and Ultimate for customers.gitlab.com.

Proposal

Track successful purchases of Duo Pro, Premium and Ultimate Self Manage purchases on Customers Portal similar to how we do it on GitLab.com - google_tag_manager/index.js

Ensure OneTrust and Google Tag Manager scripts are available on the page.

Fire the following dataLayer code upon a successful transaction event. The values will need to be dynamically filled.

From this guide (last page): https://gitlab.com/groups/gitlab-com/marketing/digital-experience/-/uploads/f252fc80f1dd6799d19e4d57d6b4c239/Gitlab_GTM_DataLayer_Spec.pdf

<script>
dataLayer.push({ ecommerce: null });
  dataLayer.push({
    'event':'EECtransactionSuccess',
    'ecommerce': {
      'currencyCode': 'USD',
      'purchase': {
        'actionField': {
          'id': 'abc1234567', // Transaction ID. Required.
          'affiliation': 'GitLab', // Brand
          'option': 'visa' // Payment type
          'revenue': '238.00', // Transaction revenue
          'tax':'20.12', // Tax value, if any. 0 if none. 
          'shipping':'0',
          'coupon': '' // coupon code, if used
        },
        'products': [
          {
            'name': 'GitLab Premium', // product name
            'id': '1234', // product id
            'price': '228.00', // product price
            'brand': 'GitLab',
            'category': 'DevOps',
            'variant': 'Self managed', // duo pro or self managed 
            'quantity': 1 // seats,
            'dimension36': 123 // namespaceId
          },
          {
            'name': 'CI/CD', // Multiple products can be added in an array if needed. 
            'id': '9876',
            'price': '10.00',
            'brand': 'GitLab',
            'category': 'CI minutes',
            'variant': 'SaaS',
            'quantity': 1,
            'dimension36': 123 // namespaceId
          }
        ]
      }
    }
  });
</script>

Previous MRs:

Epic: https://gitlab.com/groups/gitlab-org/-/epics/13860

Result

Test by performing a transaction. Enter dataLayer into dev > console to see if the above datalayer values are available. Do not let the page reload.

Testing on prod instructions: https://gitlab.com/gitlab-com/Finance-Division/finance/-/wikis/Testing%20in%20Zuora%20Billing%20Production%20Environment#test-record-requirements