Customizing Price Attribute in Enhanced E-Commerce for Service Sales

Need help with Enhanced E-Commerce for our service-based webshop

We’re using the enhanced ecommerce object in our online store. Right now, we have the regular ‘price’ attribute. But since we sell services, we made a new attribute called ‘totalContractValue’. This is the price times the number of payments in a contract.

We want Google Analytics E-Commerce to use this ‘totalContractValue’ instead of the standard price. Anyone know how to make this switch?

Here’s a quick example of what we’re working with:

let standardPrice = 50;
let paymentFrequency = 12;
let totalContractValue = standardPrice * paymentFrequency;

// How do we get GA to use totalContractValue?
ecommerceObject.addItem({
  id: 'SERVICE001',
  name: 'Annual Subscription',
  price: standardPrice,
  // We want to use totalContractValue here
});

Has anyone dealt with this before? Any tips would be super helpful!

hey there! i’ve dealt with similar stuff before. instead of messing with the price attribute, try adding a custom dimension for totalContractValue. then you can use that in your reports nd stuff. you might need to tweak your ga setup a bit, but it should work. good luck!

Hey DashingDog! Your question’s got me thinking… :thinking:

Have you considered using the ‘coupon’ field in a creative way? What if you set the ‘price’ to your totalContractValue, but then use the ‘coupon’ field to show the difference between that and the standard price?

Something like:

ecommerceObject.addItem({
  id: 'SERVICE001',
  name: 'Annual Subscription',
  price: totalContractValue,
  coupon: 'CONTRACT_DISCOUNT_' + (totalContractValue - standardPrice)
});

This way, you’re tracking the full value, but also keeping a record of the ‘discount’ that represents the difference between your standard price and the contract value.

Just a thought! What do you think? Have you tried anything like this before?

I’ve encountered this scenario in my work with service-based businesses. One effective approach is to utilize the ‘revenue’ field instead of ‘price’ in your ecommerce object. This field is designed to represent the total monetary value of the transaction, which aligns well with your totalContractValue concept. You can modify your code like this:

ecommerceObject.addItem({
  id: 'SERVICE001',
  name: 'Annual Subscription',
  price: standardPrice,
  quantity: paymentFrequency,
  revenue: totalContractValue
});

This method allows you to maintain the standard price for individual payments while accurately reporting the full contract value to Google Analytics. Remember to adjust your GA views and reports to focus on the revenue metric for a more accurate representation of your service sales.