Ecommerce tracking through GTM

85 views
Skip to first unread message

Jeffrey Lek

unread,
Mar 24, 2015, 11:44:13 AM3/24/15
to snowpl...@googlegroups.com
Hello Snowplowers,

I'm having problems getting the ecommerce tracking to work, using GTM. Actually I am only interested in the order id's, this is also the only thing we currently collect through GA.

Using the code on https://github.com/snowplow/snowplow/wiki/Integrating-javascript-tags-with-Google-Tag-Manager and selecting only the overall order part, I implemented the following, which doesn't end up in any data:

<script type="text/javascript">
// 1st, fire 'addTrans' event for the new transaction
window
.snowplow('addTran',{{Transaction ID}},'','','','','','','');


// Finally fire the 'trackTrans' event to commit the transaction
window
.snowplow['trackTrans']
</script>


Also I tried removing the ' ' s and just send the {{Transaction ID}} part, as well as adding [ ]'s like suggested in some of the forum posts I could find on the subject.

What am I doing wrong here?

Thanks,
Jeffrey









Alex Dean

unread,
Mar 24, 2015, 11:53:43 AM3/24/15
to snowpl...@googlegroups.com
Hi Jeffrey,

Apologies, looks like that was a typo and should have been:

window.snowplow('trackTrans');

I have now fixed the documentation.

A

--
You received this message because you are subscribed to the Google Groups "Snowplow" group.
To unsubscribe from this group and stop receiving emails from it, send an email to snowplow-use...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Co-founder
Snowplow Analytics
The Roma Building, 32-38 Scrutton Street, London EC2A 4RQ, United Kingdom
+44 (0)203 589 6116
+44 7881 622 925
@alexcrdean

Jeffrey Lek

unread,
Mar 25, 2015, 10:36:06 AM3/25/15
to snowpl...@googlegroups.com
Hi Alex,

Thanks for your anwer, I updated the window.snowplow('trackTrans'); part, but still no success. So currently firing the following:

<script type="text/javascript">
// 1st, fire 'addTrans' event for the new transaction
window.snowplow('addTran',{{Transaction ID}},'','','','','','','');

// Finally fire the 'trackTrans' event to commit the transaction
window.snowplow('trackTrans');
</script>

Is what I'm doing here at all possible / recommended? As I mentioned, I'm only interested in the order id's, so do I actually need to send the other paramters as empty strings? And could this cause a problem?

Thanks;
Jeffrey

Fred Blundun

unread,
Mar 25, 2015, 10:45:07 AM3/25/15
to snowpl...@googlegroups.com
Hello Jeffrey,

That was a typo too - it should be "addTrans", not "addTran". I have fixed the documentation.

Sorry for the inconvenience!

Fred

Jeffrey Lek

unread,
Mar 26, 2015, 6:17:43 AM3/26/15
to snowpl...@googlegroups.com
That did it, thanks alot!
Reply all
Reply to author
Forward
0 new messages