Add Transaction & pass just array of values, no param names?
I made need to update our .js from the old gstyle to the new analytics.,js library
In the old library you could do something like:
'Bungalow Trial CD- with fully-functional trials over 20 therapy programs',
But in the docs I see you need to pass along each variable name:
'id': '1234', // Transaction ID. Required.
'name': 'Fluffy Pink Bunnies', // Product name. Required.
'sku': 'DD23444', // SKU/code.
'category': 'Party Toys', // Category or variation.
'price': '11.99', // Unit price.
'quantity': '1' // Quantity.
I'm trying to make this upgrade as simple as possible so I'm hoping we can pass in the values as just an array, without having to pass the parameter name in as well.
But I can't find such a declaration anywhere.
Re: Add Transaction & pass just array of values, no param names?
Unfortunately, you will need to eventually map your values back to the specific Ecommerce parameter. Whether you set it as specified in the docs, or whether you do it via some code magic, bottom line is GA can only interpret and process your data if it's in the format they have specified.
Hope this helps.
Was my response helpful? If yes, please mark it as the ‘Best Answer.’ Learn how here.
Find me on: Google+ | LinkedIn