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 = { ...@@ -8,14 +8,14 @@ const PRODUCT_INFO = {
// eslint-disable-next-line @gitlab/require-i18n-strings // eslint-disable-next-line @gitlab/require-i18n-strings
name: 'Premium', name: 'Premium',
id: '0002', id: '0002',
price: 228, price: '228',
variant: 'SaaS', variant: 'SaaS',
}, },
[SKU_ULTIMATE]: { [SKU_ULTIMATE]: {
// eslint-disable-next-line @gitlab/require-i18n-strings // eslint-disable-next-line @gitlab/require-i18n-strings
name: 'Ultimate', name: 'Ultimate',
id: '0001', id: '0001',
price: 1188, price: '1188',
variant: 'SaaS', variant: 'SaaS',
}, },
}; };
...@@ -220,8 +220,8 @@ export const trackTransaction = (transactionDetails) => { ...@@ -220,8 +220,8 @@ export const trackTransaction = (transactionDetails) => {
id: transactionId, id: transactionId,
affiliation: 'GitLab', affiliation: 'GitLab',
option: paymentOption, option: paymentOption,
revenue, revenue: revenue.toString(),
tax, tax: tax.toString(),
}, },
products: [product], products: [product],
}, },
......
...@@ -234,7 +234,7 @@ describe('~/google_tag_manager/index', () => { ...@@ -234,7 +234,7 @@ describe('~/google_tag_manager/index', () => {
category: 'DevOps', category: 'DevOps',
id: '0002', id: '0002',
name: 'Premium', name: 'Premium',
price: 228, price: '228',
quantity: 1, quantity: 1,
variant: 'SaaS', variant: 'SaaS',
}, },
...@@ -264,7 +264,7 @@ describe('~/google_tag_manager/index', () => { ...@@ -264,7 +264,7 @@ describe('~/google_tag_manager/index', () => {
category: 'DevOps', category: 'DevOps',
id: '0001', id: '0001',
name: 'Ultimate', name: 'Ultimate',
price: 1188, price: '1188',
quantity: 1, quantity: 1,
variant: 'SaaS', variant: 'SaaS',
}, },
...@@ -301,7 +301,7 @@ describe('~/google_tag_manager/index', () => { ...@@ -301,7 +301,7 @@ describe('~/google_tag_manager/index', () => {
category: 'DevOps', category: 'DevOps',
id: '0001', id: '0001',
name: 'Ultimate', name: 'Ultimate',
price: 1188, price: '1188',
quantity: 5, quantity: 5,
variant: 'SaaS', variant: 'SaaS',
}, },
...@@ -354,8 +354,8 @@ describe('~/google_tag_manager/index', () => { ...@@ -354,8 +354,8 @@ describe('~/google_tag_manager/index', () => {
id: '123', id: '123',
affiliation: 'GitLab', affiliation: 'GitLab',
option: 'visa', option: 'visa',
revenue, revenue: revenue.toString(),
tax: 10, tax: '10',
}, },
products: [ products: [
{ {
...@@ -363,7 +363,7 @@ describe('~/google_tag_manager/index', () => { ...@@ -363,7 +363,7 @@ describe('~/google_tag_manager/index', () => {
category: 'DevOps', category: 'DevOps',
id, id,
name, name,
price: revenue, price: revenue.toString(),
quantity: 1, quantity: 1,
variant: 'SaaS', 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