Commit 320b9f26 authored by Paul Slaughter's avatar Paul Slaughter

Merge branch 'fix/gtm-event-price-formatting' into 'master'

Format pricing, revenue, tax data as strings for GTM

See merge request gitlab-org/gitlab!79694
parents d2171720 fc2b4cd3
......@@ -8,14 +8,14 @@ const PRODUCT_INFO = {
// eslint-disable-next-line @gitlab/require-i18n-strings
name: 'Premium',
id: '0002',
price: 228,
price: '228',
variant: 'SaaS',
},
[SKU_ULTIMATE]: {
// eslint-disable-next-line @gitlab/require-i18n-strings
name: 'Ultimate',
id: '0001',
price: 1188,
price: '1188',
variant: 'SaaS',
},
};
......@@ -220,8 +220,8 @@ export const trackTransaction = (transactionDetails) => {
id: transactionId,
affiliation: 'GitLab',
option: paymentOption,
revenue,
tax,
revenue: revenue.toString(),
tax: tax.toString(),
},
products: [product],
},
......
......@@ -234,7 +234,7 @@ describe('~/google_tag_manager/index', () => {
category: 'DevOps',
id: '0002',
name: 'Premium',
price: 228,
price: '228',
quantity: 1,
variant: 'SaaS',
},
......@@ -264,7 +264,7 @@ describe('~/google_tag_manager/index', () => {
category: 'DevOps',
id: '0001',
name: 'Ultimate',
price: 1188,
price: '1188',
quantity: 1,
variant: 'SaaS',
},
......@@ -301,7 +301,7 @@ describe('~/google_tag_manager/index', () => {
category: 'DevOps',
id: '0001',
name: 'Ultimate',
price: 1188,
price: '1188',
quantity: 5,
variant: 'SaaS',
},
......@@ -354,8 +354,8 @@ describe('~/google_tag_manager/index', () => {
id: '123',
affiliation: 'GitLab',
option: 'visa',
revenue,
tax: 10,
revenue: revenue.toString(),
tax: '10',
},
products: [
{
......@@ -363,7 +363,7 @@ describe('~/google_tag_manager/index', () => {
category: 'DevOps',
id,
name,
price: revenue,
price: revenue.toString(),
quantity: 1,
variant: 'SaaS',
},
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment