CVM / Magento_GoogleTagManager

Google Tag Manager extension for Magento
67 stars 55 forks source link

Please add event for addTrans #10

Closed phildpearce closed 10 years ago

phildpearce commented 10 years ago

Please add event for addTrans so that this can be used as a trigger and it replicates the legacy GA setup.

"event": "trackTrans" // Trigger transaction submission to GA via GTM 

}];

Note: using a dataLayer rule for transacitonId = not null is not an optimal setting, hence the event for trackTrans is strongly recommended.

Thanks

Phil.

CVM commented 10 years ago

Replicating a legacy setup is not something I'm aiming to do with this extension, but I do regret not adding a GTM event for when a transaction occurs from day one. In fact, for the next version I'd consider handling transactions with a dataLayer.push() rather than in the object at load time.

I'll add this to the roadmap with a more generic name (you won't always be tracking a transaction - you might want to use the transaction event for firing Google Adwords Conversion Tracking, for example).

dataLayer.push({'event':'transaction'});
phildpearce commented 10 years ago

Thanks :)