I'm pushing a simple ecommerce object to the Google Tag Manager dataLayer
on the client side. It's working fine but I need to move this to the server.
I found the Google API Node.js Client Library but it's still pretty young and I'm not able to find any working examples.
Has anyone managed to do this? How would I accomplish the following using the google-api-nodejs-client in node.js?
dataLayer.push({
event: 'purchase',
user: 'user_1234',
transactionId: 'trans_123',
transactionAffiliation: 'Acme Clothing',
transactionTotal: 11.99,
transactionProducts: [
{
id: '1234',
sku: 'SKU47',
name: 'Fluffy Pink Bunnies',
price: 11.99,
quantity: 1
}
]
});